Agents API

Invoke and manage AI expert agents programmatically.

Endpoints#

MethodEndpointDescription
GET/v1/agentsList available agents
GET/v1/agents/:nameGet agent details
POST/v1/agents/:name/invokeInvoke an agent
GET/v1/agents/invocationsList invocations
GET/v1/agents/invocations/:idGet invocation result

List Agents#

Loading code block...

Query Parameters#

ParameterTypeDescription
categorystringFilter by category
tierstringFilter 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#

FieldTypeRequiredDescription
promptstringYesTask or question
contextobjectNoAdditional context
optionsobjectNoInvocation options

Context Object#

FieldTypeDescription
projectIdstringProject context
filesarrayRelevant file paths
codebasestringCodebase summary
historyarrayPrevious messages

Options Object#

FieldTypeDescription
streambooleanStream response
maxTokensintegerMax response tokens
temperaturenumberResponse creativity (0-1)
timeoutintegerTimeout 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#

ParameterTypeDescription
agentstringFilter by agent name
statusstringFilter by status
startstringStart timestamp
endstringEnd timestamp
limitintegerMax 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#

CategoryAgents
developmentfrontend-expert, backend-expert, database-expert, api-expert
qualitytesting-expert, security-expert, performance-expert, code-review-expert
architecturearchitecture-expert, devops-expert, cloud-expert
businessbusiness-strategy-expert, fundraising-expert, growth-expert
designui-ux-expert, branding-expert

Rate Limits#

PlanInvocations/HourConcurrent
Free101
Pro1005
Team50020
EnterpriseCustomCustom

Errors#

CodeDescription
agent_not_foundUnknown agent name
invocation_failedAgent invocation error
rate_limit_exceededToo many invocations
context_too_largeContext exceeds limits
timeoutInvocation timed out