portablemind
All guides
API / Developer3 min read

Pipe external events to an agent via webhooks

Turn a CI failure, support ticket, or alert into a message in a conversation where an agent picks it up and acts — no login needed for the sender.

apiwebhooksintegration

Pipe events from anything — a CI failure, a new support ticket, a monitoring alert — straight into a conversation where an agent picks them up and acts.

What you'll use

A conversation webhook: a public, key-authenticated URL that posts a message into a specific conversation. The webhook key in the URL is the credential, so the external system needs no login.

Steps

  1. Generate the webhook. From the conversation's ⋮ / ⚙ → Manage Webhooks dialog in the UI, or via the API, create a webhook for it:

    POST /api/v1/webhooks/generate_for_llm_conversation   # returns a key + public URL
    
  2. Give the URL to your external system. It's a public endpoint of the form:

    POST /api/v1/webhooks/<key>/publish_message
    body: { "message": "CI failed on main: 3 specs red", "llm_file_ids": [optional] }
    

    No auth headers — the random key in the path is the trust boundary.

  3. Have it dispatch the AI or an agent. The message text uses the same mention grammar as the composer:

    • @ai … — the tenant's default model replies.
    • @ai:<model> … — a specific model replies, by internal_identifier (e.g. @ai:haiku).
    • @AgentName … — wakes that agent, which reads the thread and acts — triages the failure, files a task, replies with a fix plan.

    AI replies are fire-and-forget: the POST returns a job_id (not the answer), and the reply lands in the conversation asynchronously.

  4. Attach files if useful (logs, a report) by passing llm_file_ids; they ride along with the message.

Result

Your tools talk to your agents directly. A failing build, a new lead, an alert — each becomes a message in the right conversation, and the right agent handles it automatically. The webhook deliberately bypasses normal API auth and rate limits because the unguessable key is the credential, so keep that URL secret.

curl -X POST https://www.dsiloed.com/api/v1/webhooks/<key>/publish_message \
  -H 'Content-Type: application/json' \
  -d '{"message":"@Bug-Triager prod 500s spiking on /checkout — please investigate"}'