Ingest AI agent events
Agents — Claude Code, Cursor, your own app — call a pipeline by id like a named function, authenticated with a per-agent bearer token scoped to an explicit pipeline allowlist. The request body is the event; with ?wait=true the agent gets the post-pipeline payload back to use as a tool result. Classify, enrich, and redact in flight first — then fan out to any destination, with retries and a dead-letter queue behind every delivery.
how events arrive
- 01
create an agent source
Add an AI-agent source; ingestlayer issues a bearer token bound to an explicit allowlist of pipeline ids the agent may invoke — nothing else.
- 02
invoke a pipeline
From the agent, POST the event payload to https://in.ingestlayer.com/v1/agent/invoke/<pipelineId> with the bearer token. The body is the event; anything goes — the downstream actions handle the shape.
- 03
fire-and-forget or wait
By default the pipeline runs and its destinations fire. Add ?wait=true to also get a poll URL that returns the post-actions payload — the agent reads the enriched, redacted result and uses it as a tool response.
POST /v1/agent/invoke/pl_enrich_lead?wait=true HTTP/1.1
Host: in.ingestlayer.com
Authorization: Bearer ag_live_8fa2…
Content-Type: application/json
{
"type": "company.lookup",
"email": "ada@acme.com"
}notes
- The bearer token is bound to an explicit pipeline allowlist (or "*" for the whole org) — an agent can only invoke the pipelines you list, so a leaked token can't reach the rest of the org.
- With ?wait=true the pipeline's normal destinations still fire; the returned payload is additive, not instead of routing. The poll URL holds the result only briefly, then expires.
- Prompts and tool outputs often carry PII or secrets — redact.pii runs before any destination, so what reaches Slack or your warehouse isn't the raw model I/O. Over the source's rate limit, invokes get a 429 with Retry-After.
route AI agent anywhere
- AI agent → SlackSlack
- AI agent → DiscordDiscord
- AI agent → TelegramTelegram
- AI agent → EmailEmail
- AI agent → WebhookWebhook
- AI agent → PostgresPostgres
- AI agent → NotionNotion