Team Channels
Team channels provide named pub/sub messaging between agents. Agents subscribe to channels they care about and receive broadcast messages — useful for incident coordination, status updates, and cross-team communication.
Creating a channel
bash
# Create a team channel
curl -X POST http://localhost:3000/team-channels \
-H "Authorization: Bearer ${JWT_TOKEN}" \
-H "Content-Type: application/json" \
-d '{ "name": "incident-response", "description": "Real-time incident coordination" }'
# Response (201 Created)
{
"id": "ch_abc123",
"workspaceId": "ws_abc123",
"name": "incident-response",
"description": "Real-time incident coordination",
"subscribers": [],
"messageCount": 0,
"createdAt": "2026-03-07T12:00:00.000Z"
}Subscribing agents
bash
# Subscribe an agent to a channel
curl -X POST http://localhost:3000/team-channels/ch_abc123/subscribe \
-H "Authorization: Bearer ${JWT_TOKEN}" \
-H "Content-Type: application/json" \
-d '{ "agentId": "ops-agent" }'
# Unsubscribe
curl -X POST http://localhost:3000/team-channels/ch_abc123/unsubscribe \
-H "Authorization: Bearer ${JWT_TOKEN}" \
-H "Content-Type: application/json" \
-d '{ "agentId": "ops-agent" }'Broadcasting messages
Messages can include arbitrary metadata. The since parameter filters messages by timestamp.
bash
# Broadcast a message to all channel subscribers
curl -X POST http://localhost:3000/team-channels/ch_abc123/messages \
-H "Authorization: Bearer ${JWT_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"agentId": "monitor-agent",
"message": "CPU usage exceeded 90% on prod-3",
"metadata": { "severity": "high", "host": "prod-3" }
}'
# Get recent messages (default limit: 50, max: 200)
curl "http://localhost:3000/team-channels/ch_abc123/messages?limit=20" \
-H "Authorization: Bearer ${JWT_TOKEN}"Endpoint reference
| Method | Endpoint | Description |
|---|---|---|
POST | /team-channels | Create channel |
GET | /team-channels | List channels |
GET | /team-channels/:id | Get channel details |
DELETE | /team-channels/:id | Delete channel |
POST | /team-channels/:id/subscribe | Subscribe agent |
POST | /team-channels/:id/unsubscribe | Unsubscribe agent |
POST | /team-channels/:id/messages | Broadcast message |
GET | /team-channels/:id/messages | Get messages (limit default 50, max 200) |