Skip to main content

Autonomous multi-agent code improvement system

Project description

Recipro

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.

Install

pip install recipro-ai

Prerequisites

  • Python 3.11+
  • claude CLI — npm install -g @anthropic-ai/claude-code then claude login
  • codex CLI — npm install -g @openai/codex then codex login (if using Codex as builder/critic)
  • git and gh (GitHub CLI, for PR creation)
  • OPENAI_API_KEY or GEMINI_API_KEY env var (optional, for ambient supervisor)

Quick start

recipro

On first run, Recipro walks you through setup:

First-time setup:
  Target repo path: /path/to/your/repo
  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.

Usage

recipro                          # Run: setup (if first time) → focus → execute
recipro --reconfigure            # Re-do setup (change repo, 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 run

Focus directive

Each 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).

Changing settings

Backend, model, and repo path — re-run interactive setup:

recipro --reconfigure

Config 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=false

Cleaning up

If a run fails and leaves the target repo in a dirty state:

recipro --clean

This discards uncommitted changes, switches back to main, and deletes all recipro/* task branches.

How it works

┌─────────┐     ┌─────────┐     ┌─────────┐       ┌─────────┐     ┌─────────┐
│ 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)  │
                                         └──────────┘
  1. Planner (Claude) — scans the repo and breaks the directive into concrete tasks
  2. Builder (Claude or Codex) — implements each task
  3. Critic (Claude or Codex) — reviews changes, sends findings back to Builder (loops until pass)
  4. Builder — runs lint and tests; if anything fails, fixes and re-runs (loops until pass)
  5. Builder — creates branch, commits, pushes, opens PR
  6. Ambient Agent (GPT or Gemini) — monitors all agent output in the background, provides status updates, cost tracking, and anomaly detection

Features

  • 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 PR creation — full git workflow: pull latest, branch, lint, test, commit, push, PR
  • Auto-merge — optionally squash-merge PRs after creation
  • Worktree cleanup--clean resets a dirty repo left by a failed run
  • Zero dependencies — pure Python stdlib

Configuration

~/.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

Backend/model selections are in ~/.recipro/memory/preferences.json, managed via recipro --reconfigure.

Data directory

~/.recipro/
├─ config.yaml             # Settings
├─ memory/
│  ├─ preferences.json     # Repo path, backend/model selections
│  └─ state.json           # Run history
└─ reports/                # Per-run operational reports

Notes

  • 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 --clean to reset.
  • The ambient agent auto-disables after 3 consecutive API failures.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

recipro_ai-0.1.1.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

recipro_ai-0.1.1-py3-none-any.whl (35.0 kB view details)

Uploaded Python 3

File details

Details for the file recipro_ai-0.1.1.tar.gz.

File metadata

  • Download URL: recipro_ai-0.1.1.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for recipro_ai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 be306817bde10b9642c85b498d016b7acce3c47183fb4b43159b3b21e98950f4
MD5 dd229e3c5fc16ca3677d015866d0794e
BLAKE2b-256 2c4928b5c8a4f3b784b5ed2aac7cc02c34923d5be771b7485f4272ccf802144d

See more details on using hashes here.

File details

Details for the file recipro_ai-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: recipro_ai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 35.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for recipro_ai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0019caced694503d2fb841d15e1d4527c0b12c35aa5baf8c2f07b5f554a51017
MD5 bae457f1d221d4f4ddc67ed0757dc9df
BLAKE2b-256 693dbdb0061ac3b2d97ec5d2e52c5536839edd62b8bd277ee7b2dc2655ec1502

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page