src/main.py mounts routers under the /api/v1 prefix unless a route documents otherwise.
Domains and modules
| Domain | src/apis/ modules | Typical concerns |
|---|---|---|
| Auth and identity | auth, users, organizations | Token validation, org membership |
| Messaging | messages, conversations, channels, websocket | REST and real-time messaging |
| Tasks and work | tasks, dashboard, attendance, workdays, scheduled_messages, task_dependencies, message_dependencies, unread_counts | Learner workflows, delayed execution, and dependency-aware task orchestration |
| Simulation | simulation_admin, characters, agents, quick_help, heartbeat, business_hours | Settings, characters, voice sessions, heartbeat processing, and lifecycle windows |
| AI usage and pricing | ai_usage | Org pricing CRUD, usage summaries, trends, platform rollups |
| Operations | analytics, revenue, system_health, audit_logs, admin_overview, autogen_logs, token_usage, admin_fix | Platform visibility, runtime diagnostics, and remediation utilities |
| Onboarding | onboarding | Extended onboarding profile and setup flows |
OpenAPI quality
The docs API reference tab uses the public OpenAPI bundle (docs/api-reference/openapi.public.json); the repository also keeps a full export (openapi.json). When you add or change routes:
- Set
tagsonAPIRouteror individual operations so the explorer groups endpoints logically. - Add
summaryanddescriptionfor anything external or partner-facing.
WebSockets
Real-time features (for example typing indicators or notifications) use handlers such assrc/apis/websocket.py. Coordinate payload changes with frontend callers and any contract tests.
For detailed AI accounting endpoint behavior, see AI usage and cost tracking.