Reference implementation of an autonomous company — firm model, work contracts, policy-gated control plane, and a July 2026 governance plane (PDP/PEP, three-layer authz, OTel GenAI, OWASP ASI / NIST RMF crosswalk).
CorpOS shows how a firm operates when department agents do most work and humans govern by exception (Approve / Reject / Kill in the ops console). Autonomy is earned from evidence, not granted in prompts. Interop protocols (MCP) are transport; firm-side governance includes G1 membership and G4 dissent today, with a broader G1–G6 crosswalk in the docs.
Scope: Reference architecture and runnable demo — not a production-hardened SaaS. See SECURITY.md.
Default mode is simulation (SimulationProvider) for deterministic CI. Live LLM (HttpLLMProvider) drives company-day/orchestrator only when CORPOS_ALLOW_LIVE=1 and OPENROUTER_API_KEY are set — /api/health.mode never lies. G1–G6 firm governance, orchestrator-driven day, TTL scheduler, console Bearer (shared mode), and live /api/events SSE are implemented.
Read the thesis: docs/future-of-the-firm.md. Governance crosswalk: docs/governance-crosswalk.md. AIBOM: docs/aibom.json. Docs index: docs/README.md.
Jump to: Demo · Quick start · Architecture · Contributing · Security · ADRs
| Ops | Company day | Governor |
|---|---|---|
![]() |
![]() |
![]() |
- Local demo:
npm install && npm run build && npm run dev→ http://localhost:3000 - Regenerate GIF/PNGs: start the console, then
npm run screenshots— seedocs/assets/README.md
Click Run company day to watch the agent activity timeline: support → finance → ops handoffs, an autonomous settle, an exception approval path, compensation, and trust unlock. The console sends autoApproveException: false so the exception stays in the HITL queue for Approve/Reject.
npm install
npm run build
npm run dev # ops console on $PORT or 3000Contributors and CI should use npm ci --include=dev (see CONTRIBUTING.md).
npm test
npm run scenario # HITL default-off; exits non-zero when exception is not auto-settled
npm run audit:verify
./scripts/harness/verify.sh # functional / static acceptance
./scripts/harness/adversarial.sh # authorized local adversarial probes (CI also runs this)docker build -t corpos .
docker run --rm -p 3000:3000 corposCI may publish images to ghcr.io/safetymp/corpos (tags: branch, sha, semver, latest). Optional Fly.io deploy runs from .github/workflows/deploy.yml on GitHub release when FLY_API_TOKEN is set — see fly.toml.
| Layer | Package / app | Responsibility |
|---|---|---|
| Firm / work / control | @corpos/core |
Contracts, gateway, policy, trust, audit, company day |
| MCP knowledge | @corpos/mcp-knowledge |
Real local MCP server (stdio) |
| API | @corpos/api |
Hono REST + SSE |
| Ops console | @corpos/console |
Vite + Preact |
Stack: Node ≥22 · TypeScript · npm workspaces · Hono · Drizzle + libsql · official MCP SDK · Preact. No Express, no better-sqlite3, no agent-framework lock-in.
Architecture decisions live in docs/adr/README.md.
Reference architecture — not production-hardened. CORPOS_MODE=shared plus DASHBOARD_API_TOKEN enables a Bearer token gate on the API for approve/kill mutations. The ops console does not yet attach that token (shared-mode approvals return 401 until a Bearer-capable client is used). See SECURITY.md.
Contributing · Code of Conduct · Security · ADRs
Apache-2.0 — Copyright © 2026 SafetyMP.



