Skip to main content

Pitaya — an orchestrator of AI coding agents (e.g., Claude Code, Codex CLI) with pluggable and custom strategies

Project description

🎯 Pitaya

Orchestrate AI coding agents (Claude Code, Codex CLI) with pluggable strategies and a clean TUI.

Python 3.13 Docker License

Note: Pitaya is in public beta. Interfaces and defaults may evolve.

What It Does

  • Runs multiple agents in parallel and helps you pick the best result
  • Uses per‑task branches in your repo to keep alternatives safe and reviewable
  • Displays a clean, adaptive TUI with live progress, costs, and tokens
  • Supports custom Python strategies for multi‑stage workflows

Built‑in strategies: simple, scoring, best‑of‑n, iterative, bug‑finding, doc‑review

Install

pip install pitaya
# or
pipx install pitaya
# or
uv tool install pitaya

Authenticate:

  • Claude Code: set CLAUDE_CODE_OAUTH_TOKEN (subscription) or ANTHROPIC_API_KEY
  • Codex CLI: set OPENAI_API_KEY (and optionally OPENAI_BASE_URL)

Quickstart

From the root of a git repo:

pitaya "Create a HELLO.txt file with 'Hello from Pitaya' text in it and commit it"

More examples:

# Parallel candidates with scoring (pick the best)
pitaya "Write the funniest and most original joke possible" --strategy best-of-n -S n=5

# Iterative refine (generate → review → refine)
pitaya "Write the funniest and most original joke possible" --strategy iterative -S iterations=3

# Headless JSON output
pitaya "task" --json

OpenRouter (Codex plugin) example:

pitaya "Write the funniest and most original joke possible" \
  --plugin codex \
  --model "openai/gpt-5" \
  --api-key "$OPENROUTER_API_KEY" \
  --base-url https://openrouter.ai/api/v1

Documentation

Configuration (peek)

Optional pitaya.yaml to set defaults:

model: sonnet
plugin_name: claude-code
orchestration:
  max_parallel_instances: auto
  branch_namespace: hierarchical

CLI overrides config; -S key=value only affects the selected strategy.

Results & Logs

  • Logs: logs/<run_id>/events.jsonl and component logs
  • Results: results/<run_id>/ (summary.json, branches.txt, instance_metrics.csv)
  • Branches: pitaya/<strategy>/<run_id>/k<short8> (hierarchical namespace)
  • Resume: pitaya --resume <run_id>

Contributing

Issues and PRs are welcome. This project is evolving—feedback on UX, strategies, and plugin support is especially helpful.

Dev quickstart:

git clone https://github.com/tact-lang/pitaya
cd pitaya
python -m venv .venv && source .venv/bin/activate
pip install -U pip && pip install -e .

# Optional dev tools
pip install -U ruff black mypy pytest pytest-asyncio

Changelog

License

MIT License — see LICENSE.

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

pitaya-0.2.0.tar.gz (200.2 kB view details)

Uploaded Source

Built Distribution

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

pitaya-0.2.0-py3-none-any.whl (197.3 kB view details)

Uploaded Python 3

File details

Details for the file pitaya-0.2.0.tar.gz.

File metadata

  • Download URL: pitaya-0.2.0.tar.gz
  • Upload date:
  • Size: 200.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for pitaya-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0c7f205e8cef790e6624eaaada858607d9a50ea5552c2aa6a5930f767aa76da3
MD5 4bc01d8f066534fe66a01784f33ff80f
BLAKE2b-256 a437d9452bc7b9dd4e0532a79d685b941267ebb8535b4023fe37affa6a456e3e

See more details on using hashes here.

File details

Details for the file pitaya-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pitaya-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 197.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for pitaya-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10cdd1de70606ede49cef093f8b9f259ad81be96db6244f423f0e69bbf9f2254
MD5 01dbbf3fdea400c5e3b25af00831f6b0
BLAKE2b-256 3ca1e22fcce0f656e497de679bf8ef5752d27b51c7d52b132db11e3e9a44cfb6

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