indykite-outbound-events
Skill4 starsChanged 10 days agoApache-2.0View on GitHub
Configure IndyKite Outbound Events - the project's event sink, which sends a CloudEvents message to your own Kafka topic, Azure Event Grid, Azure Service Bus or Google Cloud Pub/Sub when data is captured, a configuration changes, an AuthZEN decision is made or a ContX IQ query runs - through the Config API (`/configs/v1/event-sinks` - create / read / list / update / delete, optional ETag). Covers providers, ordered routes with event-type and key/value filters, `stop_processing`, CDC events (`include_cdc_events`), and reading a provider's `last_error`. Use to author, inspect, change or remove an event sink - "send all Capture events to our Kafka topic", "route config changes to Service Bus", "why does the event sink show last_error?", "why 409 / 422 on /configs/v1/event-sinks?". Not for reading the audit trail (indykite-audit-logs), consuming the events in your own system, or writing graph data (indykite-capture-*).
- Sends data out
In this repository27 other files it gives its agents.
- indykite-agent-gatewaySkill
- indykite-audit-logsSkill
- indykite-authzen-evaluationSkill
- indykite-authzen-evaluationsSkill
- indykite-authzen-kbac-policiesSkill
- indykite-authzen-list-policiesSkill
- indykite-authzen-search-actionSkill
- indykite-authzen-search-resourceSkill
- indykite-authzen-search-subjectSkill
- indykite-capture-delete-node-propertiesSkill
- indykite-capture-delete-node-property-metadataSkill
- indykite-capture-delete-nodesSkill
- indykite-capture-delete-relationship-propertiesSkill
- indykite-capture-delete-relationshipsSkill
- indykite-capture-upsert-nodesSkill
- indykite-capture-upsert-relationshipsSkill
- indykite-ciq-add-propertySkill
- indykite-ciq-add-relationship-propertySkill
- indykite-ciq-create-nodeSkill
- indykite-ciq-create-node-with-linkSkill
- indykite-ciq-create-relationshipSkill
- indykite-ciq-deleteSkill
- indykite-ciq-readSkill
- indykite-ciq-whoamiSkill
- indykite-data-schemaSkill
- indykite-intent-agentSkill
- indykite-mcp-serverSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Do not activate this skill when the user wants to:
- Very specific: line 34
write graph data: - use the indykite-capture-* or indykite-ciq-* skills.
- Distinctive: line 43
If any of these are missing, say so before writing JSON.
- Distinctive: line 84
Put specific routes before wildcard routes.
- Distinctive: line 161
All with the Service Account token:
- Distinctive: line 180
When this skill has been applied successfully:
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
IndyKite Outbound Events - the event sink
Outbound Events send a notification to a system you run each time something happens in an IndyKite project: a node or relationship is captured or deleted, a configuration is created or changed, an AuthZEN decision or search is made, a ContX IQ query is executed. Each notification is a CloudEvents message.
What is sent, and where, is one Config API object per project: the event sink. It has two parts:
- providers - the destinations, each under a name you choose: a Kafka topic, an Azure Event Grid topic, an Azure Service Bus queue or topic, or a Google Cloud Pub/Sub topic;
- routes - an ordered list of rules, each naming an event type (optionally narrowed by key/value pairs) and the provider that gets the matching events.
This skill covers the event sink lifecycle on /configs/v1/event-sinks: writing the JSON body, creating the sink, reading it back (including the health of each provider in last_error), updating and deleting it.
When to use
Activate this skill when the user wants to:
- send IndyKite events to their own system - Kafka (Confluent Cloud or self-hosted), Azure Event Grid, Azure Service Bus, Google Cloud Pub/Sub;
- author or change routes - which event types go to which provider, filters on a node label or property, route order,
stop_processing; - switch CDC events on or off (
include_cdc_events), to receive the before and after state of a change; - read, list, update or delete the project's event sink;
- find out why events do not arrive - a provider's
last_error, a route that never matches; - understand a
409or422from/configs/v1/event-sinks.
Do not activate this skill when the user wants to:
- read or export the audit trail kept by IndyKite - use
indykite-audit-logs; - write the consumer on their side (a Kafka client, a Pub/Sub subscriber) - that is their own code; the payload of each event type is in the Audit Event Formats guide;
- write graph data - use the
indykite-capture-*orindykite-ciq-*skills; those calls produce the events, they do not configure the sink.
Prerequisites
- An IndyKite project, and its GID in
PROJECT_GID- it becomes the sink'sproject_id. - A Service Account token with Config API write access, in
SERVICE_ACCOUNT_TOKEN- used for every/configs/v1/event-sinkscall. - The destination already exists and can be reached from the public internet: the Kafka brokers and topic, the Event Grid topic endpoint, the Service Bus queue or topic, or the Pub/Sub topic. Its access values (
password,access_key,connection_string,credentials_json) are not written into the body file: the user sets them in environment variables - for Pub/Sub, the path of the key file - and step 4 fills them in when the request is sent. - The event types to send (step 2). A project has at most one event sink: to add a destination to a project that has one, update it (step 6).
If any of these are missing, say so before writing JSON.
Steps
1. Declare the providers
providers is an object: each key is a provider name you choose, each value holds exactly one of four blocks.
| Block | Required fields | Optional fields |
kafka | brokers (list of host:port, at least one), topic | username, password, disable_tls, tls_skip_verify, display_name |
azure_event_grid | topic_endpoint (an https URL), access_key | display_name |
azure_service_bus | connection_string, queue_or_topic_name | display_name |
pubsub | project_id (the GCP project), topic_name, credentials_json (the service account key, as one JSON string) | display_name |
List at least two Kafka brokers, so the connection survives one of them being down. Keep disable_tls and tls_skip_verify at false outside development. Field limits are in references/event-sink-reference.md.
2. Write the routes
routes is an ordered list with at least one entry. Each route has:
provider_id- a key ofproviders;event_type_key_values_filter.event_type- one event type, or a wildcard such asindykite.audit.capture.*;- optional
event_type_key_values_filter.context_key_value-{ "key", "value" }pairs that narrow the match, e.g.captureLabel=Personfor the node type, or a property name with value*for "has this property"; - optional
stop_processinganddisplay_name.
The event types, by family:
| Family | Wildcard | Examples |
| Capture | indykite.audit.capture.* | indykite.audit.capture.upsert.node, indykite.audit.capture.delete.relationship |
| Configuration | indykite.audit.config.* | indykite.audit.config.create, indykite.audit.config.update |
| Authorization | indykite.audit.authorization.* | indykite.audit.authorization.evaluation, indykite.audit.authorization.searchresource |
| ContX IQ | - | indykite.audit.ciq.execute |
| Token | - | indykite.audit.credentials.token.introspected |
| CDC | indykite.audit.cdc.* | indykite.audit.cdc.node.update - sent only with include_cdc_events: true |
The full list, and which filters each type accepts, is in references/event-sink-reference.md.
Routes are evaluated in order. An event goes to each route it matches, until a matching route has stop_processing: true: the routes after it are then skipped. Two rules follow:
- Put specific routes before wildcard routes.
- Prefer
stop_processing: trueon each route, so that an event goes to one route only. When the send to one route fails, the event is sent again later to all the routes it matches, also to those that already received it; an event that goes to one route only is not duplicated that way. When the same event must reach several destinations, leave itfalseon the routes that must let later routes match, and deduplicate on theidof the CloudEvents envelope in the consumers.
3. Assemble the body
{
"project_id": "<project-gid>",
"name": "outbound-events",
"display_name": "Outbound Events",
"include_cdc_events": false,
"providers": {
"kafka-provider": {
"kafka": {
"brokers": ["<broker-1-host>:9092", "<broker-2-host>:9092"],
"topic": "<topic>",
"username": "<kafka-username>",
"password": "<kafka-password>"
}
}
},
"routes": [
{
"provider_id": "kafka-provider",
"stop_processing": true,
"event_type_key_values_filter": { "event_type": "indykite.audit.capture.*" }
}
]
}name is 2-63 chars of lowercase letters, digits and hyphens, unique in the project, and cannot be changed later. Ready bodies with placeholders: assets/event-sink-kafka-capture.json (one provider) and assets/event-sink-multi-provider.json (all four provider types, four routes). Copy one to a working file and set the hosts, topics and names there. Leave the placeholders of the four write-only fields (password, access_key, connection_string, credentials_json) as they are: step 4 fills them in when the request is sent.
4. Create the sink
POST <API_URL>/configs/v1/event-sinksAuthenticate with the Service Account token: Authorization: Bearer <SERVICE_ACCOUNT_TOKEN>.
jq sets project_id and the write-only field of each provider as the request is sent, so the body file keeps its placeholders. It reads each value from its own environment with env.<NAME>, so the variable has to be exported in the shell that runs the command:
# project_id and the Kafka password come from the environment at send time
jq --arg pid "$PROJECT_GID" \
'.project_id = $pid | .providers["kafka-provider"].kafka.password = env.KAFKA_PASSWORD' event-sink.json \
| curl -i -X POST "$API_URL/configs/v1/event-sinks" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SERVICE_ACCOUNT_TOKEN" \
-d @-Each provider takes one assignment of this kind; the line for each of the four provider types is in references/event-sink-reference.md.
A 201 Created returns the sink's id (a gid:…), create_time, created_by, update_time, updated_by, and an ETag header (-i prints the response headers). Keep the id and the ETag for step 6. Two refusals are specific to event sinks:
409withevent sink already exists in project- the project has its sink; update that one.422with anerrorslist - validation failed before anything was stored; fix everything it lists. A destination can be refused this way, e.g.kafka broker: destination is not permitted- a provider points at a private, loopback or link-local address, or an Event Grid endpoint is nothttps. The list is inreferences/event-sink-reference.md.
5. Check that the providers connect
201 means the body is valid, not that the destination answers: the connection is checked afterwards. Read the sink back a little later:
GET <API_URL>/configs/v1/event-sinks/{id}- A provider block without
last_erroris healthy. - A provider block with
last_errorhas failed. The text says what failed and whether IndyKite tries again by itself (Failure 3 of 10, next retry after <time>.) or has stopped (Failure 10 of 10, retries stopped. Save the configuration to try again., or a message with neither ending). The four messages and their fixes are inreferences/event-sink-reference.md.
Then run an operation that a route matches - for example a Capture upsert - and look for the message at the destination.
In a read, access_key, connection_string, password and credentials_json always come back as empty strings: they are write-only.
6. Read, list, update and delete
All with the Service Account token:
- Read:
GET /configs/v1/event-sinks/{id}, or by name withGET /configs/v1/event-sinks/{name}?project_id={PROJECT_GID}. - List:
GET /configs/v1/event-sinks?project_id={PROJECT_GID}. Withoutfull_fetch=truethe item'sprovidersandroutesare empty. - Update:
PUT /configs/v1/event-sinks/{id}is a full replacement ofprovidersandroutes, both required. Send every provider again with its write-only fields, filled in at send time as in step 4, since a read never returns them, and every route.include_cdc_eventsleft out meansfalse.nameandproject_idcannot change.If-Match: <etag>is optional and recommended: a stale value is refused with412. Every update clearslast_erroron all providers and starts a new connection check. - Delete:
DELETE /configs/v1/event-sinks/{id}, with the same optionalIf-Match. It returns the deletedid; events produced from then on are not delivered anywhere.
There is no switch to pause one route or one provider. Remove a route in an update, or a provider together with the routes that name it, and put them back later. An update must keep at least one provider and one route: to stop the only destination, delete the sink and create it again later - it gets a new id.
Delivery in brief
- Delivery is at least once. A consumer that cannot tolerate repeats should deduplicate on the
idof the CloudEvents envelope. - While a provider is failing and nothing is recorded yet, its events are sent again until it recovers. Once
last_errorrecords a failed round, every route pointing at that provider is switched off until a later round succeeds or the sink is updated; events that match only such a route in that time are not delivered and not kept for later. - A single event the destination refuses (too large, refused by a filter of the destination) is not sent again, and nothing is recorded in
last_error.
So watch last_error on a sink you depend on. The retry schedule is in the Outbound Events guide.
Outcome
When this skill has been applied successfully:
- The project has one event sink whose providers point at the user's destinations and whose routes name the event types to send, each with
stop_processingset deliberately. - The sink's
idand current ETag are known, so it can be read, updated or deleted. - A read shows no
last_erroron any provider, and a matching operation produced a message at the destination - or thelast_errortext has been reported with its fix.
Files in this skill
references/event-sink-reference.md- the body schema (providers, routes, filters), every event type with its filters, CDC events, the Config API lifecycle,last_errormessages, save-time refusals, and a troubleshooting table.assets/event-sink-kafka-capture.json- create body with one Kafka provider and one route for all Capture events.assets/event-sink-multi-provider.json- create body with all four provider types and four ordered routes.
Agent-specific notes
This skill uses generic markdown instructions and works across all agents listed in the README. The agent needs to be able to issue HTTP requests (curl, an HTTP client, or the IndyKite Terraform provider - see References). No Claude Code hooks, Cursor @-mentions, or Copilot workspace context are required.
References
- Outbound Events guide (developer hub) - providers, routing, event types, CDC events, provider health and retries.
- Audit Event Formats guide (developer hub) - the CloudEvents envelope and the payload of every event type.
- Config API guide (developer hub) - the rules shared by every Config API resource.
- Config API documentation - Event Sinks
- IndyKite Terraform provider -
indykite_event_sink- manages the same object declaratively.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

