Autonomous multi-agent code improvement. Point it at a repo, tell it what to do, and it plans, implements, reviews, and ships a PR — no manual intervention.
pip install recipro-ai- Python 3.11+
claudeCLI —npm install -g @anthropic-ai/claude-codethenclaude logincodexCLI —npm install -g @openai/codexthencodex login(if using Codex as builder/critic)gitandgh(GitHub CLI, for PR creation)OPENAI_API_KEYorGEMINI_API_KEYenv var (optional, for ambient supervisor)
reciproRun from your target repo directory (or use --repo):
cd /path/to/your/repo
recipro
On first run, Recipro walks you through backend/model setup:
First-time setup:
Planner model: ...
Critic backend: ...
Builder backend: ...
Ambient narrator: ...
Preferences saved to ~/.recipro/.
What should Recipro focus on?
> your directive here (or press Enter for general scan)
Preferences persist — subsequent runs only ask for the focus directive.
recipro # Run in current directory
recipro --repo /path/to/repo # Run on a specific repo
recipro --reconfigure # Re-do setup (change backends, models)
recipro --set KEY=VALUE # Change a config setting
recipro --dry-run # Plan only, no repo changes
recipro --clean # Reset dirty worktree from a failed runEach run asks what Recipro should focus on. You can write in any language:
What should Recipro focus on?
> Add input validation to all API endpoints
Press Enter with no input for a general code scan (finds bugs, security issues, maintainability improvements).
Backend and model selection — re-run interactive setup:
recipro --reconfigureConfig toggles — set directly from CLI:
recipro --set verbose=true # Show raw agent output
recipro --set max_improvements=3 # Tasks per run
recipro --set auto_merge=true # Squash-merge PRs automatically
recipro --set require_clean_worktree=falseIf a run fails and leaves the target repo in a dirty state:
recipro --cleanThis discards uncommitted changes, switches back to main, and deletes all recipro/* task branches.
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ Planner │ ──▶ │ Builder │ ──▶ │ Critic │ ──▶ │ Builder │ ──▶ │ Builder │
│ (Claude)│ │ │ │ │ │ Verify │ │ Push PR │
│ Scan & │ │ Implement│ │ Review │ │ Lint & │ │ Branch, │
│ plan │ │ changes │ ◀──│ findings│ ◀── │ test │ │ commit, │
│ tasks │ │ │ │ │ │ │ │ push │
└─────────┘ └────┬────┘ └─────────┘ └────┬────┘ └─────────┘
│ │ │ │
└──── loop ────┘ │ fix failures │
└──────────────┘
┌──────────┐
Observing all of ───▶ │ Ambient │
the above │ Agent │
│ (GPT/ │
│ Gemini) │
└──────────┘
- Planner (Claude) — scans the repo and breaks the directive into concrete tasks
- Builder (Claude or Codex) — implements each task
- Critic (Claude or Codex) — reviews changes, sends findings back to Builder (loops until pass)
- Builder — runs lint and tests; if anything fails, fixes and re-runs (loops until pass)
- Builder — creates branch, commits, pushes, opens PR
- Ambient Agent (GPT or Gemini) — monitors all agent output in the background, provides status updates, cost tracking, and anomaly detection
- Mix and match backends — assign Claude or Codex independently to each role (planner/builder/critic)
- Focus mode — natural-language directive each run, any language. No directive = general scan
- Ambient supervisor — background agent watching all output, reporting status, catching stuck loops, estimating costs
- Automatic test generation — builder writes happy + unhappy path tests for every change, critic reviews coverage (toggle with
add_tests) - Automatic PR creation — full git workflow: pull latest, branch, lint, test, commit, push, PR
- Auto-merge — optionally squash-merge PRs after creation
- Worktree-friendly — defaults to current directory, works naturally with git worktrees
- Worktree cleanup —
--cleanresets a dirty repo left by a failed run - Zero dependencies — pure Python stdlib
~/.recipro/config.yaml (auto-created on first run, editable via recipro --set):
max_improvements: 1 # Tasks per run
require_clean_worktree: true # Require clean git state before run
auto_merge: false # Auto squash-merge PRs after creation
verbose: false # Show raw agent streaming output
add_tests: true # Builder writes tests, critic reviews test coverageBackend/model selections are in ~/.recipro/memory/preferences.json, managed via recipro --reconfigure.
pytest tests/~/.recipro/
├─ config.yaml # Settings
├─ memory/
│ ├─ preferences.json # Backend/model selections
│ └─ state.json # Run history
└─ reports/ # Per-run operational reports
- Recipro pulls the latest code (
git pull) before each run. - Each task runs on its own branch created from the starting revision.
- If a task fails, Recipro stops and leaves the branch for inspection. Use
--cleanto reset. - The ambient agent auto-disables after 3 consecutive API failures.