Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CorpOS

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).

CI CodeQL OpenSSF Scorecard License: Apache-2.0 Node

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


Demo

CorpOS ops console — agents hand off a company day (support → finance → ops), trust unlock, and Governor (synthetic demo data)

Screenshots

Ops Company day Governor
Ops Company day Governor

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.


Quick start

npm install
npm run build
npm run dev        # ops console on $PORT or 3000

Contributors 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)

Container

docker build -t corpos .
docker run --rm -p 3000:3000 corpos

CI 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.

Architecture

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.

Security

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.

Community

Contributing · Code of Conduct · Security · ADRs

License

Apache-2.0 — Copyright © 2026 SafetyMP.

About

Reference implementation of an autonomous company — firm model, work contracts, policy-gated control plane, and a governance plane (PDP/PEP, OTel GenAI, OWASP ASI / NIST RMF). Not a production SaaS.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages