How phonsadboy/atrium-th works
ATRIUM is a local-first AI-company workspace: a user chats with an Executive, work can be routed to departments, and the system exposes tasks, artifacts, memory, and runtime status through its UI. The frontend communicates with the FastAPI service over REST and WebSocket; backend orchestration, persistence, providers, and tools support the workflow. The README also documents provider options, media capabilities, and local visual automation. Some backend wiring is unsampled, so uncertain links are omitted or marked unverified.
Main entry points: chat_tools.py Chat and tool flow · engine.py Company engine · repo.py Data repository · embeddings.py Embedding layer
Components 24
Workspace UI
- Workspace UI
ui/src/App.tsx - Company state client
ui/src/state/useCompany.ts - REST and WS client
ui/src/contract/ApiClient.ts
Backend Workflow
- FastAPI service
system/app/main.py - Company engine
system/app/engine.py - Chat and tool flow
system/app/chat_tools.py - Department routing
system/app/org/router.py - Task review scheduling
system/app/task_review.py - Company catalog
system/app/catalog.py - Thread identifiers
system/app/threads.py
Memory and Data
- Data repository
system/app/db/repo.py - Memory ledger
system/app/memory/ledger.py - Memory retrieval
system/app/memory/retrieval.py - Embedding layer
system/app/memory/embeddings.py
Providers and Tools
- Provider registry
system/app/provider/registry.py - ChatGPT OAuth
system/app/provider/chatgpt_oauth.py - Host automation
system/app/tools/host_bridge.py - Visual automation
system/app/tools/visual_bridge.py
Media and Operations
- File intake
system/app/file_intake.py - Image generation
system/app/image_generation.py - Video editing
system/app/video_editing.py
Other components
- Workspace user
- LLM providers
- Ollama or embedding API
Connections 25
- Workspace user → Workspace UI: uses
- Workspace UI → Company state client: renders state
- Company state client → REST and WS client: creates client
ui/src/state/useCompany.ts - REST and WS client → FastAPI service: REST and WS
- FastAPI service → Company engine: dispatches work
- Company engine → Chat and tool flow: runs chat tools
system/app/engine.py - Company engine → Department routing: routes departments
- Company engine → Task review scheduling: schedules reviews
system/app/engine.py - Company engine → Data repository: reads and writes
system/app/engine.py - Chat and tool flow → Data repository: reads and writes
system/app/chat_tools.py - Chat and tool flow → Company catalog: uses catalog
system/app/chat_tools.py - Chat and tool flow → Thread identifiers: uses identifiers
system/app/chat_tools.py - Data repository → Memory ledger: uses ledger
system/app/db/repo.py - Data repository → Embedding layer: uses embeddings
system/app/db/repo.py - Memory ledger → Embedding layer: creates vectors
system/app/memory/ledger.py - Memory retrieval → Embedding layer: uses embeddings
- Embedding layer → Ollama or embedding API: requests vectors
system/app/memory/embeddings.py - Chat and tool flow → Provider registry: uses provider layer
system/app/chat_tools.py - Provider registry → LLM providers: calls models
- ChatGPT OAuth → LLM providers: authenticates account
- Chat and tool flow → Host automation: dispatches tools
system/app/chat_tools.py - Host automation → Visual automation: uses visual helpers
system/app/tools/host_bridge.py - Chat and tool flow → File intake: processes uploads
system/app/chat_tools.py - Chat and tool flow → Image generation: invokes generation
system/app/chat_tools.py - Chat and tool flow → Video editing: invokes editing
system/app/chat_tools.py