Two sides
Four layers on your machine
1. Desktop app (Electron)
The window you look at. Written in React with the same Glass design language you see in the marketing site. Ships as a signed, notarized native binary for macOS, Windows, and Linux. The app does nothing on its own. It is a thin client over the local orchestrator.2. Local orchestrator (Node.js)
The brain. A long-running Node process that holds the workflow runtime, the scheduler, the lease manager, the loop detector, the circuit breakers, the budget ledger, and the audit log writer. The orchestrator is the thing that actually decides what runs when. It enforces every budget cap, issues every lease, writes every audit entry, and kills runs that exceed their limits. Agents do not make those decisions; the orchestrator does. Request flow for a single workflow run:- A workflow fires (manual trigger, cron, webhook, or API call)
- Scheduler checks all six budget caps before the first step
- Scheduler issues a lease on the first step and hands it to an adapter
- Adapter spawns the agent as a child process with its memory, tools, and current task context pre-loaded
- Agent runs the step. Every tool call goes through the orchestrator’s tool proxy, which enforces budgets and writes the audit entry
- Agent marks the step complete. Orchestrator verifies the exit state, releases the lease, and writes a structured checkpoint
- Scheduler moves to the next step, re-checks budgets, and repeats
- At any point, a gate may escalate to a human reviewer. The run pauses, the reviewer approves or rejects, the run resumes or terminates.
3. Local database (PGlite)
All state lives in an embedded Postgres database running inside the app. We use PGlite, which is Postgres compiled to WASM, so you get real SQL without running a separate database server. The database holds:- Every company, team, client, project, workflow, agent
- Every run record, every step result, every cost entry
- The full audit log (signed, append-only)
- Memory at all four scopes
- Cached MCP tool definitions
- Workflow checkpoints
~/.company-agents/instances/default/db/ by default.
It is yours. You can back it up, copy it, move it to another machine,
or nuke it.
4. Agent processes and adapters
When an agent runs, it is a child process of the orchestrator. The adapter is the code that knows how to start the right CLI:claude-codeadapter launchesclaude-codeas a subprocesscodexadapter launchescodexgemini-cliadapter launchesgeminicursoradapter launchescursor-agentopenclaw,opencode,hermes,pieach launch their own
kill(-pid) so
nothing orphans.
The cloud control plane
Three services run in our cloud. They are optional: if you run in local-only mode, none of these ever get contacted. Account and subscription. Email, password hash, billing status, subscription tier. Stripe for payment processing. Resend for billing email. Cross-device sync. When you turn sync on, workspace metadata is encrypted with a key derived from your password and uploaded to our object store. We cannot read it. If you lose the password, we cannot recover it either. Clipmart marketplace. The public catalog of company templates you can install with one click. Read-only from our side, contributed to via GitHub pull requests. That is the whole cloud. There is no agent runtime in the cloud, no model proxy, no prompt storage, no file upload.The eight adapters
| Adapter | Provider | Default model | Strengths |
|---|---|---|---|
| claude-code | Anthropic | Claude Sonnet 4.5 | Best instruction following |
| codex | OpenAI | GPT-5 | Lowest per-step latency |
| gemini-cli | Gemini 2.5 Pro | 2M token context window | |
| cursor | Cursor | Multi | Fastest codebase search |
| openclaw | OpenClaw | Multi | Built-in checkpointing |
| opencode | SST | BYO | Model independence |
| hermes | Nous Research | Hermes 4 | Structured output discipline |
| pi | Pi.dev | Local | Fully offline, privacy-first |
MCP for integrations
Every integration is implemented as an MCP server. When you install the Stripe integration, a local MCP server starts up that exposes tools likestripe.create_invoice to agents.
The agent calls the tool through the MCP protocol; the MCP server
calls the actual Stripe API with the credentials you provided.
This is important because it means new integrations do not require
changes to the orchestrator. Anything that speaks MCP can become an
integration.
Repository layout
The monorepo mirrors the architecture above:Key design decisions
Local-first. Compute runs on your machine. The cloud is there for the things that genuinely need a shared state (account, sync) and nothing else. Leases, not locks. Every task handoff uses a lease with a TTL and a fencing token instead of a persistent lock. Crashed agents cannot strand work indefinitely. Structured checkpoints. The orchestrator writes a normalized checkpoint after every step, not a conversation dump. The next step gets facts, not replay. Stacked budgets. Six scopes, outer-to-inner. Every inner cap constrains the outer one. Process-group isolation. Every agent run is its own process group, killed withkill(-pid) on exit. No zombies.
Append-only audit. Every mutation is logged. Nothing is
retroactively edited.
Next
- Quickstart if you want to see it running.
- Core concepts if you want the vocabulary before the code.
- Deploy overview if you want to put this on a server instead of your laptop.