Agent Crew API
The Agent Crew API provides endpoints for kicking off multi-agent "crews", monitoring their progress, and retrieving historical run data.
Endpoints
Run a Crew
POST /agents/crew/run
Dispatches a new agent crew task.
Request Body:
prompt(string, required): The research prompt for the crew.session_id(string, optional): A unique identifier for the chat session.config_path(string, optional): Path to a specific agent configuration YAML.
Response (TaskAccepted):
task_id(string): The Celery task ID for the background run.stream_url(string): The URL for the WebSocket event stream.
List Crew Runs
GET /agents/crews
Lists historical crew runs.
Query Parameters:
limit(integer, default: 50): Number of runs to return.status(string, optional): Filter by run status (e.g.,PENDING,STARTED,SUCCESS,FAILURE).
Response:
A list of CrewRunSummary objects.
Get Crew Run Detail
GET /agents/crews/{task_id}
Retrieves detailed information and cached events for a specific crew run.
Response:
A CrewRunDetail object containing the run summary, result, and event log.
Get Crew Events
GET /agents/crews/{task_id}/events
Returns an ordered stream of event frames for the task.
Query Parameters:
limit(integer, default: 200): Number of recent events to return.
List Agent Tools
GET /agents/tools
Returns a registry of all available tools that agents can use, including their schemas and documentation.
Schemas
CrewRunSummary
| Field | Type | Description |
|---|---|---|
id | string | Internal database ID |
task_id | string | Celery task ID |
crew_name | string | Name of the crew configuration used |
status | string | Current status of the run |
prompt | string | The original prompt |
started_at | datetime | When the run started |
completed_at | datetime | When the run finished |
cost_usd | float | Estimated token cost in USD |
CrewRunDetail (extends CrewRunSummary)
| Field | Type | Description |
|---|---|---|
result | dict | The final output of the crew |
events | list | Full ordered list of event frames |