Agent Connections API
Manage agent-to-agent connections.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/agents/{id}/agent-connections | List connections |
| POST | /api/agents/{id}/agent-connections | Create connection |
| GET | /api/agents/{id}/agent-connections/{connectionId} | Get connection |
| PUT | /api/agents/{id}/agent-connections/{connectionId} | Update connection |
List Connections
bash
GET /api/agents/{id}/agent-connectionsResponse
json
{
"connections": [
{
"id": "conn-123",
"source_agent_id": "agent-a",
"target_agent_id": "agent-b",
"connection_type": "webhook",
"config": {
"events": ["workflow.complete"]
},
"created_at": "2024-12-01T00:00:00Z"
}
]
}Create Connection
bash
POST /api/agents/{id}/agent-connections
Content-Type: application/jsonRequest Body
json
{
"target_agent_id": "agent-b",
"connection_type": "webhook",
"config": {
"url": "https://agent-b.example.com/webhook",
"events": ["workflow.complete", "message.received"]
}
}Get Connection
bash
GET /api/agents/{id}/agent-connections/{connectionId}Update Connection
bash
PUT /api/agents/{id}/agent-connections/{connectionId}Connection Types
| Type | Description |
|---|---|
webhook | HTTP POST events |
direct | Direct DO communication |
Event Types
| Event | Description |
|---|---|
workflow.complete | Workflow finished |
workflow.error | Workflow failed |
message.received | New message |
schedule.executed | Schedule ran |