ingestlayer/recipes

AI agent → Webhook

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.

01source

sourceagentAI agent
matchcompany.lookup

02pipeline · 3 steps

  • 01MUTredact.piistrip secrets from prompts + outputs
  • 02ENRclassifylabel calls by risk
  • 03ENRsummarizetrace → one-line outcome

03destinations · 1

  • towebhook.outWebhook
    urlhttps://api.acme.com/hooks

how events arrive

  1. 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.

  2. 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.

  3. 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.

from ai agentdelivered
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"
}

route it to Webhook

POST the processed event as JSON to any HTTPS endpoint you control.

  1. 01

    set the URL

    Any HTTPS endpoint. The processed event is delivered as a JSON body on POST.

  2. 02

    choose auth

    None, a bearer token, or HMAC signing. Signed requests carry an X-Ingestlayer-Signature header you verify with your shared secret.

  3. 03

    confirm receipt

    Return a 2xx within the timeout. Non-2xx responses trigger retries with exponential backoff before the delivery dead-letters.

in webhookdelivered
POST /hooks HTTP/1.1
Host: api.acme.com
Content-Type: application/json
X-Ingestlayer-Signature: t=1717000000,v1=9f86d08…

{
  "type": "user.signed_up",
  "payload": { "email": "ada@acme.com", "plan": "pro" }
}

notes

questions

How does an agent send data in?
It calls a pipeline by id like a function: POST the event to /v1/agent/invoke/<pipelineId> with the agent's bearer token. The request body is the event payload.
Can the agent use the processed result?
Yes — invoke with ?wait=true and ingestlayer returns a poll URL holding the post-actions payload (enriched, classified, redacted), so the agent can use it as a tool result. The pipeline's normal destinations still fire.
How do I keep prompt data out of chat?
redact.pii masks sensitive fields per destination, so a warehouse copy can keep the full trace while the Slack message shows only a clean summary.
build this pipelineor read the quickstart →

AI agent, routed elsewhere

other sources, into Webhook