REST API
VibeX provides a comprehensive REST API for managing agents, tasks, and real-time communication. The API server can be started with:
uv run start --port 7770API Documentation
The VibeX server provides interactive API documentation through two interfaces:
- REST API Explorer - Interactive documentation with ReDoc/Swagger UI
- OpenAPI Specification - Available at
http://localhost:7770/openapi.json
Base URL
http://localhost:7770Authentication
If user authentication is enabled, include the user_id parameter in your requests:
curl "http://localhost:7770/tasks?user_id=your_user_id"Key Endpoints
Task Management
POST /tasks- Create a new taskGET /tasks- List all tasksGET /tasks/{task_id}- Get task detailsDELETE /tasks/{task_id}- Delete a task
Chat & Conversation
GET /tasks/{task_id}/chat- Get chat historyPOST /tasks/{task_id}/chat- Send a messageDELETE /tasks/{task_id}/chat- Clear chat history
Artifacts & Logs
GET /tasks/{task_id}/artifacts- List task artifactsGET /tasks/{task_id}/artifacts/{path}- Get artifact contentGET /tasks/{task_id}/logs- Get execution logs
Real-time Streaming
GET /tasks/{task_id}/stream- Server-sent events for real-time updates
Memory Management
POST /tasks/{task_id}/memory- Add to task memoryGET /tasks/{task_id}/memory- Search task memoryDELETE /tasks/{task_id}/memory- Clear task memory
Example Usage
Creating a Task
curl -X POST "http://localhost:7770/tasks" \
-H "Content-Type: application/json" \
-d '{
"config_path": "examples/simple_writer/config/team.yaml",
"task_description": "Write a blog post about AI",
"user_id": "optional_user_id"
}'Streaming Task Events
const eventSource = new EventSource(
"http://localhost:7770/tasks/TASK_ID/stream"
);
eventSource.addEventListener("agent_message", (event) => {
const data = JSON.parse(event.data);
console.log("Agent message:", data);
});
eventSource.addEventListener("task_update", (event) => {
const data = JSON.parse(event.data);
console.log("Task status:", data.status);
});Response Formats
All responses are in JSON format. Successful responses include the requested data, while errors follow this format:
{
"detail": "Error message description"
}Rate Limiting
The API does not currently enforce rate limits, but this may change in future versions. Design your applications to handle potential rate limiting responses.
CORS
The API server enables CORS by default, allowing requests from any origin. In production, you should configure this appropriately for your security requirements.
Common Issues
Server Not Running
If you receive connection errors, ensure the VibeX server is running:
uv run start --port 7770Port Conflicts
If port 7770 is already in use, you can specify a different port:
uv run start --port 7771Missing Dependencies
Ensure all dependencies are installed:
uv syncSDK Integration
For Python applications, use the VibeX SDK instead of calling the REST API directly. The SDK provides a more convenient and type-safe interface.
Further Reading
- SDK Reference - For programmatic access from Python
- Server Architecture - Understanding the server design
- Getting Started - Quick start guide