AgentArea API Reference
🔗 Base Information
- Base URL:
http://localhost:8000(development) - API Version: v1
- Content Type:
application/json - Authentication: Bearer token (see Auth Implementation)
📚 Interactive Documentation
Live API Documentation:http://localhost:8000/docs
The interactive Swagger/OpenAPI documentation provides:
- Real-time API testing
- Request/response examples
- Schema definitions
- Authentication testing
🚀 Quick Start
Health Check
Authentication
🤖 Agents API
List Agents
limit(query, optional): Number of results (default: 20, max: 100)offset(query, optional): Pagination offset (default: 0)type(query, optional): Filter by agent typestatus(query, optional): Filter by status (active,inactive,error)
Create Agent
Get Agent
Update Agent
Delete Agent
💬 Chat API
Send Message
Streaming Chat
Get Chat History
session_id(query, optional): Filter by sessionlimit(query, optional): Number of messages (default: 50)before(query, optional): Messages before timestamp
🔌 MCP Servers API
List MCP Servers
Create MCP Server
Get MCP Server
Update MCP Server
Delete MCP Server
MCP Server Actions
🔐 Authentication API
Login
Refresh Token
Logout
Get Current User
📊 Tasks API
Create Task
List Tasks
status(query, optional): Filter by status (pending,running,completed,failed)agent_id(query, optional): Filter by agentpriority(query, optional): Filter by priority (low,medium,high)
Get Task
Cancel Task
📁 Files API
Upload File
List Files
Get File
Download File
Delete File
📡 WebSocket API
Connection
Message Types
🚨 Error Handling
Error Response Format
Common Error Codes
| Code | Status | Description |
|---|---|---|
VALIDATION_ERROR | 400 | Invalid request data |
UNAUTHORIZED | 401 | Authentication required |
FORBIDDEN | 403 | Insufficient permissions |
NOT_FOUND | 404 | Resource not found |
CONFLICT | 409 | Resource already exists |
RATE_LIMITED | 429 | Too many requests |
INTERNAL_ERROR | 500 | Server error |
SERVICE_UNAVAILABLE | 503 | Service temporarily unavailable |
📊 Rate Limiting
- Default Limit: 100 requests per minute per user
- Burst Limit: 20 requests per second
- Headers:
X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset
🔧 SDK Examples
Python
JavaScript
📚 Additional Resources
- Interactive API Docs - Live testing interface
- Authentication Guide - Detailed auth implementation
- A2A Integration - Agent communication
- MCP Architecture - MCP system design
- Getting Started - Setup and first steps
API Reference last updated: January 2025 For the most current API documentation, always refer to the interactive docs at
/docs
