Skip to content

suisenn1/orbiter

Repository files navigation

orbiter

Autonomous repo guardian. A multi-agent crew, powered by Xiaomi MiMo V2.5, that nightly hunts bugs, drafts minimal patches, verifies them in a sandbox, and opens PRs with audio + visual reviews.

CI License: MIT Python ruff mypy Powered by Xiaomi MiMo

orbiter end-to-end demo


What it does

Most "AI bug-fixer" tools stop at suggesting a diff. orbiter goes the last mile: it closes the loop end-to-end, in five sequential agents, all coordinated under one orchestrator with persistent run-state and deterministic recovery.

                +-----------+
input repo ---> | Detective | --> findings ---+
                +-----------+                 |
                                              v
                                       +-------------+
                                       | Reproducer  | --> regression tests +
                                       +-------------+                      |
                                                                            v
                                +------------------+   verdict   +--------------+
                                |     Surgeon      |  <-------+  |   Verifier   |
                                |  (max N rounds)  |          |  | (sandboxed)  |
                                +------------------+          |  +--------------+
                                          |  passed patches   |
                                          v                   |
                                  +--------------+            |
                                  |   Reviewer   | -----------> artefacts
                                  +--------------+         (PR md + PNG + audio)
Agent Role MiMo capability
Detective Scan source, surface high-confidence defects reasoner (JSON-strict)
Reproducer Author a pytest case that proves the bug reasoner
Surgeon Draft the smallest correct patch reasoner
Verifier Apply patch in sandbox, run repro and full suite – (pure execution)
Reviewer Compose PR title + body, render diagram, narrate audio reasoner + multimodal + TTS

The Surgeon ↔ Verifier loop is the closed-loop spine: a rejected patch hands the failure transcript back to the Surgeon as additional context, up to ORBITER_MAX_PATCH_ITERATIONS retries (default 3) before the finding is dropped.


Why audio reviews?

Every fix that ships green produces a 60–90 second narrated walkthrough attached to the PR. This is the unique angle MiMo TTS makes possible: async teams listen to PR reviews on a commute or during deep-work breaks instead of staring at another GitHub tab.


Quick start

git clone https://github.com/suisenn1/orbiter.git && cd orbiter
python3.11 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"

# Sanity check (works without an API key)
orbiter doctor

# Run the offline demo against the planted-bug fixture
orbiter run --mock examples/buggy_repo --out out

You'll see the table:

       orbiter run · 20260507T2110-6280
┏━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ phase      ┃ count ┃ notes                          ┃
┡━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ detective  │     2 │ high-confidence findings       │
│ reproducer │     2 │ regression tests authored      │
│ surgeon    │     2 │ patches accepted               │
│ verifier   │     2 │ patches verified green         │
│ reviewer   │     2 │ PR artefacts emitted           │
│ tokens     │     0 │ billed against MiMo budget     │
│ phase      │  done │                                │
└────────────┴───────┴────────────────────────────────┘

…and out/<run_id>/ will contain real artefacts:

out/20260507T2110-6280/
├── PR_F01-timing-attack.md      ← markdown PR body
├── F01-timing-attack.png        ← root-cause diagram (1280×720)
├── F01-timing-attack.wav        ← 60–90s audio walkthrough
├── PR_F02-bare-except.md
├── F02-bare-except.png
└── F02-bare-except.wav

Going live

cp .env.example .env
# fill in ORBITER_MIMO_API_KEY from https://platform.xiaomimimo.com
orbiter run examples/buggy_repo --out out

In live mode every agent calls MiMo: reasoner for analysis, multimodal for diagrams, TTS for narration. Mock-mode artefacts are byte-for-byte identical in structure to live ones, so reviewers and CI can lean on the deterministic offline brain.

Recovery

# crash mid-run? pick up exactly where it stopped:
orbiter recover
# or target a specific run id:
orbiter recover 20260507T2110-6280

CLI reference

Command Description
orbiter run <repo> Start a fresh pipeline against <repo>.
orbiter recover [<id>] Resume the latest unfinished (or a specific) run.
orbiter list Tabulate every persisted run.
orbiter show <id> Pretty-print a run's findings + token usage.
orbiter doctor Validate env, deps, and credentials.

All commands support -v / --verbose and --out <dir>.


Configuration

Every knob lives in environment variables (ORBITER_*) or .env. See .env.example for the full set; the highlights:

Variable Default Purpose
ORBITER_MIMO_API_KEY Empty → mock mode only.
ORBITER_MIMO_BASE_URL https://api.xiaomimimo.com/v1 Override for self-hosted MiMo.
ORBITER_MAX_TOKENS_PER_RUN 2_000_000 Hard budget cap (raises TokenBudgetExceeded).
ORBITER_MAX_PATCH_ITERATIONS 3 Surgeon ↔ Verifier retry rounds.
ORBITER_SANDBOX_TIMEOUT_SECONDS 120 Max wall-clock per pytest run.

Architecture in 60 seconds

  • Typed contracts everywhere. Every payload that crosses an agent boundary is a Pydantic v2 model; every LLM call uses response_format=json_schema with strict=True and a one-shot repair pass on ValidationError.
  • Persistent run-state. After every phase, the orchestrator writes <run_id>.json atomically (tmp + rename) to ~/.orbiter/. A crash never costs you tokens already spent.
  • Closed-loop verification. The Verifier snapshots the working tree to a sandbox, applies the Surgeon's patch, drops in the Reproducer's regression test, runs both the new test and the project's existing suite, and only marks the finding GREEN if everything passes.
  • Patch hygiene. Surgeon emits explicit (original, replacement) hunks (not free-form unified diffs); the orchestrator refuses to apply any hunk whose original doesn't appear exactly once in the file.
  • Mock mode = first-class citizen. Each agent ships a deterministic offline brain so the CI suite, the demo, and grant reviewers never need a credential.

See docs/architecture.md for the deep dive.


Roadmap

  • GitHub App: open the PR upstream automatically
  • Language packs beyond Python (TypeScript first)
  • Severity-weighted token budgeting
  • Slack / webhook notifier for green PRs
  • Self-hosted MiMo deployment guide

Acknowledgement

orbiter is a finalist for the Xiaomi MiMo Orbit 100T Token Creator Incentive Program. The reasoner-first architecture is a love letter to MiMo V2.5's three-pillar design: reasoning, multimodal, TTS behind one OpenAI-compatible endpoint.


License

MIT — see LICENSE.

About

Autonomous repo guardian — 5-agent crew that ships PRs with audio + visual reviews. Powered by Xiaomi MiMo V2.5.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors