Skip to content

OrgLoop

Organization as Code — declarative event routing for autonomous AI organizations.

🧬 OrgLoop is a declarative runtime for autonomous AI organizations. You define event sources, actors, routes, and standard operating procedures in YAML. When a PR merges, a customer emails, or Claude Code stops working, OrgLoop matches the event to a route and wakes the right actor with a focused prompt for exactly what to do.

When that actor finishes, its completion fires an event back into the system, and the loop continues. Events are generated programmatically and flow through deterministic routing, not chat threads.

You don’t need reliable actors if you have a reliable system around them.

Get Started | View on GitHub

Set up a webhook source and a console logger, route an event between them.

Terminal window
npm install -g @orgloop/cli
orgloop init # select "webhook" when prompted for connectors
cd my-org && orgloop add module minimal
orgloop validate && orgloop start

In another terminal:

Terminal window
curl -X POST http://localhost:3000/webhook \
-H "Content-Type: application/json" \
-d '{"type": "test", "message": "hello from orgloop"}'

You just routed an event through OrgLoop. The Getting Started guide walks you through connecting GitHub, Linear, and a full autonomous engineering org — one tier at a time.

You’re running AI agents. Each one is genuinely capable. And yet you’re still the glue.

You’re the one who remembers that Claude Code finished at 3am and nobody picked up the output. The one who notices CI failed three hours ago and no agent caught it. The intelligence exists, but the scaffolding to scale it doesn’t.

The attempted fixes — better prompts, more agents, cron jobs — don’t work because they’re solving a systems problem with better actors. That’s like making a company work by hiring smarter people without building processes.

OrgLoop is the process. A deterministic routing layer that ensures every meaningful state change triggers an appropriate response, regardless of whether any individual actor remembers to check.

Source.poll() --> EventBus --> matchRoutes() --> Transforms --> Actor.deliver()
|
actor.stopped --> EventBus
(the loop)

When an actor finishes work, that completion is itself an event — routed back into the system to trigger the next actor. The organization sustains itself through continuous cycles.

Five Primitives

Sources emit events, Actors do work, Routes wire them together, Transforms filter and enrich, Loggers observe everything. Learn more.

Event-Driven Actors

Sources poll or listen; actors never do. Actors wake only when matched events arrive — each with a focused launch prompt for that specific situation.

The Loop

Actor completion feeds back as events. A dev agent finishes, the supervisor evaluates, relaunches if needed. The org loops.

Modules

Install entire workflows as packages. orgloop add module engineering gives you PR review, CI triage, ticket routing, and Claude Code supervision in one command.

Connect real systems and orgloop status shows your organization in action:

OrgLoop — my-org (running, uptime 3h 22m)
Sources:
NAME TYPE INTERVAL LAST POLL EVENTS (24h)
github poll 5m 2 min ago 47
linear poll 5m 3 min ago 12
claude-code hook — 18 min ago 3
Routes:
NAME MATCHED (24h) DROPPED ERRORS
github-pr-review 35 2 0
github-ci-failure 10 0 0
linear-to-engineering 12 0 0
claude-code-to-supervisor 3 0 0
sources:
- id: github
connector: "@orgloop/connector-github"
config:
repo: "${GITHUB_REPO}"
token: "${GITHUB_TOKEN}"
poll:
interval: 5m
- id: claude-code
connector: "@orgloop/connector-claude-code"
config:
hook_type: post-exit
actors:
- id: openclaw-engineering-agent
connector: "@orgloop/connector-openclaw"
config:
auth_token_env: "${OPENCLAW_WEBHOOK_TOKEN}"
routes:
- name: "PR review received"
when: { source: github, events: [resource.changed] }
transforms: [drop-bot-noise]
then: { actor: openclaw-engineering-agent }
with: { prompt_file: "./sops/pr-review.md" }
- name: "Dev session done"
when: { source: claude-code, events: [actor.stopped] }
then: { actor: openclaw-engineering-agent }

Read that and you see an organization’s nervous system. Every event that matters, where it goes, what responds. If there’s a gap — a lifecycle event with no route — it’s visible.

Each example is a self-contained project you can copy and run. They’re ordered by complexity:

ExampleWhat you needWhat you get
MinimalNothingWebhook in, console out. Learn the config format.
GitHub to SlackGitHub token, Slack webhookReal PR events → Slack notifications
Engineering OrgGitHub, Linear, Claude Code, OpenClawFull autonomous engineering org with 5 routes
Multi-Agent SupervisorGitHub, Claude Code, OpenClawThe feedback loop: actor completion → supervisor → re-dispatch

The Getting Started guide walks you through three tiers: a local webhook (2 min), connecting GitHub (10 min), and a full autonomous engineering org (30 min). Or read What is OrgLoop? for a deeper introduction to Organization as Code.