Layer stack
Agent
The domain-agnostic worker runtime.
It owns:
- sessions
- harness execution
- sandbox and tools
- worker-local runtime memory
- private workspace and learnings
- chat transcript truth
- business commitments
- operator-facing evidence meaning
Chat
The shared office and durable coordination fabric.
It owns:
- rooms, DMs, group DMs, and threads
- participant binding and access rules
- append-only transcript truth
- rebuildable unread, mention, inbox, and transcript projections
- generic agent execution internals
- work commitment semantics
- observe evidence semantics
Work
The business execution layer above chat.
It owns:
- explicit business commitments
- owner and participant assignment
- blocker, approval, result, and execution state semantics
- promotion from chat lineage into durable business execution objects
Observe
The governance and evidence layer above work and execution.
It owns:
- execution refs and session linkage
- operator-facing evidence stitching
- blocked, degraded, and risk visibility
- audit-friendly execution explanation
Current code reality
The current repository is not yet implemented as four equally mature backend domains. Today the real code maturity is:Agent- substantial, session-first runtime under
src/agents/
- substantial, session-first runtime under
Chat- substantial backend truth and projections under
src/chat/
- substantial backend truth and projections under
Work- early product/domain shape carried mostly in shared model types and shell scaffolding
Observe- early product/domain shape carried mostly in shared model types and shell scaffolding
Current stable code layout
Repo mapping
src/agents/
Maps to the Agent layer.
Important runtime objects include:
AgentDefinitionEnvironmentSessionSessionEventwake(sessionId)HarnessSandboxToolDefinition
src/chat/core/
Owns chat truth:
- rooms
- DMs and group DMs
- thread scopes
- membership
- grants
- messages
- reactions
- cursors
- append-only ordering
src/chat/policy/
Owns chat-local command and access behavior:
- joins and leaves
- room commands
- role evaluation
- grant and membership flow
- room settings and archive behavior
src/chat/projections/
Owns rebuildable read models over chat truth:
- unread
- mentions
- latest activity
- transcript shaping
- sidebar discovery
- DM grouping
src/shared/
Holds cross-cutting protocol types and the current shared company model.
This is where early Work and Observe shapes currently appear.
For example:
TopLevelSurfaceState = "chat" | "work" | "observe"CompanyWorkSurfaceCompanyObserveSurface- execution refs, work cards, observe evidence, and linked chat context
src/shell/
Holds browser and desktop adapters that render product surfaces.
Current shell code already includes:
- chat surface rendering
- work surface rendering
- observe surface rendering
Dependency direction
The intended dependency direction is:- shell adapters do not invent parallel truth
chat/corestays below UI-specific behaviorchat/projectionsowns rebuildable chat views- agent-private journals do not become shared truth automatically
WorkandObserveshould not be collapsed back into shell-only UI concepts- provider backends remain runtime implementations behind the harness seam
Truth placement
Agent-private truth
Private execution evidence lives under:- workspace substrate files
- session event logs
- runtime checkpoints and working buffers
- reusable per-agent learnings
Shared company truth
Shared company truth lives in an append-only ledger:Work and Observe today
Work and Observe are already part of the architecture, but their durable backend contract is still earlier than Agent and Chat.
Right now they show up mainly through:
- shared company model types in
src/shared/company-model.ts - top-level shell tabs for
chat,work, andobserve - demo and frame-state scaffolding in
src/shell/web/
Shell rule
The shell is downstream of domain truth.Agentowns worker executionChatowns coordination truthWorkowns business execution meaningObserveowns evidence and governance meaning- the shell renders projections and emits commands
Maturity summary
The current maturity split is:Agent: real runtimeChat: real shared backend truthWork: early shared model plus shell scaffoldingObserve: early shared model plus shell scaffolding