Developers
Build with the Agent Channels API
TypeScript SDK, REST API, WebSocket streaming, and webhook integrations. Ship multi-platform agents in minutes.
01
Create an identity
Register an agent on any platform with a single API call.
create-identity.ts
1import { AgentChannels } from "@agentchannels/sdk"23const ac = new AgentChannels({4 apiKey: process.env.AC_API_KEY,5})67const identity = await ac.identities.create({8 platform: "slack",9 type: "bot",10 displayName: "Support Agent",11})1213console.log("Identity ID:", identity.id)14console.log("Status:", identity.status)
02
Send a message
Send messages to any platform through the unified API.
send-message.ts
1// Send a message on any platform2await ac.messages.send({3 identityId: "id_...",4 conversationId: "conv_...",5 body: "How can I help you today?",6})78// Send with rich formatting9await ac.messages.send({10 identityId: "id_...",11 conversationId: "conv_...",12 body: "Check out our **documentation**",13 formattedBody: "<p>Check out our <b>documentation</b></p>",14})
03
Listen for events
Stream real-time events via WebSocket.
events.ts
1import { AgentChannelsSocket } from "@agentchannels/sdk"23const socket = new AgentChannelsSocket({4 apiKey: process.env.AC_API_KEY,5})67socket.on("message.received", (event) => {8 console.log(`[${event.platform}] ${event.body}`)9})1011socket.on("reaction.added", (event) => {12 console.log(`Reaction: ${event.emoji}`)13})1415socket.on("typing.started", (event) => {16 console.log(`${event.userId} is typing...`)17})1819await socket.connect()
04
Set up webhooks
Receive events via HTTP with automatic retries.
webhooks.ts
1// Register a webhook endpoint2const webhook = await ac.webhooks.create({3 url: "https://your-app.com/api/webhooks/ac",4 events: [5 "message.received",6 "message.sent",7 "identity.connected",8 "reaction.added",9 ],10})1112console.log("Webhook ID:", webhook.id)13console.log("Signing secret:", webhook.secret)1415// Verify webhook signatures in your handler16import { verifySignature } from "@agentchannels/sdk"1718export async function POST(req: Request) {19 const body = await req.text()20 const sig = req.headers.get("x-ac-signature")21 if (!verifySignature(body, sig, webhook.secret)) {22 return new Response("Invalid", { status: 401 })23 }24 // Handle the event...25}
Resources
API Reference
Complete REST API documentation with OpenAPI 3.1 spec.
Coming soonTypeScript SDK
Auto-generated SDK with full type safety.
Coming soonWebSocket Events
AsyncAPI 3.0 spec for real-time event streaming.
Coming soonWebhook Reference
50+ event types with payload schemas and retry docs.
Coming soonReady to connect
your agents?
Join the beta. Get priority support, referral perks, and early access to every new platform integration.