Tell a person to draw an apple and stop when they're satisfied. They draw it a few times, feel happy, and stop. Tell an AI the exact same thing. It never stops.
That one gap is the whole story here. "Autonomous AI" — agents that run themselves — is everywhere right now. But the moment you actually build a loop where an AI generates its own work, grades it, and improves, you hit a wall nobody warns you about: the AI doesn't know when it's done. It found a 99% answer and still burned dozens of tries chasing a last fraction it could never reach — until it was switched off from outside.
This repository is two things at once:
- 📖 A beginner-first field guide that teaches you — from zero, no PhD required — what an autonomous AI loop is, how to build one, and how to fix the "it never stops" problem. → Start reading
- 🔬 The real research behind it: three published papers (and one in progress), with all the code and data you can run yourself.
By the time you finish the guide, you will be able to:
- ✅ Explain, in plain language, what an autonomous AI loop is — and why "autonomous" is harder than it sounds.
- ✅ Build one yourself, from scratch — and prove it's genuinely learning, not cheating.
- ✅ Recognize why autonomous agents break — the "sunk-cost trap" — and catch it in your own agents.
- ✅ Apply three real, proven fixes — blinding, a reviewer agent, and self-scoring math (Omega).
- ✅ Read the research and run the code behind every claim.
You don't need to know any of this yet. That's the whole point — you'll build it up one level at a time.
Autonomy is not the default state of an AI in a loop. Left alone, an AI cannot decide it's "done." Knowing when to stop is the hardest part of making it autonomous — and this is the story of engineering that stop.
You don't build a self-running AI in one leap. You add one capability at a time, and each level only makes sense once you've felt the problem in the level before it. This is the exact ladder the guide walks you up:
flowchart TB
L1["🔁 <b>Level 1 · Close the loop</b><br/>One AI: try → check → adjust → repeat — <i>Chapters 1–2</i>"]
L2["🙈 <b>Level 2 · Blind it</b><br/>Hide what the data is, so improvement can only come from real learning — <i>Chapter 2</i>"]
L3["🛑 <b>Level 3 · Ask it to stop</b><br/>…and watch it refuse. You've just hit the sunk-cost trap — <i>Chapter 3</i>"]
L4["👥 <b>Level 4 · Add a second mind</b><br/>A Reviewer agent, differently-wrong, holds the STOP key — <i>Chapter 4</i>"]
L5["🧮 <b>Level 5 · Swap talk for math</b><br/>Omega — the loop grades itself with a number it can't argue with — <i>Chapter 5</i>"]
L6["🚀 <b>Level 6 · Let it run itself</b><br/>A Director routes, stops, and escalates on its own — <i>Chapter 6</i>"]
L1 --> L2 --> L3 --> L4 --> L5 --> L6
style L1 fill:#0f172a,stroke:#38bdf8,color:#fff
style L2 fill:#0f172a,stroke:#38bdf8,color:#fff
style L3 fill:#7f1d1d,stroke:#f87171,color:#fff
style L4 fill:#1e3a8a,stroke:#60a5fa,color:#fff
style L5 fill:#064e3b,stroke:#34d399,color:#fff
style L6 fill:#374151,stroke:#9ca3af,color:#fff
Levels 1–2 get a loop working. Level 3 is where it breaks — the discovery at the heart of this research. Levels 4–6 are three escalating ways to fix it. Follow the chapters below and you climb this ladder one rung at a time.
Read it like a short book — top to bottom, each chapter builds on the last. Every hard idea starts with a plain-life analogy, then the machine, then the real numbers from the experiments.
| # | Chapter | What you'll learn |
|---|---|---|
| 0 | Start Here | The apple story and the big idea (5-min read) |
| 1 | What Is a Loop? | What "AI in the loop" means, from zero |
| 2 | Build Your First Loop | The four moving parts, hands-on — you can run it |
| 3 | The Stopping Problem | Why an AI alone can't satisfy itself — with real failures |
| 4 | Fixing It With Teams | Why a committee of specialists beats one genius |
| 5 | Fixing It With Math | Proof beats talk: Omega (Ω), a number that decides |
| 6 | What's Next | The open frontier + an experiment you could run |
| — | Glossary | Every term, in plain language |
Who it's for: anyone curious about autonomous AI who can read a little Python. What you'll leave with: a real mental model of how self-running AI loops work, why they fail, and three proven ways to fix them — plus runnable code for each.
The field guide is the friendly front door. These are the rigorous, citable papers it's built on, from Sanskar Jajoo / Neuralchemy Labs:
- 🔴 Paper 1 — AITL Taxonomy (Zenodo) · the vocabulary and the first proof-of-concept. Code:
experiments/aitl_blind_nas/ - 🟢 Paper 2 — The Autonomous Sunk-Cost Fallacy (Zenodo) · the stopping problem, measured across 13 models. Code:
aeos_sunk_cost/ - 🔵 Paper 3 — The Modality Paradox (Zenodo) · both fixes: the team-based fix (and its surprising twist) and the math-based Cognitive Yield (Ω) self-scoring stop. Code:
experiments/modality_paradox/
On the math-based fix: the self-scoring number this guide calls Ω (Omega) is published in Paper 3 under the name Cognitive Yield. It's being built into a full self-running meta-orchestrator in the sibling
aeos-labproject — that's the live frontier (Chapter 6), not a separate paper.
For the formal, academic definitions, see docs/. For citations, see CITATION.cff.
Autopilot-Zero-to-Hero/
├── book/ 📖 The beginner field guide (START HERE)
├── docs/ 📐 Formal definitions (the rigorous version of the book)
├── paper/ 📄 The scientific manuscripts (Papers 1–3)
│ ├── paper1_taxonomy/
│ ├── paper2_sunk_cost/
│ └── paper3_modality_paradox/
├── experiments/ 🧪 Runnable loop code
│ ├── aitl_blind_nas/ → Chapter 2 (your first loop)
│ └── modality_paradox/ → Chapter 4 (team loops)
└── aeos_sunk_cost/ 🧪 Runnable code for the sunk-cost study → Chapter 3
(An archive/ folder with legacy drafts is kept locally only — it's excluded from GitHub via .gitignore.)
Every loop in the book is real code. Copy .env.example to .env in a code folder and add your LLM API keys (or point it at a free local model — see the file headers).
# Chapter 2 — your first blind autonomous loop
cd experiments/aitl_blind_nas && python runner.py
# Chapter 3 — the single-agent sunk-cost loops
cd aeos_sunk_cost && python runner.py
# Chapter 4 — the two-agent (Reviewer + Coder) team loop
cd aeos_sunk_cost && python runner_critic.pyNote
Where things live: GitHub hosts the runnable code, data, and this guide. Zenodo hosts the permanent, citable preprint PDFs. Use the Zenodo records in CITATION.cff for formal citations.
Neuralchemy Labs Research Series — neuralchemy.in
New here? 📖 Start with the apple story →