Everything you need to know about the Rotifer Protocol — from core concepts to how it compares with other frameworks.
Rotifer Protocol is an open-source evolution framework for AI agents. Instead of manually curating tool lists for your agents, Rotifer introduces biological evolution: capabilities (called Genes) compete in an Arena, the fittest survive, and your agents grow smarter autonomously.
The name comes from the bdelloid rotifer — a microscopic organism that has thrived for 40 million years without sexual reproduction by absorbing genes from its environment. Rotifer Protocol applies the same principle to software.
Today's AI agents have static capabilities — a hardcoded list of tools that never improves on its own. If Tool A is terrible and Tool B is great, the agent has no way to know. There's no competition, no selection, no evolution.
Rotifer fixes this by introducing:
Comparisons with Other Frameworks
Relationship: Complementary — MCP standardizes how agents call tools; Rotifer standardizes how tools evolve.
| Dimension | MCP | Rotifer |
|---|---|---|
| Core problem | How agents invoke external tools | How tools continuously improve |
| Standardizes | Tool interface | Evolution rules |
| Quality assurance | No built-in mechanism | Arena ranking + Reputation |
| Security | Depends on host implementation | Protocol-level L0 constraint (immutable) |
| Governance | Anthropic-initiated open standard | Decentralized self-evolution |
Synergy: MCP Tools can be upgraded to Rotifer Genes with one command (rotifer wrap --from-skill), gaining quality ranking, security scoring, and autonomous evolution. MCP is Rotifer's most important upstream ecosystem.
Relationship: Direct competitor — both build an "evolution layer" on top of MCP/Skills, but with fundamentally different definitions of what "evolution" means.
| Dimension | EvoMap (GEP) | Rotifer |
|---|---|---|
| What is a "Gene"? | Strategy template (JSON) — describes how to fix a problem | Executable capability unit — has an express() function, compiles to WASM |
| Does it execute code? | No — generates prompts that guide evolution | Yes — runs inside a WASM sandbox |
| Evolution paradigm | Repair-driven: observe failure → fix → package → share (GDI 4-dimension scoring) | Competition-driven: publish → Arena head-to-head → fitness selection → elimination |
| Safety model | Validation command whitelist (node/npm/npx only), no execution sandbox | Protocol-level L0 immutable constraint + WASM sandbox + resource limits |
| Economic system | Credits (1 Credit = $0.01), bounties, service marketplace, validator staking | Reputation scoring (economic model in roadmap) |
| Multi-agent collaboration | Swarm Intelligence — task decomposition with parallel solving | Gene composition algebra (Seq / Par / Cond / Try) |
| Theoretical foundation | GDI weighted formula (quality 35% + usage 30% + social 20% + freshness 15%) | SIR propagation model, Pareto convergence proof, herd immunity theorem |
| Cross-platform | JavaScript/Node.js runtime | Rotifer IR compiles to any target |
Core architectural distinction: EvoMap treats Genes as strategy documents — standardized records of how a problem was solved, shared for other agents to replicate. Rotifer treats Genes as living programs — executable code that competes, evolves, and gets eliminated through natural selection. The same word "Gene", two entirely different things.
Rotifer's structural advantages: formalized mathematical foundation (provable fitness convergence), WASM-level execution isolation, and universal IR that decouples capabilities from any specific runtime.
EvoMap's strengths: operational platform with real usage, complete economic system, and lower barrier to entry (no code execution required).
Relationship: Complementary — these are orchestration frameworks (how multiple agents collaborate); Rotifer is a capability protocol (how individual capabilities evolve).
| Dimension | Orchestration Frameworks | Rotifer |
|---|---|---|
| Core problem | Multi-agent coordination | Capability evolution |
| Protocol layer | Orchestration layer | Capability layer |
| Update mechanism | Manual code updates | Autonomous evolution + Arena elimination |
| Cross-framework | Framework-locked | Compiles to universal IR |
Synergy: These frameworks can serve as upstream users — orchestrate multiple agents with AutoGen/CrewAI, while each agent's capabilities are powered by Rotifer Genes that evolve autonomously.
Relationship: Orthogonal — A2A handles agent-to-agent communication; Rotifer handles capability evolution. They operate at entirely different protocol layers.
| Dimension | A2A | Rotifer |
|---|---|---|
| Core problem | Agent discovery & communication | Capability evolution |
| Protocol layer | Communication layer | Capability layer |
| Interaction model | Agent-to-Agent RPC | Gene-to-Gene competition |
Synergy: Agents on the A2A network can use Rotifer Genes as their capability modules. Zero overlap, full compatibility.
About the Project
Yes. The engine is Apache 2.0 + Rotifer Safety Clause, the specification is CC BY-SA 4.0.
v0.8.5 — the current public release line. It consolidates the shipped v0.8.x surface across the CLI, MCP Server, VS Code extension, and rotifer.dev, including the Skill→Gene migration path, CLI UX refresh, and version/update alignment work. Versions v0.8.2 through v0.8.4 were reserved internal iteration numbers rather than separate public releases. See the Roadmap for what's next.
A Gene is the atomic capability unit in Rotifer. Think of it as a "living plugin" that can:
Every Gene has a typed interface (inputSchema / outputSchema), a unique identity (content hash), and runs inside a WASM sandbox.
Similarities: Both are modular, composable, reusable AI agent capability units. Both define input/output schemas.
Key differences:
| Dimension | Skill | Gene |
|---|---|---|
| Evolution | Static after install | Competes & evolves in Arena |
| Identity | No unique ID | Content-addressable |
| Security | Often no sandbox | WASM sandbox + L0 |
| Cross-platform | Framework-locked | Universal IR |
| Retirement | Manual deprecation | Natural elimination |
In short: Skill is the degenerate special case of Gene — turn off all "life characteristics" and you get a Skill.
The Arena is where Genes compete. Same-domain Genes are evaluated head-to-head on four fitness dimensions:
Evaluation is automated by the protocol — no human judges. The fittest survive and gain Reputation; the rest are gradually eliminated. It's biological natural selection applied to software capabilities.
A Binding is the execution environment for Genes — the protocol doesn't care where a Gene runs, only that it conforms to the interface standard. There are currently three Bindings: Local (CLI), Cloud (Supabase), and Web3 (on-chain).
AI IDEs (Cursor, Claude Code, Windsurf, etc.) are a special type of Local Binding that plays two roles simultaneously:
Not every Binding is an incubator (Cloud Binding only runs, it doesn't create), but IDE Bindings naturally serve both roles — they are where Genes are born and where they run.
Every Gene has a fidelity level that determines how it executes:
express() function, compiles to WASM, runs in a sandbox with no network access. Best for deterministic computation (grammar checking, data transforms, scoring).allowedDomains. Best for capabilities that need external APIs (LLM calls, search APIs).All three participate in the ecosystem. Native and Hybrid Genes compete in full Arena fitness evaluations; Wrapped Genes are ranked on usage and stability only.
URAA (Universal Rotifer Autonomous Architecture) separates the protocol into five immutable layers, each modeled after a biological system:
| Layer | Role | Biological Analogy |
|---|---|---|
| L0 Kernel | Immutable trust anchor — security constraints no other layer can override | Genetic code |
| L1 Synthesis | WASM sandbox execution, IR compilation, resource metering | Protein synthesis |
| L2 Calibration | Multi-stage gene validation (static analysis → sandbox → controlled trial) | Immune system (thymic selection) |
| L3 Competition | Arena fitness ranking + horizontal gene transfer between agents | Natural selection + HGT |
| L4 Collective Immunity | Network-wide threat detection, defense sharing, species memory | Herd immunity |
Each layer communicates only through standardized interfaces. This is what makes Rotifer a protocol, not just a framework — the layered architecture is environment-independent and carries formal safety guarantees across all bindings.
Rotifer provides a formal algebraic system for composing simple genes into complex behaviors — with type safety, error propagation, and fitness inheritance:
| Operator | Meaning | Example |
|---|---|---|
Seq(A, B, C) | Sequential — output of A feeds into B, then C | Search → Summarize → Translate |
Par(A, B) | Parallel — run A and B concurrently, collect all results | Query 3 search providers simultaneously |
Cond(p, T, F) | Conditional — choose gene based on runtime predicate | Long query → deep research; short → quick search |
Try(P, F) | Fallback — if primary fails, run fallback | Premium API → free API |
This is a key differentiator from tool registries: compositions are type-checked at compile time, incompatible schemas produce errors before execution, and composed genes inherit fitness from their components. The Arena evaluates compositions as a whole.
Genes compile to Rotifer IR — an intermediate representation built on WASM with protocol-specific custom sections (phenotype, constraints, metering). This IR is to genes what LLVM IR is to programs:
rotifer compile produces a universal IR artifactThe critical property is the Constitutional Unity Invariant: any L0 safety constraint declared in any binding is preserved through compilation, transmission, and re-compilation. No binding can weaken a constitutional constraint. This is what makes cross-binding portability safe, not just convenient.
The fitness function uses a multiplicative model, not a weighted average:
F(g) = [S_r · ln(1 + C_util) · (1 + R_rob)] / [L · Resource_Cost] This means any single zero-valued factor drives the entire score to zero. A gene with 0% success rate always scores zero — no matter how fast or efficient it is. This prevents weak dimensions from being masked by strong ones.
This is distinct from the Gene Reputation Score R(g), which uses a weighted average — see the dedicated question below.
Three levels of abstraction, each building on the previous:
| Concept | What it is | Analogy |
|---|---|---|
| Gene | An atomic capability — one function that does one thing | A single gene in DNA |
| Genome | An ordered set of Genes — the "recipe" for what an Agent can do | A complete chromosome |
| Agent | The living organism — carries a Genome, decides execution order, interacts with the world | The organism itself |
In practice: you create Genes individually (rotifer init), then assemble them into an Agent (rotifer agent create --genes a b c). The Genome is defined implicitly — you don't manage it as a separate file. Genes are published independently; Agents are local compositions.
Gene reputation uses phase-based dynamic weights:
R(g) = W_arena × Arena + W_usage × Usage + W_stability × Stability This is a different metric from fitness F(g) (multiplicative model where any zero-valued factor drives the score to zero). Reputation measures "long-term trustworthiness"; fitness measures "how good right now".
Decision framework — if 3+ are "yes", go Native:
High-value Native domains (far beyond current catalog):
Keep as Wrapped (these rely on LLM reasoning, not deterministic algorithms):
A Gene is an executable function, not static data. Every Gene must have an express(input) function — it takes input, runs logic, and returns structured output.
// ❌ This is NOT a Gene — it's just data
{ name: "anchoring-effect", template: "Was $2999, now only $99" }
// ✅ This IS a Gene — it has input, processing, output
export async function express(input) {
const analysis = analyzeHooks(input.text);
return { hooks: analysis.detected, score: analysis.effectiveness };
} If your "capability" is just a text template, it should be a data file inside a Gene (e.g. patterns.json), consumed by the express() function as a rule engine input.
Follow the Gene axiom of functional cohesion — one Gene solves one atomic problem.
Rule of thumb: if two "capabilities" have identical input/output schemas, they are not two Genes — they're two strategy parameters of the same Gene.
// ❌ 50 templates = 50 Genes (violates functional cohesion)
// ✅ 50 templates = 1 Gene + 50 rule data entries Typical split: 5–6 functionally distinct Genes (analyze, score, generate, rewrite, recommend, filter) are more valuable than 50 structurally identical ones.
| Fidelity | Meaning | Use When |
|---|---|---|
| Native | Compiles to WASM, sandbox execution, no network | Pure text analysis, scoring, pattern matching, data transforms |
| Hybrid | Sandbox + controlled network calls (must declare allowedDomains) | LLM API calls, search APIs, anything requiring network |
| Wrapped | Lightweight wrapper, external API driven | Quick prototypes, pure prompt instructions |
Quick rule: No network → Native. Needs network → Hybrid. Just get it running → Wrapped. See the Hybrid Gene Development Guide for details.
One command:
rotifer arena submit my-gene Once submitted, your Gene competes head-to-head against other Genes in the same domain on fitness metrics. Use rotifer arena list to view rankings and rotifer arena watch for real-time monitoring. See Arena Commands for details.
Migration is a progressive enhancement, not a rewrite. Two commands handle everything:
rotifer scan --skills # Scan existing Skills, assess migration feasibility
rotifer wrap --from-skill # Auto-convert to Gene in one command Your core business logic stays the same:
See the Skill Import Guide for details.
Option A — Terminal:
npm install -g @rotifer/playground
rotifer init my-project
cd my-project
rotifer hello Want to preview curated templates first? Run rotifer hello --list-templates.
Option B — Paste this into your AI IDE:
Install the Rotifer Protocol CLI globally (npm install -g @rotifer/playground). Then initialize this project with "rotifer init", run "rotifer hello --list-templates", choose the best preset Agent for this repo, and show me the result. See the Getting Started guide for a full walkthrough.
Each card contains a ready-to-paste prompt. Copy it, paste into your IDE's chat, and the AI handles the rest. Replace grammar-checker with any name from the catalog.
Install Rotifer "grammar-checker": run "rotifer install grammar-checker", then copy its SKILL.md into .cursor/skills/grammar-checker/SKILL.md so it becomes an Agent Skill I can invoke with @grammar-checker. Install Rotifer "grammar-checker": run "rotifer install grammar-checker", read its SKILL.md content, and append it to the project's .windsurfrules file as a new rule block. Install Rotifer "grammar-checker": run "rotifer install grammar-checker", read its SKILL.md, and append the content to .github/copilot-instructions.md as custom instructions. Install Rotifer "grammar-checker": run "rotifer install grammar-checker", read its SKILL.md, and add the content to .clinerules in the project root. Install Rotifer "grammar-checker": run "rotifer install grammar-checker", then add its SKILL.md path to .aider.conf.yml under the read: key so it's loaded as reference context. Install Rotifer "grammar-checker": run "rotifer install grammar-checker", then register its SKILL.md as a docs context provider in .continue/config.json. Install Rotifer "grammar-checker": run "rotifer install grammar-checker", then copy its SKILL.md to .codex/skills/grammar-checker/SKILL.md. Install Rotifer "grammar-checker": run "rotifer install grammar-checker", read its SKILL.md and append the content to the project's CLAUDE.md as project knowledge. Install Rotifer "grammar-checker": run "rotifer install grammar-checker", then copy its SKILL.md to .kiro/skills/grammar-checker/SKILL.md. Install Rotifer "grammar-checker": run "rotifer install grammar-checker", then copy its SKILL.md to .trae/rules/grammar-checker.md. Install Rotifer "grammar-checker": run "rotifer install grammar-checker", read its SKILL.md content, and add it to the TONGYI Lingma custom prompt settings. Install Rotifer "grammar-checker": run "rotifer install grammar-checker", then copy its SKILL.md to .codebuddy/skills/grammar-checker/SKILL.md. Install Rotifer "grammar-checker": run "rotifer install grammar-checker", then copy its SKILL.md to .qoder/skills/grammar-checker/SKILL.md. Yes, completely free and open source. The CLI, runtime, and all 68+ Genes in the catalog are free to use. There are no usage fees, no API keys required for local execution, and no premium tiers.
The only costs are ones you bring yourself — if a Hybrid Gene calls a paid external API (like an LLM provider), you pay that provider directly. Rotifer itself charges nothing.
Yes — safety is enforced at the protocol level, not left to individual implementations:
allowedDomains; all other network calls are blockedEvery Gene also has a security score V(g) computed through static analysis and sandbox testing before it enters the Arena.
Three ways to discover Genes:
rotifer search <keyword> to find Genes from the terminal