Agents API
Invoke and manage AI expert agents programmatically.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/agents | List available agents |
GET | /v1/agents/:name | Get agent details |
POST | /v1/agents/:name/invoke | Invoke an agent |
GET | /v1/agents/invocations | List invocations |
GET | /v1/agents/invocations/:id | Get invocation result |
List Agents
Loading code block...
Query Parameters
| Parameter | Type | Description |
|---|---|---|
category | string | Filter by category |
tier | string | Filter by tier requirement |
Example Request
Loading code block...
Response
Loading code block...
Get Agent Details
Loading code block...
Example Request
Loading code block...
Response
Loading code block...
Invoke Agent
Loading code block...
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Task or question |
context | object | No | Additional context |
options | object | No | Invocation options |
Context Object
| Field | Type | Description |
|---|---|---|
projectId | string | Project context |
files | array | Relevant file paths |
codebase | string | Codebase summary |
history | array | Previous messages |
Options Object
| Field | Type | Description |
|---|---|---|
stream | boolean | Stream response |
maxTokens | integer | Max response tokens |
temperature | number | Response creativity (0-1) |
timeout | integer | Timeout in ms |
Example Request
Loading code block...
Response
Loading code block...
Streaming Response
For streaming responses:
Loading code block...
Response (Server-Sent Events):
data: {"type":"start","id":"inv_xyz789"}
data: {"type":"content","delta":"Here's a"}
data: {"type":"content","delta":" responsive"}
data: {"type":"content","delta":" pricing table..."}
data: {"type":"done","usage":{"totalTokens":1700}}
List Invocations
Loading code block...
Query Parameters
| Parameter | Type | Description |
|---|---|---|
agent | string | Filter by agent name |
status | string | Filter by status |
start | string | Start timestamp |
end | string | End timestamp |
limit | integer | Max results |
Example Request
Loading code block...
Response
Loading code block...
Get Invocation
Loading code block...
Example Request
Loading code block...
Response
Returns full invocation details including the response content.
SDK Usage
JavaScript/TypeScript
Loading code block...
Python
Loading code block...
Agent Categories
| Category | Agents |
|---|---|
development | frontend-expert, backend-expert, database-expert, api-expert |
quality | testing-expert, security-expert, performance-expert, code-review-expert |
architecture | architecture-expert, devops-expert, cloud-expert |
business | business-strategy-expert, fundraising-expert, growth-expert |
design | ui-ux-expert, branding-expert |
Rate Limits
| Plan | Invocations/Hour | Concurrent |
|---|---|---|
| Free | 10 | 1 |
| Pro | 100 | 5 |
| Team | 500 | 20 |
| Enterprise | Custom | Custom |
Errors
| Code | Description |
|---|---|
agent_not_found | Unknown agent name |
invocation_failed | Agent invocation error |
rate_limit_exceeded | Too many invocations |
context_too_large | Context exceeds limits |
timeout | Invocation timed out |