Agent Execution
Execute agents via Server-Sent Events (SSE) streaming and manage conversation sessions.
Authentication
All execution endpoints support hybrid authentication:
| Method | Header |
|---|---|
| JWT | Authorization: Bearer <jwt> + x-tenant-id |
| API Key | X-Api-Key: YOUR_API_KEY |
POST /api/v2/agents/:agent_id/stream
Execute an agent with real-time SSE streaming.
Path Parameters:
| Param | Type | Description |
|---|---|---|
agent_id | UUID | Agent ID |
Request Body:
{
"message": "List active contracts",
"session_id": "uuid (optional)",
"attachments": [
{
"url": "https://example.com/image.png",
"type": "image"
}
],
"options": {
"temperature": 0.7,
"max_tokens": 4096
},
"metadata": {
"trace_id": "string",
"correlation_id": "string"
}
}
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | User message |
session_id | UUID | No | Session ID to maintain conversation context |
attachments | array | No | Multimodal files (see Media) |
options | object | No | Execution configuration |
metadata | object | No | Tracing metadata |