Complete reference for all AgentBuilder API endpoints.
Base URL: http://localhost:8000/api/v1
GET /agentsQuery Parameters:
| Param | Type | Description |
|---|---|---|
| status | string | Filter by status (active, inactive) |
| page | int | Page number (default: 1) |
| per_page | int | Items per page (default: 20, max: 100) |
Response:
{
"agents": [...],
"total": 42,
"page": 1,
"per_page": 20
}POST /agentsBody:
{
"name": "Research Agent",
"role": "Research Specialist",
"goal": "Find and analyze information",
"instructions": "Search the web thoroughly...",
"model": "gpt-4",
"temperature": 0.7,
"tools": ["web_search", "text_summarizer"],
"memory_type": "session"
}Required Fields: name, role
Response: 201 Created
{
"id": "agent_abc123",
"name": "Research Agent",
...
}GET /agents/{agent_id}Response: 200 OK
{
"id": "agent_abc123",
"name": "Research Agent",
"role": "Research Specialist",
"model": "gpt-4",
...
}PUT /agents/{agent_id}Body: (partial update allowed)
{
"temperature": 0.5,
"tools": ["web_search"]
}DELETE /agents/{agent_id}Response: 200 OK
{"message": "Agent deleted successfully"}POST /agents/{agent_id}/executeBody:
{
"input": {
"query": "Research AI browser automation"
}
}Response: 200 OK
{
"id": "exec_xyz789",
"status": "completed",
"output_data": {
"result": {...},
"raw_response": "...",
"provider": "openai",
"model": "gpt-4"
},
"token_usage": {
"input_tokens": 450,
"output_tokens": 380,
"total_tokens": 830
},
"duration_ms": 3420,
"steps": [...],
"logs": [...]
}GET /knowledge/{agent_id}Returns the list of sources for an agent.
POST /knowledge/{agent_id}/uploadBody: multipart/form-data
file: The document (PDF, DOCX, TXT)name: (Optional) Display name
POST /knowledge/{agent_id}/textBody:
{
"name": "Quick Fact",
"content": "The office is closed on Bank Holidays."
}DELETE /knowledge/{agent_id}/{source_id}GET /workflowsPOST /workflowsBody:
{
"name": "Research Pipeline",
"description": "Multi-agent research workflow",
"coordination_strategy": "sequential",
"agents": ["agent_1", "agent_2", "agent_3"]
}Coordination Strategies:
sequential- Run agents in ordersupervisor- First agent coordinatespeer- Run all in parallelconditional- Branch based on conditions
POST /workflows/{workflow_id}/executeBody:
{
"input": {
"task": "Analyze the AI market"
}
}GET /toolsQuery Parameters:
| Param | Type | Description |
|---|---|---|
| category | string | Filter by category |
| include_builtin | bool | Include built-in tools (default: true) |
Response:
{
"tools": [
{
"id": "tool_web_search",
"name": "web_search",
"description": "Search the web for information",
"category": "web",
"is_builtin": true,
"input_schema": {
"type": "object",
"properties": {
"query": {"type": "string"}
}
}
}
]
}GET /tools/builtinReturns only system-provided tools.
GET /executionsQuery Parameters:
| Param | Type | Description |
|---|---|---|
| agent_id | string | Filter by agent |
| workflow_id | string | Filter by workflow |
| status | string | Filter by status |
GET /executions/{execution_id}Returns full execution with steps and logs.
POST /executions/{execution_id}/cancelOnly works for pending or running executions.
GET /executions/{execution_id}/logsQuery Parameters:
| Param | Type | Description |
|---|---|---|
| level | string | Filter by level (debug, info, warning, error) |
Pre-built agents for testing.
POST /demo/researchBody:
{
"topic": "AI browser automation",
"max_sources": 5
}POST /demo/automationBody:
{
"data": [{"name": "item1"}, {"name": "item2"}],
"task": "analyze"
}POST /demo/multi-agentBody:
{
"task": "Analyze the AI market",
"context": {}
}GET /healthResponse:
{
"status": "healthy",
"app": "AgentBuilder",
"version": "1.0.0"
}All errors follow this format:
{
"detail": "Error message here"
}Status Codes:
| Code | Meaning |
|---|---|
| 400 | Bad Request - Invalid input |
| 404 | Not Found - Resource doesn't exist |
| 422 | Validation Error - Check request body |
| 500 | Internal Error - Something broke |
List endpoints support pagination:
GET /agents?page=2&per_page=10Response includes:
{
"items": [...],
"total": 42,
"page": 2,
"per_page": 10
}Next: Development Guide โ