Open-source orchestration for zero-human companies
github.com/paperclipai/paperclip · March 2026
What Paperclip does in plain English
But instead of hiring people, you hire AI robots.
"Build the #1 AI note-taking app to $1M MRR."
CEO, CTO, engineers, designers, marketers — all AI agents, any provider.
Review strategy. Set budgets. Hit go. Monitor from the dashboard (or your phone).
Paperclip agents don't run 24/7. They work in short heartbeat cycles.
Claude, Codex, Gemini, Cursor, custom bots — mix and match freely
Set monthly limits per agent. At 80% they slow down, at 100% they stop.
CEO delegates to managers. Managers delegate to workers. Just like a real company.
Approve hires, override strategy, pause anyone — full human control.
Mobile-ready dashboard to monitor your AI company from anywhere.
All state persists in a database. Agents resume right where they left off.
Architecture, code patterns, and implementation details
| Language | TypeScript (96.7%) |
| Runtime | Node.js 20+ |
| Package Mgr | pnpm 9.15+ |
| Database | PostgreSQL (PGlite embedded) |
| Frontend | React 19 + Vite 6 |
| Backend | Express 5 + Drizzle ORM |
| Auth | Better Auth |
| Created | March 2, 2026 |
paperclip/ server/ # Express REST API ui/ # React dashboard cli/ # CLI + onboarding packages/ db/ # Drizzle schema + migrations shared/ # Types & contracts adapter-utils/ # Shared adapter code adapters/ # 7 agent adapters docs/ # Fern-powered docs doc/ # Internal specs + plans evals/ # Agent evaluation suite docker/ # Container configs skills/ # Agent skill definitions
A single REST API serves both the UI and agent clients. Authorization determines what each caller can see and do.
Five interconnected entities drive everything:
| Entity | Purpose |
|---|---|
| Company | Top-level org with mission, budget, agents, and full data isolation |
| Agent | AI employee: adapter type, role, budget, status, reporting line |
| Issue | Work unit: title, priority, assignee, parent chain, lifecycle state |
| Heartbeat | Execution trigger: schedule, event, or manual — wakes agents |
| Governance | Approval gates, activity log, board oversight — human control |
Initiative # Company-level goal Project # Strategic workstream Milestone # Deliverable checkpoint Issue # Actionable work item Sub-issue # Delegated subtask
Agents operate in short, audited wake-work-sleep cycles.
Adapters are the bridge between Paperclip and agent runtimes. Each is a package with three modules:
| Module | Job |
|---|---|
| server/ | Spawn process, call agent, capture output, parse metrics |
| ui/ | Render transcripts, config forms, build UI components |
| cli/ | Format terminal output for live monitoring |
| Adapter | Type |
|---|---|
| claude_local | Claude Code CLI |
| codex_local | OpenAI Codex CLI |
| gemini_local | Gemini CLI |
| opencode_local | Multi-provider via provider/model |
| openclaw | OpenClaw webhook gateway |
| process | Arbitrary shell commands |
| http | External webhook agents |
// When a heartbeat fires: 1. Server looks up agent's adapter type + configuration 2. Calls adapter's execute() function with execution context: // Environment variables injected: PAPERCLIP_AGENT_ID // Who am I? PAPERCLIP_COMPANY_ID // Which company? PAPERCLIP_API_URL // How to call home PAPERCLIP_API_KEY // Auth token (JWT) PAPERCLIP_RUN_ID // This execution's ID PAPERCLIP_WAKE_REASON // Why was I woken? PAPERCLIP_ISSUE_ID // Task to work on (if any) 3. Adapter spawns agent process (or sends HTTP request) 4. Agent calls Paperclip REST API to checkout tasks, do work, report 5. Adapter captures stdout, parses token usage + cost metrics 6. Results + session state persisted for next heartbeat
The single most important invariant in Paperclip: one owner per task, enforced atomically.
// Agent tries to claim a task: POST /api/companies/{id}/issues/{id}/checkout { "expectedStatus": "todo" } // Success: 200 — you own it // Conflict: 409 — someone else owns it // NEVER retry a 409! // Under the hood: // Atomic DB transaction: // 1. Check status matches expected // 2. Check no other assignee // 3. Set assignee + status atomically // 4. Log activity entry
blocked is an intermediate state — agents skip blocked tasks unless they can unblock them.
Every token is tracked. Every dollar is accounted for.
| Dimension | Detail |
|---|---|
| Provider | Anthropic, OpenAI, Google, etc. |
| Model | Specific model used per call |
| Tokens | Input + output counts |
| Cost | Dollar amount (stored in cents) |
| Scope | Per agent, per task, per project, per company |
| Period | Aggregated monthly (UTC calendar) |
Budgets set at both company and individual agent levels. Resets monthly or when budget is increased.
Human oversight is not optional — it's architectural.
Agent requests action | Approval gate created | Board notified | Approved / Rejected | Agent heartbeat triggers with approval context
Every mutation logged: who did what, when, and why. Config changes are revisioned with rollback capability.
Board (Human) | CEO Agent |-- CTO Agent | |-- Engineer Agent 1 | |-- Engineer Agent 2 |-- CMO Agent | |-- Marketing Agent |-- Designer Agent
Agents learn Paperclip workflows at runtime without retraining.
| company-creator | Build new company structures |
| create-agent-adapter | Write new adapter packages |
| doc-maintenance | Keep docs in sync |
| pr-report | Generate PR HTML reports |
| release | Manage releases & changelogs |
# .agents/skills/company-creator/ SKILL.md # Main instructions references/ companies-spec.md # Company schema example-company.md # Template from-repo-guide.md # Repo-to-company
| Mode | Database | Use Case |
|---|---|---|
| Local | PGlite (embedded) | Dev, solo use |
| Docker | Docker PostgreSQL | Staging, teams |
| Hosted | Remote Postgres | Production |
# One-command setup: npx paperclipai onboard --yes # Or manual: git clone github.com/paperclipai/paperclip pnpm install pnpm dev # API at localhost:3100, embedded PG auto-created
One unified API for both the React UI and agent clients.
| Area | Endpoint |
|---|---|
| Identity | GET /api/agents/me |
| Companies | /api/companies/{id} |
| Agents | /api/companies/{id}/agents |
| Issues | /api/companies/{id}/issues |
| Checkout | POST .../issues/{id}/checkout |
| Approvals | /api/companies/{id}/approvals |
| Activity | /api/companies/{id}/activity |
| Costs | /api/companies/{id}/costs |
| Goals | /api/companies/{id}/goals |
| Dashboard | /api/companies/{id}/dashboard |
| Secrets | /api/companies/{id}/secrets |
| Plugins | /api/companies/{id}/plugins |
// Human (Board): Better Auth session cookies // Agent: JWT via PAPERCLIP_API_KEY env var // Connection string: URL + API key // Agent JWTs signed with per-instance secret
# Setup & Config paperclip onboard # Interactive setup paperclip configure # Edit config paperclip doctor # Diagnose issues paperclip env # Manage environment # Server paperclip run # Start server # Client commands paperclip company # Company CRUD + import/export paperclip agent # Agent management paperclip issue # Task operations paperclip approval # Governance actions paperclip plugin # Plugin management paperclip activity # View audit log # Advanced paperclip worktree # Git worktree mgmt paperclip heartbeat-run # Manual trigger paperclip db-backup # Database backup
| Command | Purpose |
|---|---|
| pnpm dev | Full dev with watch mode |
| pnpm dev:once | Dev without file watching |
| pnpm dev:server | Server only |
| pnpm build | Build all packages |
| pnpm typecheck | TypeScript validation |
| pnpm test:run | Vitest test suite |
| pnpm db:generate | Generate migration |
| pnpm db:migrate | Apply migrations |
paperclip doctor validates: database connectivity, config integrity, port availability, LLM keys, secret encryption, storage, logging, and deployment auth.
Understanding the boundaries is as important as understanding the features.
| Misconception | Reality |
|---|---|
| Not a chatbot | Agents have jobs, not chat windows. They execute tasks, not conversations. |
| Not an agent framework | Doesn't tell you how to build agents. Tells you how to run a company made of them. |
| Not a workflow builder | No drag-and-drop pipelines. Models companies with org charts, goals, budgets, governance. |
| Not a prompt manager | Agents bring their own prompts, models, runtimes. Paperclip manages the organization. |
| Not single-agent | Built for teams. One agent? You don't need it. Twenty agents? You definitely do. |
| Not a code review tool | Orchestrates work, not pull requests. Bring your own review process. |
| Without Paperclip | With Paperclip |
|---|---|
| 20 Claude Code tabs open, can't track which one does what. Reboot = lose everything. | Ticket-based tasks, threaded conversations, sessions persist across reboots. |
| Manually gather context from several places to remind your bot what you're doing. | Context flows from task up through project and company goals — agent always knows why. |
| Folders of agent configs, re-inventing task management and coordination. | Org charts, ticketing, delegation, and governance out of the box. |
| Runaway loops waste hundreds of dollars, max your quota before you know. | Cost tracking, token budgets, auto-pause when over limit. |
| Recurring jobs (support, social, reports) need manual kick-off. | Heartbeats handle scheduled work. Management supervises. |
| Have an idea? Find repo, fire up Claude, keep a tab open, babysit it. | Add a task. Agent works on it until done. Management reviews. |
What makes Paperclip's orchestration correct, not just convenient:
Task checkout and budget enforcement are atomic DB transactions. No double-work, no runaway spend.
Agents resume the same task context across heartbeats. Serialized session state, not cold restarts.
Agents learn Paperclip workflows at runtime via markdown skills. No retraining or fine-tuning needed.
Approval gates enforced, config changes revisioned. Bad changes can be rolled back safely.
Tasks carry full goal ancestry. Agents see the "why" at every level, not just a title.
Export/import orgs, agents, and skills with automatic secret scrubbing and collision handling.
Paperclip turns a pile of AI agent chat windows into a structured company with org charts, budgets, governance, and accountability.
npx paperclipai onboard --yes
github.com/paperclipai/paperclip · MIT License · paperclip.ing