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.

PartStart reading here
CLI dispatch and terminal entry pointsrc/omar.rs
Session ownership and control socketsrc/sessions.rs
HTTP admission and Mission Control APIsrc/serve.rs
Compilerlang/Main.lean, Omar.Compiler
Bytecode, VM, and workflow executionsrc/topology.rs
Agent tool serversrc/mcp.rs
Backend adapterssrc/backend
Browser clientweb

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 .omar program 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.