How the-school-of-ai/arcturus works
1. This is a monorepo for a local-first AI desktop platform. The main product is a desktop shell built with Electron + React/Vite (platform-frontend/) talking to a Python backend (api.py, routers/, core/). The repo also contains supporting services for mobile, voice, channel bridges, SDKs, and a public gateway API.
2. The primary user-facing boundary is the desktop client. platform-frontend/ owns the UX for Explorer, Forge, Apps, Runs, Graph, RAG, Echo, Scheduler, Admin/Watchtower, IDE, and Swarm. It renders the product surfaces and calls backend APIs, while some features also use Electron-specific bridges for local OS capabilities.
3. The backend application is organized around FastAPI route modules in routers/. Each router corresponds to a major feature area: chat, agents, canvas, studio, apps, graph, rag, voice, marketplace, sync, metrics, settings, admin, tests, and more. The routers are thin HTTP/SSE boundaries over the core services.
4. core/ is the orchestration and service layer. It contains the agent loop, registry, model selection, sandbox execution, prompt/tool schemas, query optimization, reasoning, persistence, profile loading, event bus, metrics aggregation, and preview generation. This is where most cross-cutting behavior lives and where route handlers delegate work.
5. Memory is a major subsystem with its own internal architecture. memory/ handles episodic memory, entity extraction, fact normalization, knowledge graph storage, retrieval, sync/merge policy, user identity, and backend adapters for vector stores and graph stores. The product’s “RemMe” and memory-aware planning features flow through this layer.
6. Retrieval and grounding are split from general memory. content/ provides page generation and section agents for structured research/content assembly, while core/gateway_services/search_service.py and related adapters connect the app to search, embeddings, and external oracle-like services. RAG is therefore not just a UI feature; it is a dedicated data pipeline with document ingestion, indexing, and source-backed answering.
7. Forge and Studio form the structured artifact pipeline. core/studio/ contains generators, validators, exporters, editors, and revision logic for documents, slides, and sheets. routers/studio.py and the frontend Forge workspace expose this as a preview/edit/export flow, turning model output into finished artifacts such as HTML/PDF/DOCX/XLSX decks and reports.
8. Apps and canvas provide a second materialization path: generated interactive UIs. apps/ stores many generated app definitions as ui.json, while core/ui_generator.py, core/schemas/, core/previews.py, and canvas-related modules create and validate UI schemas, runtime sandboxes, and websocket-driven previews. This is the “build tools inside the product” boundary.
9. Voice is a distinct runtime path. voice/ contains wake-word detection, STT, TTS, intent gating, dictation, and orchestration, with bridges to local audio models and services. The voice flow routes spoken input into the same agent/backend system rather than bypassing it, so Echo is a front door into the same orchestration layer.
10. External communication channels are abstracted under channels/ and bridge projects like signal_bridge/ and whatsapp_bridge/. These connect the platform to Slack, Teams, Telegram, WhatsApp, Discord, Matrix, Google Chat, iMessage, Signal, and web chat, feeding messages into the agent/message bus path and returning responses through channel-specific adapters.
11. Marketplace and skills add extensibility and supply-chain controls. marketplace/ handles skill packaging, installation, registry, trust, signing, moderation, integrity, and sandboxing, while core/skills/library/ contains the built-in skill catalog used by agents. The Bazaar flow is intentionally gated so skills can be published, inspected, and installed with policy checks.
12. Observability and governance are first-class. ops/ implements tracing, health checks, alerts, throttling, audit logs, semantic cache, and cost accounting. gateway_api/ exposes a separate public integration surface with auth, idempotency, rate limiting, usage governance, webhooks, connectors, and SDKs, making it the external API boundary distinct from the local desktop backend.
13. Persistence is mostly local and file-backed, with additional services where needed. The repo includes storage/, data/, memory/session_summaries_index/, data/conversation_history/, and Alembic migrations for relational state. Docker compose files and config under config/ indicate optional local infrastructure such as Qdrant and MongoDB.
14. The repository is heavily test-driven and release-gated. tests/ spans unit, integration, API, acceptance, automation, stress, SDK, and manual flows; GitHub Actions and ci/ enforce project gates. That means the architecture is not only feature-based but also operationally segmented by verifiable boundaries: product flows, public API contracts, memory sync, marketplace security, and observability.
Main entry points: loop.py Core loop · routers HTTP routers · core Core services · tests Verification
Components 20
Desktop platform
Electron + React user-facing product shell and local OS bridges.
- Desktop shell · Main local-first desktop client and feature workspace boundary.
platform-frontend - Electron bridge · Preload/main-process bridge for local capabilities and process integration.
platform-frontend/electron - Feature surfaces · Explorer, Forge, Apps, Runs, Graph, RAG, Echo, Scheduler, Admin, IDE, Swarm.
platform-frontend/src/features
Backend core
FastAPI app, orchestration, and feature routers.
- API app · Top-level Python application entrypoint wiring routes and shared services.
api.py - HTTP routers · Thin FastAPI boundaries for chat, agents, canvas, studio, apps, graph, rag, voice, admin, and more.
routers - Core loop · Main agent execution loop, registry, model selection, reasoning, and tool coordination.
core/loop.py - Core services · Persistence, event bus, profiles, metrics, sandboxing, scheduling, query optimization, and previews.
core - Canvas runtime · Schema validation, sandbox execution, websocket previews, and generated UI materialization.
canvas - Voice runtime · Wake-word, STT, intent gating, dictation, TTS, and spoken-agent routing.
voice
Knowledge systems
Memory, RAG, content assembly, and persistence layers.
- Studio pipeline · Structured document, slide, and sheet generation, validation, editing, revision, and export.
core/studio - Apps catalog · Stored app definitions and generated interactive UI artifacts.
apps - Memory stack · Episodic memory, entities, facts, normalization, sync/merge policy, and graph stores.
memory - RemMe layer · Soft identity, preferences, operating context, evidence logs, and belief updates.
remme - RAG pipeline · Search, embeddings, oracle/search adapters, document ingestion, indexing, and grounded answering.
content
External surfaces
Channels, mobile, public gateway API, and SDKs.
- Channels · Slack, Teams, Telegram, Discord, Matrix, Google Chat, iMessage, Signal, WhatsApp, and web chat adapters.
channels - Mobile client · Cross-platform mobile experience that syncs with the same backend and voice flows.
mobile - Public gateway · Separate integration surface with auth, idempotency, rate limiting, usage governance, connectors, and webhooks.
gateway_api
Ops and governance
Observability, safety, and marketplace controls.
- Bazaar · Skill packaging, installation, trust, signing, integrity, moderation, sandboxing, and registry.
marketplace - Ops layer · Tracing, health checks, alerts, audit logs, throttling, semantic cache, and cost accounting.
ops - Verification · Unit, integration, acceptance, SDK, automation, stress, and manual coverage for major flows.
tests
Connections 23
- Desktop shell → Electron bridge: uses · Desktop UI delegates local OS and process capabilities through Electron bridges.
- Desktop shell → Feature surfaces: renders · Feature modules implement the product surfaces shown in the desktop shell.
- Feature surfaces → HTTP routers: calls · UI surfaces drive backend actions through HTTP/SSE route handlers.
- API app → HTTP routers: mounts · Application entrypoint wires feature routers into the API.
- HTTP routers → Core loop: delegates · Execution-heavy requests flow from route handlers into orchestration.
- HTTP routers → Core services: delegates · Route modules rely on shared services for persistence, metrics, and previews.
- Core loop → Bazaar: loads skills · Agent execution can resolve and run marketplace or built-in skills.
- Core loop → Memory stack: reads/writes · Agent planning and response generation consult and update memory.
- Core loop → RemMe layer: uses · Identity and preference context shapes planning and behavior.
- Core services → Studio pipeline: orchestrates · Shared services invoke studio generation, revision, and export flows.
- Core services → Canvas runtime: materializes · Shared helpers create and preview generated UI schemas.
- Core services → RAG pipeline: grounds · Search and retrieval services feed source-backed answering and research.
- RAG pipeline → Memory stack: retrieves · RAG can draw from stored memories and indexed conversation history.
- Voice runtime → Core loop: routes to · Spoken commands enter the same agent/backend orchestration path.
- Channels → Core loop: feeds · External messages are normalized into the agent/message bus path.
- Mobile client → HTTP routers: syncs with · Mobile experience shares backend APIs and state synchronization.
- Public gateway → Core services: adapts · Public integration endpoints reuse core services for search, memory, studio, and usage.
- Public gateway → Ops layer: enforces · External API applies auth, rate limits, metering, and governance.
- Bazaar → Ops layer: governed by · Skill install and execution are constrained by trust and safety policy.
- Verification → Desktop shell: covers · Acceptance and UI tests exercise the desktop product surface.
- Verification → HTTP routers: covers · API and integration tests verify route contracts and flows.
- Verification → Memory stack: covers · Memory unit and integration tests validate extraction, sync, and retrieval.
- Verification → Public gateway: covers · Gateway contract tests verify the public integration boundary.