Architecture
API Layer
The API Layer provides RESTful endpoints built on the Mjara API framework. All endpoints follow the pattern:
/api/method/arif_ai.api.{endpoint}Modules
| Module | Purpose |
|---|---|
chat.py | Core chat endpoints with context auto-summarization |
conversations.py | Conversation CRUD and history management |
tools.py | Tool discovery, execution, and invocation |
onboarding.py | Onboarding workflow management |
confirmations.py | Human-in-the-loop confirmation handling |
streaming.py | Real-time SSE streaming |
settings.py | Configuration management |
files.py | File attachment handling |
Authentication
| Method | Description |
|---|---|
| Session Auth | Automatic for logged-in users |
| API Key | user@example.com:api_secret |
| Bearer Token | Optional JWT support |
Rate Limiting
- Chat & Conversations: 100 requests/minute
- Tool Executions: 50 requests/minute
Rate limit headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
Response Format
All endpoints return a standard structure:
{
"message": {
"success": true,
"data": {},
"tokens_used": {
"input": 150,
"output": 50,
"total": 200
}
}
}For full endpoint documentation, see the API Reference.