Version: v1 (planned) Base URL:
https://<autobot-host>:8443/api/v1Current internal base:https://<autobot-host>:8443/api
This document defines the public REST API surface for external developers.
All endpoints listed here are candidates for the stable /api/v1/ namespace.
Internal, admin-only, and MCP bridge endpoints are excluded.
- Authentication
- Rate Limiting
- Error Format
- Chat
- Knowledge Base
- Agents
- Workflows
- Models and LLM
- Voice
- Multimodal
- System
All API requests require a valid JWT token.
This API (the main backend) does not accept user API keys; send a JWT as below (#16294, owner ruling 2026-09-18). A user API key is an SLM credential, sent as X-API-Key, and the SLM accepts it only on routes that declare a key permission (autobot-slm-backend/services/api_key_routes.py). That list is currently empty. A key sent anywhere else is refused with 403.
Obtain a JWT token via the login endpoint, then pass it in subsequent requests:
Authorization: Bearer <jwt-token>
Authenticate and receive a JWT token.
Request:
{
"username": "string",
"password": "string"
}Response (200):
{
"success": true,
"message": "Login successful",
"token": "eyJhbGciOiJIUzI1NiIs...",
"session_id": "sess_abc123",
"user": {
"username": "string",
"user_id": "string",
"role": "string",
"email": "string",
"last_login": "2026-03-15T12:00:00Z"
}
}Invalidate the current session.
Headers: Authorization: Bearer <token>
Response (200):
{
"success": true,
"message": "Logged out successfully"
}Get current user information.
Headers: Authorization: Bearer <token>
Response (200):
{
"username": "string",
"role": "string",
"permissions": ["string"]
}Refresh an expiring JWT token.
Headers: Authorization: Bearer <token>
Response (200):
{
"success": true,
"token": "eyJhbGciOiJIUzI1NiIs...",
"expiresIn": 3600
}All API endpoints enforce rate limiting. Limits are communicated via response headers:
| Header | Description |
|---|---|
X-RateLimit-Limit |
Maximum requests per window |
X-RateLimit-Remaining |
Requests remaining in current window |
X-RateLimit-Reset |
Unix timestamp when the window resets |
Retry-After |
Seconds to wait (only on 429 responses) |
Default limits (planned for v1):
| Tier | Requests/minute | Burst |
|---|---|---|
| Free | 60 | 10 |
| Standard | 300 | 50 |
| Enterprise | 1000 | 200 |
When rate-limited, the API returns HTTP 429:
{
"error": "rate_limit_exceeded",
"message": "Too many requests. Retry after 12 seconds.",
"retry_after": 12
}All error responses follow a consistent format:
{
"success": false,
"error": "error_code",
"message": "Human-readable description",
"details": {}
}Standard HTTP Status Codes:
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request -- malformed input |
| 401 | Unauthorized -- missing or invalid credentials |
| 403 | Forbidden -- insufficient permissions |
| 404 | Not Found |
| 409 | Conflict -- resource already exists |
| 422 | Validation Error -- input failed validation |
| 429 | Rate Limited |
| 500 | Internal Server Error |
Chat endpoints manage conversational sessions and message exchange with AI models.
Internal prefix: /api (chat router registered with empty prefix)
Send a message and receive a response.
Headers: Authorization: Bearer <token>
Request:
{
"content": "How do I configure network scanning?",
"role": "user",
"session_id": "optional-session-id",
"model": "optional-model-name",
"use_knowledge_base": true,
"context_window": 10
}Response (200):
{
"success": true,
"response": "To configure network scanning, you can...",
"session_id": "chat_abc123",
"message_id": "msg_xyz789",
"metadata": {
"model": "gpt-4-turbo",
"tokens_used": 245,
"knowledge_base_used": true
}
}Send a message and receive a streaming response (Server-Sent Events).
Headers: Authorization: Bearer <token>, Accept: text/event-stream
Request: Same as POST /chat.
Response: SSE stream with events:
data: {"type": "token", "content": "To "}
data: {"type": "token", "content": "configure "}
data: {"type": "token", "content": "network..."}
data: {"type": "done", "message_id": "msg_xyz789", "metadata": {...}}
List chat sessions for the authenticated user.
Headers: Authorization: Bearer <token>
Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
limit |
int | 50 | Maximum sessions to return |
offset |
int | 0 | Pagination offset |
Response (200):
{
"success": true,
"sessions": [
{
"session_id": "chat_abc123",
"title": "Network scanning discussion",
"created_at": "2026-03-15T10:30:00Z",
"updated_at": "2026-03-15T11:00:00Z",
"message_count": 12
}
],
"total": 42
}Create a new chat session.
Headers: Authorization: Bearer <token>
Request:
{
"title": "New conversation",
"model": "gpt-4-turbo"
}Response (201):
{
"success": true,
"session_id": "chat_abc123",
"title": "New conversation",
"created_at": "2026-03-15T10:30:00Z"
}Get a specific chat session with its message history.
Headers: Authorization: Bearer <token>
Response (200):
{
"success": true,
"session": {
"session_id": "chat_abc123",
"title": "Network scanning discussion",
"messages": [
{
"message_id": "msg_001",
"role": "user",
"content": "How do I scan a network?",
"timestamp": "2026-03-15T10:30:00Z"
},
{
"message_id": "msg_002",
"role": "assistant",
"content": "You can use nmap to scan...",
"timestamp": "2026-03-15T10:30:05Z"
}
]
}
}Send a message to an existing chat session.
Headers: Authorization: Bearer <token>
Request:
{
"content": "Tell me more about nmap flags",
"role": "user"
}Response (200): Same format as POST /chat.
Delete a chat session.
Headers: Authorization: Bearer <token>
Response (200):
{
"success": true,
"message": "Chat session deleted"
}Export a chat session.
Headers: Authorization: Bearer <token>
Response (200):
{
"success": true,
"export": {
"session_id": "chat_abc123",
"format": "json",
"messages": [...],
"exported_at": "2026-03-15T12:00:00Z"
}
}Endpoints for managing documents, facts, and collections in the knowledge base.
Internal prefix: /api/knowledge_base
Add text content to the knowledge base.
Headers: Authorization: Bearer <token>
Request:
{
"content": "AutoBot supports NPU acceleration for inference workloads.",
"title": "NPU Acceleration",
"source": "Technical Documentation",
"category": "general",
"tags": ["npu", "acceleration", "hardware"]
}Response (201):
{
"success": true,
"fact_id": "fact_abc123",
"message": "Content added to knowledge base"
}Upload a document file to the knowledge base.
Headers: Authorization: Bearer <token>, Content-Type: multipart/form-data
Form Fields:
| Field | Type | Required | Description |
|---|---|---|---|
file |
file | yes | Document file (PDF, TXT, MD, DOCX) |
category |
string | no | Category for the document |
tags |
string | no | Comma-separated tags |
Response (200):
{
"success": true,
"document_id": "doc_abc123",
"filename": "architecture.pdf",
"chunks_created": 15,
"message": "Document uploaded and indexed"
}Add content from a URL.
Headers: Authorization: Bearer <token>
Request:
{
"url": "https://example.com/article",
"title": "External Article",
"method": "fetch",
"category": "web",
"tags": ["external", "reference"]
}Response (200):
{
"success": true,
"message": "URL content added to knowledge base"
}Query the knowledge base using natural language.
Headers: Authorization: Bearer <token>
Request:
{
"query": "How does NPU acceleration work?",
"top_k": 5,
"category": "general",
"min_confidence": 0.7
}Response (200):
{
"success": true,
"results": [
{
"content": "AutoBot supports NPU acceleration...",
"score": 0.95,
"source": "Technical Documentation",
"category": "general",
"metadata": {}
}
],
"query_time_ms": 45
}Search the knowledge base with advanced options.
Headers: Authorization: Bearer <token>
Request:
{
"query": "network security tools",
"search_type": "hybrid",
"top_k": 10,
"filters": {
"categories": ["security", "tools"],
"tags": ["network"]
}
}Response (200):
{
"success": true,
"results": [...],
"total": 42,
"search_type": "hybrid",
"query_time_ms": 78
}List knowledge base entries.
Headers: Authorization: Bearer <token>
Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
limit |
int | 50 | Maximum entries to return |
offset |
int | 0 | Pagination offset |
category |
string | - | Filter by category |
Response (200):
{
"success": true,
"entries": [...],
"total": 150
}Get knowledge base statistics.
Headers: Authorization: Bearer <token>
Response (200):
{
"success": true,
"stats": {
"total_facts": 1500,
"total_documents": 85,
"categories": {"general": 500, "security": 300, "tools": 200},
"storage_size_mb": 42.5
}
}List available categories.
Headers: Authorization: Bearer <token>
Response (200):
{
"success": true,
"categories": [
{"name": "general", "count": 500},
{"name": "security", "count": 300}
]
}Collections group related facts for organized access.
Create a new collection.
Request:
{
"name": "Security Playbooks",
"description": "Collection of security automation playbooks"
}List all collections.
Get a specific collection with its facts.
Update a collection.
Delete a collection.
Add facts to a collection.
List facts in a collection.
Endpoints for managing and invoking AI agents.
Internal prefix: /api/agent
List all available agents and their capabilities.
Headers: Authorization: Bearer <token>
Response (200):
{
"success": true,
"agents": [
{
"name": "rag",
"description": "Retrieval-Augmented Generation for document synthesis",
"capabilities": ["document_query", "reformulate_query", "analyze_documents"]
},
{
"name": "chat",
"description": "Conversational interactions with context awareness",
"capabilities": ["natural_conversation", "context_retention"]
},
{
"name": "research",
"description": "Comprehensive research and analysis",
"capabilities": ["research_queries", "source_analysis", "report_generation"]
},
{
"name": "web_research_assistant",
"description": "Web-based research and content analysis",
"capabilities": ["web_search", "content_extraction", "source_validation"]
},
{
"name": "knowledge_extraction",
"description": "Structured knowledge extraction from content",
"capabilities": ["entity_extraction", "relationship_mapping"]
}
]
}Get the status of all active agents.
Headers: Authorization: Bearer <token>
Response (200):
{
"success": true,
"agents": {
"rag": {"status": "idle", "last_active": "2026-03-15T10:30:00Z"},
"research": {"status": "busy", "current_task": "task_abc123"}
}
}Execute an agent goal.
Headers: Authorization: Bearer <token>
Request:
{
"goal": "Research the latest network security vulnerabilities",
"agent": "research",
"parameters": {
"depth": "comprehensive",
"sources": ["web", "knowledge_base"]
}
}Response (200):
{
"success": true,
"task_id": "task_abc123",
"status": "running",
"agent": "research",
"message": "Goal execution started"
}Execute an enhanced agent goal with AI Stack integration.
Headers: Authorization: Bearer <token>
Request:
{
"goal": "Analyze codebase for security vulnerabilities",
"agent": "research",
"use_ai_stack": true,
"parameters": {}
}Coordinate multiple agents on a complex task.
Headers: Authorization: Bearer <token>
Request:
{
"task": "Research and document network scanning tools",
"agents": ["research", "rag", "knowledge_extraction"],
"coordination_mode": "sequential"
}Response (200):
{
"success": true,
"coordination_id": "coord_abc123",
"status": "running",
"agents_involved": ["research", "rag", "knowledge_extraction"]
}Run a comprehensive research task.
Headers: Authorization: Bearer <token>
Request:
{
"query": "Latest developments in NPU-accelerated AI inference",
"depth": "comprehensive"
}Pause a running agent task.
Request:
{
"task_id": "task_abc123"
}Resume a paused agent task.
Request:
{
"task_id": "task_abc123"
}Endpoints for multi-agent workflow orchestration.
Internal prefix: /api/workflow
Trigger a new workflow execution.
Headers: Authorization: Bearer <token>
Request:
{
"workflow_type": "research_and_document",
"parameters": {
"topic": "Network security scanning",
"output_format": "report"
}
}Response (200):
{
"success": true,
"workflow_id": "wf_abc123",
"status": "running",
"steps": [
{"step": 1, "agent": "research", "action": "Research tools", "status": "pending"},
{"step": 2, "agent": "librarian", "action": "Search Knowledge Base", "status": "pending"},
{"step": 3, "agent": "orchestrator", "action": "Compile report", "status": "pending"}
]
}List all workflows.
Headers: Authorization: Bearer <token>
Response (200):
{
"success": true,
"workflows": [
{
"workflow_id": "wf_abc123",
"type": "research_and_document",
"status": "completed",
"created_at": "2026-03-15T10:00:00Z",
"completed_at": "2026-03-15T10:05:00Z"
}
]
}Get details of a specific workflow.
Headers: Authorization: Bearer <token>
Response (200):
{
"success": true,
"workflow": {
"workflow_id": "wf_abc123",
"type": "research_and_document",
"status": "running",
"progress": 0.66,
"steps": [
{"step": 1, "agent": "research", "status": "completed", "result": "..."},
{"step": 2, "agent": "librarian", "status": "running"},
{"step": 3, "agent": "orchestrator", "status": "pending"}
]
}
}Get the current status of a workflow.
Headers: Authorization: Bearer <token>
Response (200):
{
"success": true,
"workflow_id": "wf_abc123",
"status": "running",
"progress": 0.66,
"current_step": 2,
"total_steps": 3
}Approve a pending workflow step (for workflows requiring human approval).
Headers: Authorization: Bearer <token>
Request:
{
"step_id": 2,
"approved": true,
"comment": "Approved for execution"
}List pending approval requests for a workflow.
Cancel and delete a workflow.
Endpoints for managing LLM providers and model configuration.
Internal prefix: /api/llm
List available language models.
Headers: Authorization: Bearer <token>
Response (200):
{
"success": true,
"models": [
{
"name": "gpt-4-turbo",
"provider": "openai",
"type": "chat",
"context_window": 128000,
"available": true
},
{
"name": "claude-3-opus",
"provider": "anthropic",
"type": "chat",
"context_window": 200000,
"available": true
}
]
}Get the active model name and provider. Any authenticated user. The full LLM configuration is not returned here; it is available only through the admin-only GET /llm/config (#18193).
Headers: Authorization: Bearer <token>
Response (200):
{
"model": "qwen3.5:9b",
"provider": "ollama"
}Get the LLM configuration, with credentials and URL passwords redacted. Admin only (#18193): non-admin callers receive 403.
Headers: Authorization: Bearer <token>
Update LLM configuration.
Headers: Authorization: Bearer <token>
Request:
{
"model": "claude-3-opus",
"provider": "anthropic",
"temperature": 0.7,
"max_tokens": 4096
}Get LLM provider connection status.
Headers: Authorization: Bearer <token>
Response (200):
{
"success": true,
"providers": {
"openai": {"status": "connected", "latency_ms": 120},
"anthropic": {"status": "connected", "latency_ms": 95}
}
}Get health status of all configured LLM providers.
List available embedding models.
Endpoints for voice processing (text-to-speech and speech-to-text).
Internal prefix: /api/voice
Transcribe audio to text.
Headers: Authorization: Bearer <token>, Content-Type: multipart/form-data
Form Fields:
| Field | Type | Required | Description |
|---|---|---|---|
audio |
file | yes | Audio file (WAV, MP3, OGG) |
language |
string | no | Language code (e.g., "en") |
Convert text to speech audio.
Headers: Authorization: Bearer <token>
Request:
{
"text": "Hello, this is AutoBot speaking.",
"voice": "default",
"format": "wav"
}Endpoints for multi-modal AI processing (text, image, audio).
Internal prefix: /api/multimodal
Process an image with AI analysis.
Headers: Authorization: Bearer <token>
Request: multipart/form-data with image file, or JSON with base64-encoded image.
Process audio with AI analysis.
Process text with multi-modal context.
Search across modalities (text, image, audio).
Get multi-modal processing statistics.
Health check for multi-modal subsystem.
System-level endpoints for health checking and diagnostics.
Internal prefix: /api/system
Health check endpoint.
Response (200):
{
"status": "healthy",
"version": "2.x.x",
"uptime_seconds": 86400,
"components": {
"database": "healthy",
"redis": "healthy",
"llm": "healthy",
"knowledge_base": "healthy"
}
}Get system information.
Headers: Authorization: Bearer <token>
Endpoints returning lists support pagination via query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
limit |
int | 50 | Items per page (max 100) |
offset |
int | 0 | Number of items to skip |
Response includes total count for client-side pagination:
{
"success": true,
"data": [...],
"total": 150,
"limit": 50,
"offset": 0
}AutoBot also provides WebSocket endpoints for real-time communication:
/api/ws/chat-- Real-time chat with streaming responses/api/ws/voice-- Real-time voice streaming/api/ws/terminal-- Terminal session streaming
WebSocket connections require the JWT token as a query parameter:
wss://<autobot-host>:8443/api/ws/chat?token=<jwt-token>
- Content-Type: Always send
Content-Type: application/jsonfor JSON payloads - File uploads: Use
Content-Type: multipart/form-datafor file upload endpoints - Streaming: Use SSE (Server-Sent Events) for streaming endpoints -- the
Accept: text/event-streamheader is recommended - Idempotency: POST requests that create resources should include a client-generated
request_idfor idempotency - Timeouts: Recommended client timeout of 30 seconds for standard requests, 120 seconds for streaming and workflow endpoints