Workflows

Embed an Agent in Your Product

Use the Channel API to put a repo-aware agent inside your own support tool or app.

Use the Channel API to put a repo-aware agent inside your own support tool, ops dashboard, or messaging product. Your users talk to the agent without leaving your interface.

Register a channel#

Create a channel with POST /api/channels (or use text-only registration if you don't need browser onboarding). Save the API key and webhook secret immediately — the API key is only shown once.

Wire up your product#

Forward incoming messages to POST /api/channels/:channelId/inbound. The response includes synchronous replies you can show immediately.

For continuing agent output, handle agent.update webhook POSTs at your callback URL. Progress, system, final, and error batches are pushed as they are committed, so your product does not need to poll chat.dev. Verify the X-Webhook-Signature header with your webhook secret and deduplicate updates by deliveryId.

Create and load an agent#

Use the same command flow chat.dev already supports, sent through the channel:

/spawn acme/billing-service
/load billing-service

Send real tasks#

Reproduce the Stripe webhook duplication bug in this repo,
identify the root cause, patch it, and explain the fix in plain English
so I can send the summary to a non-technical customer success manager.

Show the synchronous replies immediately. Stream later async output from the webhook callback into the same conversation thread.

When to use this#

This makes sense when you want your own chat surface but still want chat.dev handling the hard parts: repo access, persistent machines, and agent execution. See the full Channel API docs for authentication, webhook format, and text-only registration.