Skip to main content

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​

FieldTypeDescription
idstringInternal database ID
task_idstringCelery task ID
crew_namestringName of the crew configuration used
statusstringCurrent status of the run
promptstringThe original prompt
started_atdatetimeWhen the run started
completed_atdatetimeWhen the run finished
cost_usdfloatEstimated token cost in USD

CrewRunDetail (extends CrewRunSummary)​

FieldTypeDescription
resultdictThe final output of the crew
eventslistFull ordered list of event frames