PluginBench
MCP Server
Active
MIT

Ouroboros MCP Server

io.github.Q00/ouroboros

Agent OS that turns vague ideas into verified code through structured interviews, immutable specs, and replayable workflows.

What is the Ouroboros MCP server?

Ouroboros is an Agent OS for AI coding that replaces ad-hoc prompting with a specification-first workflow: interview, crystallize, execute, evaluate, evolve. It pins an acceptance spec before execution so the verify command and expected output never enter the success contract, enabling replayable, observable, policy-bound execution across Claude Code, Codex, GitHub Copilot, and other AI agents.

Ouroboros solves the input bottleneck in AI coding by turning vague prompts into verified working code. It uses a Socratic interview to expose hidden assumptions, locks an immutable seed spec before coding begins, and provides automated 3-stage evaluation gates. The workflow is replayable across different hosts and agents, with all actions recorded in an auditable ledger.

How to install Ouroboros

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "ouroboros": {
      "command": "uvx",
      "args": [
        "ouroboros-ai",
        "--from",
        "ouroboros-ai[mcp]",
        "--with",
        "mcp==2.0.0",
        "ouroboros",
        "mcp",
        "serve",
        "--runtime",
        "claude-cli"
      ]
    }
  }
}
Cursor
~/.cursor/mcp.json
{
  "mcpServers": {
    "ouroboros": {
      "command": "uvx",
      "args": [
        "ouroboros-ai",
        "--from",
        "ouroboros-ai[mcp]",
        "--with",
        "mcp==2.0.0",
        "ouroboros",
        "mcp",
        "serve",
        "--runtime",
        "claude-cli"
      ]
    }
  }
}
Windsurf
~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "ouroboros": {
      "command": "uvx",
      "args": [
        "ouroboros-ai",
        "--from",
        "ouroboros-ai[mcp]",
        "--with",
        "mcp==2.0.0",
        "ouroboros",
        "mcp",
        "serve",
        "--runtime",
        "claude-cli"
      ]
    }
  }
}
VS Code
.vscode/mcp.json
{
  "servers": {
    "ouroboros": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "ouroboros-ai",
        "--from",
        "ouroboros-ai[mcp]",
        "--with",
        "mcp==2.0.0",
        "ouroboros",
        "mcp",
        "serve",
        "--runtime",
        "claude-cli"
      ]
    }
  }
}
Claude Code
claude mcp add ouroboros -- uvx ouroboros-ai --from ouroboros-ai[mcp] --with mcp==2.0.0 ouroboros mcp serve --runtime claude-cli

Tools & capabilities

Tools this server exposes to the agent.

  • ooo interviewSocratic interview that exposes hidden assumptions and ambiguities in a task specification, producing an ambiguity score.
  • ooo setupOne-time configuration step to prepare the runtime and detect available AI agent hosts.
  • ooo autoAutomated execution and evaluation workflow that runs the interview, crystallizes the spec, executes code, and evaluates results.
  • ooo configAccess local settings and model configuration for pinning specific models to pipeline stages.
  • ouroboros init startTerminal-based workflow command to start the Socratic interview from a plain shell without an agent host.

Use cases

  • Turn a vague task description into a structured, testable specification with ambiguity scoring
  • Run the same AI coding workflow across multiple agent hosts (Claude Code, Codex, Copilot, Hermes, Gemini, Kiro) with consistent results
  • Automate code generation with built-in evaluation gates so you don't manually verify "looks good"
  • Replay and audit AI agent decisions through immutable seed specs and ledger records
  • Build domain-specific AI workflows (PR reviews, ticket triage, releases) as plugins with scoped permissions

Ouroboros MCP server FAQ

What is Ouroboros?

Ouroboros is an Agent OS that replaces ad-hoc AI prompting with a structured specification-first workflow. It uses Socratic interviews to clarify intent, locks an immutable spec before execution, and provides replayable, auditable workflows across multiple AI agents.

Is Ouroboros free?

Yes, Ouroboros is open-source under the MIT license and available on PyPI as `ouroboros-ai`.

How do I install it in Claude Code or Cursor?

For Claude Code: run `claude plugin marketplace add Q00/ouroboros && claude plugin install ouroboros@ouroboros`, then `ooo setup` inside a Claude Code session. For other agents, install via `pip install 'ouroboros-ai[mcp]'` and run `ouroboros setup --runtime <agent-name>`.

Does it require authentication?

Ouroboros itself does not require auth. It works with your existing AI agent (Claude, Codex, Copilot, etc.), so you authenticate once with that agent. For GitHub Copilot CLI, you need `gh auth login` for live model discovery.

Which AI agents does it support?

Ouroboros works with Claude Code, Codex CLI, GitHub Copilot CLI, OpenCode, Hermes, Gemini, Kiro CLI, Pi CLI, Zcode, Goose, GJC, Antigravity CLI, and Grok Build CLI. The installer auto-detects available runtimes.

What Python versions are supported?

Core and non-LiteLLM installs support Python 3.12–3.14. LiteLLM-bearing installs support Python 3.12–3.13.

README (reference)

Source of truth, from the repository.

<!-- mcp-name: io.github.Q00/ouroboros --> <p align="right"> <strong>English</strong> | <a href="./README.ko.md">한국어</a> | <a href="./README.zh-CN.md">简体中文</a> </p> <p align="center"> <br/> ◯ ─────────── ◯ <br/><br/> <img src="./docs/images/ouroboros.png" width="420" alt="Ouroboros"> <br/><br/> <strong>O U R O B O R O S</strong> <br/><br/> ◯ ─────────── ◯ <br/> </p> <p align="center"> <strong>It gets smarter on its own. We just hold the line.</strong> <br/> <sub>Skip the prompt engineering. The agent runs, fails, and gets smarter every generation. The grading command and expected result never make it into the success contract we hand it.</sub> <br/> <sub>The <strong>Agent OS</strong> for replayable AI coding workflows</sub> </p> <p align="center"> <a href="https://github.com/Q00/ouroboros"><img src="https://img.shields.io/github/stars/Q00/ouroboros?color=yellow&logo=github&label=stars" alt="GitHub stars"></a> <a href="https://pypi.org/project/ouroboros-ai/"><img src="https://img.shields.io/pypi/v/ouroboros-ai?color=blue" alt="PyPI"></a> <a href="https://github.com/Q00/ouroboros/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/Q00/ouroboros/test.yml?branch=main" alt="Tests"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="License"></a> <a href="https://github.com/sponsors/Q00"><img src="https://img.shields.io/github/sponsors/Q00?logo=githubsponsors&color=EA4AAA&label=sponsors" alt="GitHub Sponsors"></a> </p> <p align="center"> <a href="https://trendshift.io/repositories/26008?utm_source=repository-badge&utm_medium=badge&utm_campaign=badge-repository-26008" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/repositories/26008" alt="Q00%2Fouroboros | Trendshift" width="250" height="55"/></a> </p> <p align="center"> <a href="#quick-start">Quick Start</a> · <a href="#why-ouroboros">Why</a> · <a href="#what-you-get">Results</a> · <a href="#the-loop">How It Works</a> · <a href="#commands">Commands</a> · <a href="#from-wonder-to-ontology">Philosophy</a> · <a href="https://ouroboros.page/learn/en/">Guide</a> </p>
curl -fsSL https://raw.githubusercontent.com/Q00/ouroboros/main/scripts/install.sh | OUROBOROS_INSTALL_REF=readme-hero bash
<p align="center"><sub>One command installs it. Then run <code>ooo setup</code> once inside your coding agent — details in <a href="#quick-start">Quick Start</a>.</sub></p> <p align="center"><sub><b>Separate runs, separate hosts. Different tasks on purpose — the engine is what is shared, not the prompt</b></sub></p> <table align="center"> <tr> <td align="center" width="33%"><img src="./docs/images/ooo-interview.gif" width="300" alt="Terminal recording of the ouroboros CLI interview reporting an ambiguity score"><br><sub><b>Terminal CLI</b> — a task-management CLI: <code>ouroboros init start</code> asking about ordering and scope, then reporting an ambiguity score</sub></td> <td align="center" width="33%"><img src="./docs/images/host-codex.gif" width="300" alt="Screen recording of the ChatGPT app calling Ouroboros as an integration"><br><sub><b>ChatGPT (Codex)</b> — called as an integration, on a video-publishing harness: the interview, its advisory lanes, and the ambiguity ledger</sub></td> <td align="center" width="33%"><img src="./docs/images/host-claude.gif" width="300" alt="Screen recording of Claude Code running six Ouroboros interview advisory lanes in parallel"><br><sub><b>Claude Code</b> — a YouTube automation task, with the six advisory lanes running in parallel before the interview submits</sub></td> </tr> <tr> <td align="center" width="33%"><img src="./docs/images/host-hermes.gif" width="300" alt="Screen recording of a Discord bot running the Ouroboros interview and reporting a final ambiguity of 0.15"><br><sub><b>Hermes (Discord)</b> — a kart-racing game, run as a chat bot, ending at <code>Final ambiguity: 0.15</code></sub></td> <td align="center" width="33%"><img src="./docs/images/host-dsh.gif" width="300" alt="Screen recording of DeepSeek Harness calling the Ouroboros interview tool and submitting advisory fan-out results"><br><sub><b>DeepSeek Harness</b> — an OSS-trend outreach script, driven from a dsh chat: <code>mcp__ouroboros__ouroboros_interview</code> turn by turn, fan-out results submitted between rounds</sub></td> <td align="center" width="33%"><img src="./docs/images/host-kiro.gif" width="300" alt="10x screen recording of Kiro CLI running an Ouroboros interview"><br><sub><b>Kiro</b> — the Kiro CLI running the Ouroboros interview flow, turning a vague request into a structured, testable Seed</sub></td> </tr> </table>

Turn a vague idea into a verified, working codebase -- across Claude Code, Codex CLI, OpenCode, Hermes, Gemini, Kiro, Copilot, Pi, Zcode, Goose, GJC, Antigravity, and Grok.

Ouroboros is an Agent OS for AI coding: a local-first runtime layer that turns non-deterministic agent work into a replayable, observable, policy-bound execution contract. It replaces ad-hoc prompting with a structured specification-first workflow: interview, crystallize, execute, evaluate, evolve.


The Ouroboros Agent OS Stack

Like any OS, Ouroboros is split into a stable OS layer of primitives, an application layer of domain workflows, and a shell that humans actually sit in front of. Three repos, one stack:

LayerRepoRoleWhat it gives you
Shell (terminal client)Ouro-labs/ourocodeNative terminal UI for running ooo workflows across Claude / Codex / Gemini CLIs in one sessionTUI, wonderTool decision pickers, MCP pane state, command discovery
Apps (domain workflows)Ouro-labs/ouroboros-pluginsUserLevel plugin contract — composes core primitives into installable domain programs (PR ops, Jira sync, incidents, releases)Plugin manifest, scoped permissions, audit/provenance, reference plugins
OS (this repo)Q00/ouroborosAgent OS core — Seed, Ledger, Runtime, MCP, safety boundariesooo commands, spec-first workflow engine, multi-runtime adapter

How they connect:

  ourocode  ──►  ooo / ouroboros-plugins  ──►  ouroboros core (Seed · Ledger · MCP · Runtime)
   shell             user-level apps                        kernel
  • The kernel (ouroboros) owns the contract: every action becomes a Seed-bound, ledger-recorded, replayable event — regardless of which LLM executes it.
  • Plugins (ouroboros-plugins) declare scoped capabilities against that contract, so domain workflows (review a PR, triage a Linear ticket, run a release) stay auditable and policy-bound instead of being one-off prompts.
  • Ourocode is the terminal shell: it surfaces MCP state, interview questions, and wonderTool decisions as first-class TUI elements, so you can drive the OS without leaving the keyboard or switching between CLIs.

Use ouroboros alone with any supported CLI, layer plugins on for domain workflows, or install ourocode when you want a unified terminal cockpit.

Disclaimer. The Ouroboros project and community are not affiliated with any cryptocurrency, token, memecoin, or trading community — including, but not limited to, any "ouroboros" tickers on pump.fun or other launchpads. This is an open-source developer tool. We do not issue, endorse, or hold any coins. Any token claiming association with this project is unauthorized.

Naming note. A separate, unaffiliated open-source project also uses the name "Ouroboros" — Anton Razzhigaev's self-modifying, autonomous-memory agent at github.com/razzant/ouroboros. No shared code, no relationship. This project locks a specification before executing rather than rewriting its own architecture; if you're looking for the latter, that's the other one.


Why Ouroboros?

Most AI coding fails at the input, not the output. The bottleneck is not AI capability -- it is human clarity.

ProblemWhat HappensOuroboros Fix
Vague promptsAI guesses, you reworkSocratic interview exposes hidden assumptions
No specArchitecture drifts mid-buildImmutable seed spec locks intent before code
Manual QA"Looks good" is not verification3-stage automated evaluation gate

Quick Start

Install — one command, everything auto-detected:

curl -fsSL https://raw.githubusercontent.com/Q00/ouroboros/main/scripts/install.sh | OUROBOROS_INSTALL_REF=readme bash

First command — open your AI coding agent and run these in order:

> ooo setup
> ooo interview "I want to build a task management CLI"

ooo setup is a one-time configuration step. ooo interview is the first workflow command and starts the Socratic interview. After setup, Codex follows its currently selected model and Claude Code starts with its recommended model settings. Choose Directly configure models only when you want to pin a stage to a specific model; it opens the local settings screen in your browser. You can return to those settings any time with ooo config.

Or from a plain terminal, without an agent host:

$ ouroboros init start --orchestrator "I want to build a task management CLI tool"
<p align="center"> <sub>That recording is this exact command. It is at the top of this page so you can see the tool before installing it.</sub> </p> <p align="center"> <img src="./docs/images/ooo-setup-refresh.gif" width="760" alt="Terminal recording of ouroboros setup refresh installing Codex rules and skills, Hermes skills, the OpenCode plugin and instruction guide, and the Pi and GJC bridges, ending with the line Refreshed runtime artifacts: codex, hermes, opencode, pi, gjc"> </p> <p align="center"> <sub><code>ouroboros setup refresh</code> on one machine. It installs into the hosts that machine actually has, each in the shape that host expects: rules and skills for Codex, skills for Hermes, a plugin and an <code>AGENTS.md</code> for OpenCode, bridges for Pi and GJC. Your machine will show whichever of the thirteen you have installed.</sub> </p>

Works with Claude Code, Codex CLI, GitHub Copilot CLI, OpenCode, Hermes, Gemini, Kiro CLI, Pi CLI, Zcode, Goose, GJC, Antigravity CLI, and Grok Build CLI. The installer detects available runtimes and registers the MCP server where the host supports it. For explicit selection, run ouroboros setup --runtime <opencode|kiro|copilot|gemini|pi|zcode|goose|gjc|antigravity|grok> after installation. Copilot live-discovers its subscription catalog via the GitHub Copilot models API; Kiro's settings picker queries the authenticated CLI with kiro-cli chat --listmodels -f json, so account and enterprise allow-list changes appear without a hardcoded model table.

DeepSeek support. Ouroboros speaks DeepSeek two ways. Point the interview/Seed/QA pipeline at DeepSeek's own models with --llm-backend dsh (ouroboros mcp serve --runtime claude-cli --llm-backend dsh, or OUROBOROS_LLM_BACKEND=dsh) — this drives DeepSeek Harness's ACP server under the hood. Or go the other way: install the dsh-ouroboros plugin (dsh plugin --profile <your-profile> add "github:Q00/ouroboros#main&path:integrations/dsh-plugin") and type ooo interview / ooo auto directly in the DeepSeek Harness chat — the same ouroboros_interview / ouroboros_auto tools run natively inside it, Socratic questions and all. Both directions, including what the dsh backend needs beyond the one variable, are in the DeepSeek Harness guide.

<details> <summary><strong>Codex plugin quick start</strong></summary>

Needs codex on your PATH and uvx on the host (the plugin's MCP descriptor launches the server with it). Install uv with pipx install uv, pip install --user uv, or brew install uv.

codex plugin marketplace add Q00/ouroboros
codex plugin add ouroboros@ouroboros

Start a new Codex session, then run these commands in order:

ooo setup
ooo interview "Build a task management CLI"

ooo setup is the one-time runtime preparation. Once ready, Ouroboros follows Codex's current default model; choose Directly configure models only when you want to pin a specific model for a pipeline stage.

</details> <details> <summary><strong>Kiro CLI quick start</strong></summary>
pipx install 'ouroboros-ai[mcp]'       # or: uv tool install 'ouroboros-ai[mcp]'
ouroboros setup --runtime kiro         # detects Kiro CLI, registers MCP server, and
                                        # writes OUROBOROS_RUNTIME=kiro into
                                        # ~/.kiro/settings/mcp.json (the trusted,
                                        # setup-managed location -- a project .env
                                        # is untrusted input and this key is ignored there)

Then use ooo commands inside a Kiro CLI session.

</details> <details> <summary><strong>GitHub Copilot CLI quick start</strong></summary>
gh auth login                                # one-time GitHub auth (used for live model discovery)
pipx install 'ouroboros-ai[mcp]'             # or: uv tool install 'ouroboros-ai[mcp]'
ouroboros setup --runtime copilot            # discovers models live, picks a default,
                                             # registers MCP server in ~/.copilot/mcp-config.json

Restart your Copilot CLI session, then use ooo commands inside it. Model-ID mapping is catalog-gated: the current direct and OpenRouter Opus defaults resolve to Copilot's published claude-opus-5, while legacy Anthropic versions convert only their trailing numeric separator and only when the discovered catalog contains the exact candidate. Unknown IDs remain unchanged so Copilot reports an explicit unavailable-model error instead of silently selecting a different model. Leave role models unset so setup writes a discovered ID, or set a Copilot-valid ID explicitly. See the Copilot runtime guide.

See the GitHub Copilot CLI runtime guide for full details.

</details> <details> <summary><strong>Other install methods</strong></summary>

Claude Code plugin only (no Python package or global Python to install; the host needs uv, which provides both uvx for the MCP server and the skills' Python >= 3.12 fallback):

claude plugin marketplace add Q00/ouroboros && claude plugin install ouroboros@ouroboros

Then run ooo setup inside a Claude Code session.

pip / uv / pipx:

pip install ouroboros-ai                # base
pip install 'ouroboros-ai[claude]'        # + default Claude Agent SDK profile (MCP 1.x)
pip install 'ouroboros-ai[claude-cli]'    # + dependency-free Claude CLI worker profile
pip install 'ouroboros-ai[claude-sdk]'    # + explicit alias for the Claude SDK profile
pip install 'ouroboros-ai[litellm]'       # + LiteLLM multi-provider; Python 3.12-3.13
pip install 'ouroboros-ai[mcp]'           # + MCP server/client support
pip install 'ouroboros-ai[tui]'           # + Textual terminal UI
pip install 'ouroboros-ai[all]'           # MCP 1.x app bundle; excludes the MCP 2 server
ouroboros setup                         # configure runtime

Core and non-LiteLLM installs support Python 3.12-3.14. LiteLLM-bearing installs ([litellm], [all], and source --extra all) support Python 3.12-3.13; use Python 3.13 for current examples. See Platform Support.

[claude] preserves the in-process Agent SDK and its MCP 1.x dependency graph; [claude-sdk] is its explicit alias. The MCP 2 server runs from a separate [mcp] environment and selects the [claude-cli] subprocess worker when Claude is the host. Never install [mcp,claude], [mcp,claude-sdk], or [all,mcp] in one interpreter. See the package compatibility and migration matrix.

pip install 'ouroboros-ai[mcp]' is valid for embedding the MCP client/server library in an already isolated Python environment, but host registration requires uvx --isolated --python '>=3.12' or pipx. Use pipx install 'ouroboros-ai[mcp]' or uv tool install 'ouroboros-ai[mcp]' before ouroboros setup --runtime <kiro|copilot|hermes>; setup exits without changing runtime configuration when neither isolated launcher is available.

Legacy compatibility: ouroboros-ai[dashboard] is still accepted as a compatibility alias/no-op; it does not install dashboard runtime payload. ouroboros-ai[all] includes that no-op alias only for compatibility.

Homebrew (macOS/Linux):

brew tap q00/tap
brew install ouroboros-ai
ouroboros setup                         # configure runtime

Self-hosted tap, not yet in homebrew-core. Installs the same package published to PyPI.

See runtime guides: Claude Code · Codex CLI · Hermes · OpenCode · Kiro CLI · Gemini CLI · GitHub Copilot CLI · Zcode · Pi JSON mode · Goose · GJC · Antigravity CLI · Grok Build CLI

</details> <details> <summary><strong>Uninstall</strong></summary>
ouroboros uninstall

Removes all configuration, MCP registration, and data. See UNINSTALL.md for details.

</details>

Python >= 3.12 required. LiteLLM-bearing profiles support Python 3.12-3.13. See Platform Support and pyproject.toml.

Installing as an MCP server: use 0.51.1 or later. Earlier versions can fail at startup with Failed to reconnect to plugin:ouroboros:ouroboros: -32000 when an existing environment shadows the [mcp] profile (#2012). This matters if you install through a downstream package rather than PyPI, since those can lag.

<p align="center"> <sub>Most people find out they were unclear about three files into the review.<br/> If that feels familiar, star <a href="https://github.com/Q00/ouroboros"><strong>Q00/ouroboros on GitHub</strong></a> so the next person it could save can find it.</sub> </p>

What You Get

After one loop of the Ouroboros cycle, a vague idea becomes a verified codebase:

StepBeforeAfter
Interview"Build me a task CLI"12 hidden assumptions exposed, ambiguity scored to 0.19
SeedNo specImmutable specification with acceptance criteria, ontology, constraints
EvaluateManual review3-stage gate: Mechanical (free) -> Semantic -> Multi-Model Consensus
<details> <summary><strong>What just happened?</strong></summary>
interview  ->  Socratic questioning exposed 12 hidden assumptions
seed       ->  Crystallized answers into an immutable spec (Ambiguity: 0.15)
run        ->  Executed via Double Diamond decomposition
evaluate   ->  3-stage verification: Mechanical -> Semantic -> Consensus

Use ooo <cmd> inside your AI coding agent session, or ouroboros init start, ouroboros run seed.yaml, etc. from the terminal.

The serpent completed one loop. Each loop, it knows more than the last.

</details>

How It Compares

AI coding tools are powerful -- but they solve the wrong problem when the input is unclear.

Vanilla AI CodingOuroboros
Vague promptAI guesses intent, builds on assumptionsSocratic interview forces clarity before code
Spec validationNo spec -- architecture drifts mid-buildImmutable seed spec locks intent; ambiguity gate (<= 0.2) blocks premature code without explicit force
Evaluation"Looks good" / manual QA3-stage automated gate: Mechanical -> Semantic -> Multi-Model Consensus
Rework rateHigh -- wrong assumptions surface lateLow -- assumptions surface in the interview, not in the PR review

The Loop

The ouroboros -- a serpent devouring its own tail -- is not decoration. It IS the architecture:

    Interview -> Seed -> Execute -> Evaluate
        ^                           |
        +---- Evolutionary Loop ----+

Each cycle does not repeat -- it evolves. The output of evaluation feeds back as input for the next generation, until the system truly knows what it is building.

PhaseWhat Happens
InterviewSocratic questioning exposes hidden assumptions
SeedAnswers crystallize into an immutable specification
ExecuteDouble Diamond: Discover -> Define -> Design -> Deliver
Evaluate3-stage gate: Mechanical ($0) -> Semantic -> Multi-Model Consensus
EvolveWonder ("What do we still not know?") -> Reflect -> next generation

"This is where the Ouroboros eats its tail: the output of evaluation becomes the input for the next generation's seed specification." -- reflect.py

Convergence is reached when ontology similarity >= 0.95 -- when the system has questioned itself into clarity.

Ralph: The Loop That Never Stops

ooo ralph runs the evolutionary loop persistently -- across session boundaries -- until convergence is reached. Each step is stateless: the EventStore reconstructs the full lineage, so even if your machine restarts, the serpent picks up where it left off.

Ralph Cycle 1: evolve_step(lineage, seed) -> Gen 1 -> action=CONTINUE
Ralph Cycle 2: evolve_step(lineage)       -> Gen 2 -> action=CONTINUE
Ralph Cycle 3: evolve_step(lineage)       -> Gen 3 -> action=CONVERGED
                                                +-- Ralph stops.
                                                    The ontology has stabilized.

Commands

Inside AI coding agent sessions, use ooo <cmd> skills. From the terminal, use the ouroboros CLI.

Skill (ooo)CLI equivalentWhat It Does
ooo setupouroboros setupRegister runtime and configure project (one-time)
ooo interviewouroboros init startSocratic questioning -- expose hidden assumptions
ooo autoouroboros autoGoal → A-grade Seed → execution handoff with bounded loops
ooo seed(generated by interview)Crystallize into immutable spec
ooo runouroboros run seed.yamlExecute via Double Diamond decomposition
ooo evaluate(via MCP)3-stage verification gate
ooo evolve(via MCP)Evolutionary loop until ontology converges
ooo unstuck(via MCP)5 lateral thinking personas when you are stuck
ooo statusouroboros status executions / ouroboros status execution <id>Session tracking + (MCP-only) drift detection
ooo resume-sessionouroboros resumeList in-flight sessions and re-attach commands
ooo cancelouroboros cancel execution [<id>|--all]Cancel stuck or orphaned executions
ooo ralph(via MCP)Persistent loop until verified
ooo tutorial(interactive)Interactive hands-on learning
ooo helpouroboros --helpFull reference
ooo pm(via MCP)PM-focused interview + PRD generation
ooo qa(via skill)General-purpose QA verdict for any artifact
ooo updateouroboros updateCheck for updates + upgrade to latest
ooo brownfield(via skill)Scan and manage brownfield repo/worktree defaults
ooo publish(skill/runtime surface; uses gh CLI)Publish a Seed as GitHub Epic/Task issues for team workflows

Not all skills have direct CLI equivalents. Some (evaluate, evolve, unstuck, ralph, publish) are available through agent skills, runtime rules, or MCP tools rather than a direct ouroboros <subcommand> shell command. /resume is reserved for Claude Code's built-in session picker; use ooo resume-session for Ouroboros in-flight sessions. Claude Code also reserves /run, /status, /help, and /config. The safe direct skill forms are /ouroboros:ouroboros-run, /ouroboros:ouroboros-status, /ouroboros:ouroboros-help, and /ouroboros:ouroboros-config; the familiar ooo run, ooo status, ooo help, and ooo config phrases remain supported.

See the CLI reference for full details.


The Nine Minds

Nine agents, each a different mode of thinking. Loaded on-demand, never preloaded:

AgentRoleCore Question
Socratic InterviewerQuestions-only. Never builds."What are you assuming?"
OntologistFinds essence, not symptoms"What IS this, really?"
Seed ArchitectCrystallizes specs from dialogue"Is this complete and unambiguous?"
Evaluator3-stage verification"Did we build the right thing?"
ContrarianChallenges every assumption"What if the opposite were true?"
HackerFinds unconventional paths"What constraints are actually real?"
SimplifierRemoves complexity"What's the simplest thing that could work?"
ResearcherStops coding, starts investigating"What evidence do we actually have?"
ArchitectIdentifies structural causes"If we started over, would we build it this way?"

Under the Hood

<details> <summary><strong>Architecture overview -- Python >= 3.12</strong></summary>
src/ouroboros/
+-- bigbang/        Interview, ambiguity scoring, brownfield explorer
+-- routing/        PAL Router -- 3-tier cost optimization (1x / 10x / 30x)
+-- execution/      Double Diamond, hierarchical AC decomposition
+-- evaluation/     Mechanical -> Semantic -> Multi-Model Consensus
+-- evolution/      Wonder / Reflect cycle, convergence detection
+-- resilience/     4-pattern stagnation detection, 5 lateral personas
+-- observability/  3-component drift measurement, auto-retrospective
+-- persistence/    Event sourcing (SQLAlchemy + aiosqlite), checkpoints
+-- orchestrator/   Runtime abstraction layer (Claude Code, Codex CLI, OpenCode, Hermes, Gemini, Kiro, Copilot, Pi)
+-- core/           Types, errors, seed, ontology, security
+-- providers/      LiteLLM adapter (100+ models)
+-- mcp/            MCP client/server integration
+-- plugin/         Plugin system (skill/agent auto-discovery)
+-- tui/            Terminal UI dashboard
+-- cli/            Typer-based CLI

Key internals:

  • PAL Router -- Frugal (1x) -> Standard (10x) -> Frontier (30x) with auto-escalation on failure, auto-downgrade on success
  • Drift -- Goal (50%) + Constraint (30%) + Ontology (20%) weighted measurement, threshold <= 0.3
  • Brownfield -- Auto-detects config files across multiple language ecosystems
  • Evolution -- Up to 30 generations, convergence at ontology similarity >= 0.95
  • Stagnation -- Detects spinning, oscillation, no-drift, and diminishing returns patterns
  • Agent OS runtime -- Replayable execution contract across capability discovery, policy, directives, event journal, and agent processes
  • Runtime backends -- Pluggable abstraction layer (orchestrator.runtime_backend config) with first-class support for Claude Code, Codex CLI, OpenCode, Hermes, Gemini, Goose, Kiro, Copilot, and Pi; same workflow spec, different execution engines

See Architecture for the full design document.

</details>

From Wonder to Ontology

<details> <summary><strong>The philosophical engine behind Ouroboros</strong></summary>

Wonder -> "How should I live?" -> "What IS 'live'?" -> Ontology -- Socrates

Every great question leads to a deeper question -- and that deeper question is always ontological: not "how do I do this?" but "what IS this, really?"

   Wonder                          Ontology
"What do I want?"    ->    "What IS the thing I want?"
"Build a task CLI"   ->    "What IS a task? What IS priority?"
"Fix the auth bug"   ->    "Is this the root cause, or a symptom?"

This is not abstraction for its own sake. When you answer "What IS a task?" -- deletable or archivable? solo or team? -- you eliminate an entire class of rework. The ontological question is the most practical question.

Ouroboros embeds this into its architecture through the Double Diamond:

    * Wonder          * Design
   /  (diverge)      /  (diverge)
  /    explore      /    create
 /                 /
* ------------ * ------------ *
 \                 \
  \    define       \    deliver
   \  (converge)     \  (converge)
    * Ontology        * Evaluation

The first diamond is Socratic: diverge into questions, converge into ontological clarity. The second diamond is pragmatic: diverge into design options, converge into verified delivery. Each diamond requires the one before it -- you cannot design what you have not understood.

</details> <details> <summary><strong>Ambiguity Score: The Gate Between Wonder and Code</strong></summary>

The Interview does not end when you feel ready -- it ends when the math says you are ready. Ouroboros quantifies ambiguity as the inverse of weighted clarity:

Ambiguity = 1 - Sum(clarity_i * weight_i)

Each dimension is scored 0.0-1.0 by the LLM (temperature 0.1 for reproducibility), then weighted:

DimensionGreenfieldBrownfield
Goal Clarity -- Is the goal specific?40%35%
Constraint Clarity -- Are limitations defined?30%25%
Success Criteria -- Are outcomes measurable?30%25%
Context Clarity -- Is the existing codebase understood?--15%

Threshold: Ambiguity <= 0.2. A score above that blocks Seed generation. Passing force explicitly is what gets past it, and the CLI puts that choice on screen next to continue and cancel. The gate is a default worth arguing with, not a lock.

Example (Greenfield):

  Goal: 0.9 * 0.4  = 0.36
  Constraint: 0.8 * 0.3  = 0.24
  Success: 0.7 * 0.3  = 0.21
                        ------
  Clarity             = 0.81
  Ambiguity = 1 - 0.81 = 0.19  <= 0.2 -> Ready for Seed

Why 0.2? Because at 80% weighted clarity, the remaining unknowns are small enough that code-level decisions can resolve them. Above that threshold, you are still guessing at architecture.

</details> <details> <summary><strong>Ontology Convergence: When the Serpent Stops</strong></summary>

The evolutionary loop does not run forever. It stops when consecutive generations produce ontologically identical schemas. Similarity is measured as a weighted comparison of schema fields:

Similarity = 0.5 * name_overlap + 0.3 * type_match + 0.2 * exact_match
ComponentWeightWhat It Measures
Name overlap50%Do the same field names exist in both generations?
Type match30%Do shared fields have the same types?
Exact match20%Are name, type, AND description all identical?

Threshold: Similarity >= 0.95 -- the loop converges and stops evolving.

But raw similarity is not the only signal. The system also detects pathological patterns:

SignalConditionWhat It Means
StagnationSimilarity >= 0.95 for 3 consecutive generationsOntology has stabilized
OscillationGen N ~ Gen N-2 (period-2 cycle)Stuck bouncing between two designs
Repetitive feedback>= 70% question overlap across 3 generationsWonder is asking the same things
Hard cap30 generations reachedSafety valve
Gen 1: {Task, Priority, Status}
Gen 2: {Task, Priority, Status, DueDate}     -> similarity 0.78 -> CONTINUE
Gen 3: {Task, Priority, Status, DueDate}     -> similarity 1.00 -> CONVERGED

Two mathematical gates, one philosophy: do not build until you are clear (Ambiguity <= 0.2), do not stop evolving until you are stable (Similarity >= 0.95).

</details>

Contributing

git clone https://github.com/Q00/ouroboros
cd ouroboros
uv sync --python 3.13 --all-groups
uv run --python 3.13 --no-sync pytest

Issues · Discussions · Contributing Guide


Sponsors

Ouroboros is MIT-licensed and built in the open. If it saves you rework — or you want the loop to keep evolving — consider sponsoring. Sponsorship directly funds maintenance, new runtime integrations, and sponsor-only deep-dive content.

<p align="center"> <a href="https://github.com/sponsors/Q00"><img src="https://img.shields.io/badge/%E2%9D%A4%EF%B8%8E%20Sponsor%20on%20GitHub-EA4AAA?style=for-the-badge&logo=githubsponsors&logoColor=white" alt="Sponsor Q00 on GitHub"></a> </p>

Every sponsor keeps the serpent evolving. Thank you.


Activity

These numbers are generated from GitHub data and refreshed automatically; caching may delay updates.

<p align="center"> <a href="https://github.com/Q00/ouroboros/graphs/contributors"><img src="https://img.shields.io/github/contributors/Q00/ouroboros?color=orange" alt="Contributors"></a> <a href="https://github.com/Q00/ouroboros/commits/main"><img src="https://img.shields.io/github/commit-activity/m/Q00/ouroboros?color=orange" alt="Commit activity"></a> <a href="https://github.com/Q00/ouroboros/pulls?q=is%3Apr+is%3Aclosed"><img src="https://img.shields.io/github/issues-pr-closed/Q00/ouroboros?color=orange" alt="Closed pull requests"></a> <a href="https://github.com/Q00/ouroboros/commits/main"><img src="https://img.shields.io/github/last-commit/Q00/ouroboros?color=orange" alt="Last commit"></a> </p>
<p align="center"> <em>"The beginning is the end, and the end is the beginning."</em> <br/><br/> <strong>The serpent does not repeat -- it evolves.</strong> <br/><br/> <code>MIT License</code> </p>

Related MCP servers

Control a real Chrome browser to complete any task: fill forms, extract data, book flights.

110k
Python
MIT
View repository →

Real-time global intelligence: markets, conflicts, country risk, energy, and infrastructure monitoring via 39 MCP tools.

83k
TypeScript
AGPL-3.0
View repository →

Netdata

Active

Real-time infrastructure monitoring with per-second metrics, ML-powered anomaly detection, and zero-configuration setup.

80k
Go
GPL-3.0
View repository →

Trending hip-hop artist momentum scores across four cultural dimensions.

79k
TypeScript
MIT
View repository →

AI orchestration platform with 100+ agents, swarm coordination, and self-learning memory for enterprise development.

68k
TypeScript
MIT
View repository →

Web scraping with stealth HTTP, real browsers, and Cloudflare bypass capabilities.

67k
Python
BSD-3-Clause
View repository →