Developer docs for main, checked against 9849aeb
on 2026-11-16.
Codebase overview
The main parts
OMAR runs agent processes and coordinates their work. The Rust omar binary owns runtime sessions, launches backends, serves HTTP, and renders the terminal dashboard. A separate Lean executable, omarc, compiles .omar programs into JSON bytecode for the Rust runtime.
| Part | Start reading here |
|---|---|
| CLI dispatch and terminal entry point | src/omar.rs |
| Session ownership and control socket | src/sessions.rs |
| HTTP admission and Mission Control API | src/serve.rs |
| Compiler | lang/Main.lean, Omar.Compiler |
| Bytecode, VM, and workflow execution | src/topology.rs |
| Agent tool server | src/mcp.rs |
| Backend adapters | src/backend |
| Browser client | web |
Ownership and execution
A runtime session has its own daemon, state directory, control socket, and tmux server. Within it, an executive assistant (EA) owns a namespace of agents, projects, memory, and scheduled events. A session can contain several EAs.
There are two paths for coordinating work:
- An assistant uses MCP tools to spawn workers, send messages, and track tasks.
- A compiled
.omarprogram defines teams, ports, connections, reactions, and timers. The runtime decides which reactions run and validates their results.
Both paths use the backend adapters to launch and communicate with agents. The terminal dashboard and browser are interfaces to this machinery; the session daemon owns the background runtime.
Reading path
Start with sessions and CLI, then HTTP and browser and MCP. For workflow execution, read compiler and bytecode, runtime, and state and recovery. Backends and tests points to extension points and validation.