Agent OS: the agent gets smarter on its own. We just hold the line: Interview-gated, staged evaluation, budgeted evolution loop.
Overview
◯ ─────────── ◯ O U R O B O R O S ◯ ─────────── ◯ It gets smarter on its own. We just hold the line. 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. The Agent OS for replayable AI coding workflows Quick Start · Why · Results · How It Works · Commands · Philosophy · Guide One command installs it. Then run ooo setup once inside your coding agent — details in Quick Start . Separate runs, separate hosts. Different tasks on purpose — the engine is what is shared, not the prompt Ouroboros is an 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.
README
English | 한국어 | 简体中文
◯ ─────────── ◯
O U R O B O R O S
◯ ─────────── ◯
It gets smarter on its own. We just hold the line.
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.
The Agent OS for replayable AI coding workflows
Quick Start · Why · Results · How It Works · Commands · Philosophy · Guide
# macOS / Linux / WSL 2
curl -fsSL https://raw.githubusercontent.com/Q00/ouroboros/main/scripts/install.sh | OUROBOROS_INSTALL_REF=readme-hero bash
# Windows (PowerShell) — no Python needed; installs Git and uv for you
irm https://raw.githubusercontent.com/Q00/ouroboros/main/scripts/install.ps1 | iex
One command installs it. Then run ooo setup once inside your coding agent — details in Quick Start.
Separate runs, separate hosts. Different tasks on purpose — the engine is what is shared, not the prompt
Turn a vague idea into a verified, working codebase – across Claude Code, Codex CLI, OpenCode, Hermes, Gemini, Kiro, Copilot, Pi, OMP, 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:
| Layer | Repo | Role | What it gives you |
|---|---|---|---|
| Shell (terminal client) | Ouro-labs/ourocode |
Native terminal UI for running ooo workflows across Claude / Codex / Gemini CLIs in one session |
TUI, wonderTool decision pickers, MCP pane state, command discovery |
| Apps (domain workflows) | Ouro-labs/ouroboros-plugins |
UserLevel 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/ouroboros |
Agent OS core — Seed, Ledger, Runtime, MCP, safety boundaries | ooo 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.
| Problem | What Happens | Ouroboros Fix |
|---|---|---|
| Vague prompts | AI guesses, you rework | Socratic interview exposes hidden assumptions |
| No spec | Architecture drifts mid-build | Immutable seed spec locks intent before code |
| Manual QA | “Looks good” is not verification | 3-stage automated evaluation gate |
Quick Start
Install — one command, everything auto-detected:
# macOS / Linux / WSL 2
curl -fsSL https://raw.githubusercontent.com/Q00/ouroboros/main/scripts/install.sh | OUROBOROS_INSTALL_REF=readme bash
# Windows (PowerShell 5.1+ or pwsh 7+) — nothing to install first
irm https://raw.githubusercontent.com/Q00/ouroboros/main/scripts/install.ps1 | iex
The Windows installer installs Git and uv through winget when they are missing,
lets uv download its own Python, then installs ouroboros-ai and wires the
host it finds. Native Windows is experimental and Codex CLI needs WSL 2; see
platform support.
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"
That recording is this exact command. It is at the top of this page so you can see the tool before installing it.
ouroboros setup refresh 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 AGENTS.md for OpenCode, bridges for Pi and GJC. Your machine will show whichever of the thirteen you have installed.
Works with Claude Code, Codex CLI, GitHub Copilot CLI, OpenCode, Hermes, Gemini, Kiro CLI, Pi CLI, OMP 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 --runtimeafter installation. Copilot live-discovers its subscription catalog via the GitHub Copilot models API; Kiro’s settings picker queries the authenticated CLI withkiro-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, orOUROBOROS_LLM_BACKEND=dsh) — this drives DeepSeek Harness’s ACP server under the hood. Or go the other way: install thedsh-ouroborosplugin (dsh plugin --profile add "github:Q00/ouroboros#main&path:integrations/dsh-plugin") and typeooo interview/ooo autodirectly in the DeepSeek Harness chat — the sameouroboros_interview/ouroboros_autotools run natively inside it, Socratic questions and all. Both directions, including what thedshbackend needs beyond the one variable, are in the DeepSeek Harness guide.
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: -32000when an existing environment shadows the[mcp]profile (#2012). This matters if you install through a downstream package rather than PyPI, since those can lag.
Most people find out they were unclear about three files into the review. If that feels familiar, star Q00/ouroboros on GitHub so the next person it could save can find it.
What You Get
After one loop of the Ouroboros cycle, a vague idea becomes a verified codebase:
| Step | Before | After |
|---|---|---|
| Interview | “Build me a task CLI” | 12 hidden assumptions exposed, ambiguity scored to 0.19 |
| Seed | No spec | Immutable specification with acceptance criteria, ontology, constraints |
| Evaluate | Manual review | 3-stage gate: Mechanical (free) -> Semantic -> Multi-Model Consensus |
How It Compares
AI coding tools are powerful – but they solve the wrong problem when the input is unclear.
| Vanilla AI Coding | Ouroboros | |
|---|---|---|
| Vague prompt | AI guesses intent, builds on assumptions | Socratic interview forces clarity before code |
| Spec validation | No spec – architecture drifts mid-build | Immutable seed spec locks intent; ambiguity gate (<= 0.2) blocks premature code without explicit force |
| Evaluation | “Looks good” / manual QA | 3-stage automated gate: Mechanical -> Semantic -> Multi-Model Consensus |
| Rework rate | High – wrong assumptions surface late | Low – 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.
| Phase | What Happens |
|---|---|
| Interview | Socratic questioning exposes hidden assumptions |
| Seed | Answers crystallize into an immutable specification |
| Execute | Double Diamond: Discover -> Define -> Design -> Deliver |
| Evaluate | 3-stage gate: Mechanical ($0) -> Semantic -> Multi-Model Consensus |
| Evolve | Wonder (“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 skills. From the terminal, use the ouroboros CLI.
Skill (ooo) |
CLI equivalent | What It Does |
|---|---|---|
ooo setup |
ouroboros setup |
Register runtime and configure project (one-time) |
ooo interview |
ouroboros init start |
Socratic questioning – expose hidden assumptions |
ooo auto |
ouroboros auto |
Goal → A-grade Seed → execution handoff with bounded loops |
ooo seed |
(generated by interview) | Crystallize into immutable spec |
ooo run |
ouroboros run seed.yaml |
Execute 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 status |
ouroboros status executions / ouroboros status execution |
Session tracking + (MCP-only) drift detection |
ooo resume-session |
ouroboros resume |
List in-flight sessions and re-attach commands |
ooo cancel |
ouroboros cancel execution [|--all] |
Cancel stuck or orphaned executions |
ooo ralph |
(via MCP) | Persistent loop until verified |
ooo tutorial |
(interactive) | Interactive hands-on learning |
ooo help |
ouroboros --help |
Full reference |
ooo pm |
(via MCP) | PM-focused interview + PRD generation |
ooo qa |
(via skill) | General-purpose QA verdict for any artifact |
ooo update |
ouroboros update |
Check 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 directouroborosshell command./resumeis reserved for Claude Code’s built-in session picker; useooo resume-sessionfor 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 familiarooo run,ooo status,ooo help, andooo configphrases remain supported.
See the CLI reference for full details.
The Nine Minds
Nine highlighted agents below, with 12 more specialized agents available (21 total). All loaded on-demand, never preloaded:
| Agent | Role | Core Question |
|---|---|---|
| Socratic Interviewer | Questions-only. Never builds. | “What are you assuming?” |
| Ontologist | Finds essence, not symptoms | “What IS this, really?” |
| Seed Architect | Crystallizes specs from dialogue | “Is this complete and unambiguous?” |
| Evaluator | 3-stage verification | “Did we build the right thing?” |
| Contrarian | Challenges every assumption | “What if the opposite were true?” |
| Hacker | Finds unconventional paths | “What constraints are actually real?” |
| Simplifier | Removes complexity | “What’s the simplest thing that could work?” |
| Researcher | Stops coding, starts investigating | “What evidence do we actually have?” |
| Architect | Identifies structural causes | “If we started over, would we build it this way?” |
Under the Hood
From Wonder to Ontology
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.
Every sponsor keeps the serpent evolving. Thank you.
Activity
These numbers are generated from GitHub data and refreshed automatically; caching may delay updates.
“The beginning is the end, and the end is the beginning.”
The serpent does not repeat – it evolves.
MIT License
Install
This server does not publish a one-line install command.
Open the repository installation guide