The Open-Source Standard for Autonomous AI Agent Loops Compose. Verify. Deploy.
License: MIT Python TypeScript
Every team building AI agents is reinventing the same wheel β designing loops, wiring up Maker/Checker verification, managing state across sessions, handling failure recovery. There is no standard.
LoopCode is that standard. Inspired by what React did for UI components and what Docker did for containers, LoopCode gives you:
- Six composable primitives β Trigger, Pipeline, Skill, Connector, SubAgent, Memory
- Built-in Maker/Checker β Verification is in the architecture, not an afterthought
- Loop Readiness Score (LRS) β Know if your loop is production-ready before you run it
- Dual runtime β TypeScript CLI + Python execution engine
Try it yourself:
# Install Python runtime cd runtime && pip install -e . # Run a code review loop (dry run β no LLM cost) loopcode-runtime --dry-run run pr-review
============================================================
Running Loop: pr-review
============================================================
Config: loops\pr-review.yaml
Pipeline: 1 step(s)
Verification: Maker=['Bug Review', 'Security Review',
'Quality Review', 'Performance Review']
| Checker=Adversarial Verifier
ββ Pipeline Execution ββββββββββββββββββββββββββββββββ
Running 4 agents in parallel...
-> Agent: Bug Review...
-> Agent: Security Review...
-> Agent: Quality Review...
-> Agent: Performance Review...
+ Completed (424ms, 0 up/0 down tokens, 0γγ«.0000)
ββ Maker/Checker Verification ββββββββββββββββββββββββ
Round 1: [ok] PASS (score: 0.95)
ββ Results βββββββββββββββββββββββββββββββββββββββββββ
[ok] Loop 'pr-review' completed successfully
Duration: 424ms
Steps: 4
Est. Cost: 0γγ«.0000
# 1. Install npm install -g loopcode # 2. Initialize a project loopcode init # 3. Validate loopcode validate # 4. Run a loop (requires ANTHROPIC_API_KEY or OPENAI_API_KEY) loopcode-runtime run pr-review
# loops/pr-review.yaml name: pr-review trigger: type: webhook event: pull_request pipeline: - parallel: - prompt: "Review for correctness bugs" label: Bug Review - prompt: "Review for security vulnerabilities" label: Security Review - prompt: "Review for code quality" label: Quality Review verify: maker: [Bug Review, Security Review, Quality Review] checker: Adversarial Verifier maxRounds: 3 autoRetry: true budget: maxTokens: 500000 maxDurationMinutes: 30 memory: store: filesystem path: .loopcode/state
βββ User βββββββββββββββββββββββββββββββββββ
β loopcode.yaml loops/ β β Declarative YAML
ββββββββββ¬βββββββββββββββββββββββ¬ββββββββββββ
β β
ββββββΌβββββββββββββββ ββββββΌβββββββββββ
β TypeScript CLI β β Python Runtime β β Dual runtime
β (init/validate β β (execution β
β /run/status) β β engine) β
βββββββββββββββββββββ ββββββ¬ββββββββββββ
β
ββββββββββββΌβββββββββββ
β Loop Engine β
β β
β βββββββββββββββββ β
β β Pipeline β β
β β βββββ βββββ β β
β β β A β β B β... β β β Parallel agents
β β βββ¬ββ βββ¬ββ β β
β βββββΌββββββΌββββββ β
β β β β
β βββββΌββββββΌββββββ β
β β Verifier β β β Maker/Checker
β β (Checker) β β
β βββββββββ¬ββββββββ β
ββββββββββββΌβββββββββββ
β
ββββββββββββΌβββββββββββ
β State Store β β Filesystem persistence
β .loopcode/state/ β
βββββββββββββββββββββββ
| Component | Role | Examples |
|---|---|---|
| Trigger | What starts the loop | cron, webhook, manual, event |
| Pipeline | The execution flow | parallel, sequential, conditional |
| Skill | Reusable domain knowledge | SKILL.md, npm packages |
| Connector | External system bridge | MCP servers, APIs, databases |
| SubAgent | Maker/Checker separation | planner, executor, verifier |
| Memory | Cross-session persistence | filesystem, database, memory |
Each loop receives a 0-100 score across 7 dimensions:
loopcode validate
pr-review β LRS: 85/100 (Grade B)
[ok] Maker/Checker separation enforced
[ok] Budget controls configured (3 dimensions)
[!] State persistence recommended
daily-triage β LRS: 72/100 (Grade C)
[ok] Max iterations set
[!] Add budget controls for production
[!] Verification missing
- Phase 1 (current): Schema + CLI + LRS + Python Runtime
- Phase 2 (W3-4): Loop Registry, GitHub Action, MCP integration
- Phase 3 (W5-8): Team collaboration, observability dashboard, audit logs
- Phase 4 (Q3): Enterprise SSO, compliance reporting, on-premise deployment
"I stopped manually prompting Claude. I run a bunch of Loops to prompt it and let it decide what to do next. My job has become writing Loops." β Boris Cherny, Claude Code lead, Anthropic
Loop Engineering is the fourth paradigm shift in AI engineering:
| Era | Focus |
|---|---|
| Prompt Engineering (2022) | Write better prompts |
| Context Engineering (2023) | Give better context |
| Tool Engineering (2024) | Build better tools |
| Loop Engineering (2025+) | Design better loops |
MIT β see LICENSE