API Reference
The Xagent API provides programmatic access to all platform capabilities.Base URL
Authentication
Most API endpoints require authentication using a Bearer token:Interactive Documentation
For interactive API documentation with request/response examples, visit:- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
Available APIs
Authentication
User authentication and token management
Agents
Create and manage AI agents
Tasks
Submit and monitor task executions
Files
Upload and manage task files
Knowledge Base
Manage document collections
Memory
Agent memory and learning
Models
Configure and use LLM models
Tools
Available agent tools
Skills
Agent skill management
Templates
Agent templates
MCP
MCP server management
Text2SQL
Database query generation
Quick Start
Login
Create an Agent
Submit a Task
Rate Limits
API calls may be rate limited. Check response headers for limit information:Error Handling
Errors follow standard HTTP status codes:- 200 - Success
- 400 - Bad Request
- 401 - Unauthorized
- 422 - Validation Error
- 500 - Server Error