Frontend and API
The Next.js app calls the FastAPI backend over HTTPS (or your chosen transport) using a configured base URL. Real-time behavior uses WebSockets where the product implements them. Cross-origin browser policy and session headers are configured in application settings (see the repository for specifics).Behind-the-scenes architecture flow
API and agents
Agent runs are tied to organization and request context. Routing, tools, and multi-agent behavior live undersrc/core/autogen/. Character defaults come from YAML specs (for example under src/core/specs/); runtime behavior also depends on simulation settings in MongoDB.
Agents and storage
| Store | Responsibility |
|---|---|
| MongoDB | Source of truth for users, organizations, messages, tasks, simulation settings, and audit-oriented records. |
| Qdrant | Vector search for org knowledge and related retrieval (src/memory/org_knowledge_qdrant.py and helpers). |
| mem0 | Optional higher-level conversational memory (src/memory/mem0.py); surfaced on /health when enabled. |
Background processing
Task scheduling (src/core/scheduler.py), heartbeat tasks, and simulation features (channel chatter, storyline, and similar) are wired from src/main.py and related modules. When you add automation, document what triggers it, idempotency, and failure behavior.
Degradation and health
Startup checks andGET /health report MongoDB, Qdrant, mem0, and configuration state. When an optional backend is down, behavior is feature-specific; prefer explicit fallbacks and document them on the relevant flow as behavior stabilizes.