polyresearch is the mandatory Rust CLI and terminal dashboard for the polyresearch protocol.
It is designed to be used by agents and humans as the canonical path for protocol state transitions, while still being ergonomic for anyone who wants a live status view.
The protocol stores truth in GitHub issue comments, PR comments, and branches. In practice, contributors repeatedly re-implement the same state derivation logic and get it wrong:
- double-claiming already claimed theses
- generating new theses while
results.tsvis stale - posting malformed structured comments
- continuing work after a thesis has already been resolved
This CLI centralizes that logic so every machine uses the same implementation and the lead can validate canonical state against raw GitHub activity.
cargo install polyresearchDownload a pre-built binary
Pre-built archives are available from GitHub Releases.
| OS | Architecture | Archive |
|---|---|---|
| macOS | Apple Silicon | polyresearch-aarch64-apple-darwin.tar.xz |
| macOS | Intel | polyresearch-x86_64-apple-darwin.tar.xz |
| Linux | x86_64 (glibc) | polyresearch-x86_64-unknown-linux-gnu.tar.xz |
Each archive expands to a directory containing polyresearch and README.md. Move polyresearch somewhere on your PATH, such as ~/.local/bin or /usr/local/bin.
macOS (Apple Silicon):
curl -LO https://github.com/superagent-ai/polyresearch/releases/latest/download/polyresearch-aarch64-apple-darwin.tar.xz
tar -xJf polyresearch-aarch64-apple-darwin.tar.xz
sudo cp polyresearch-aarch64-apple-darwin/polyresearch /usr/local/bin/macOS (Intel):
curl -LO https://github.com/superagent-ai/polyresearch/releases/latest/download/polyresearch-x86_64-apple-darwin.tar.xz
tar -xJf polyresearch-x86_64-apple-darwin.tar.xz
sudo cp polyresearch-x86_64-apple-darwin/polyresearch /usr/local/bin/Linux (x86_64):
curl -LO https://github.com/superagent-ai/polyresearch/releases/latest/download/polyresearch-x86_64-unknown-linux-gnu.tar.xz
tar -xJf polyresearch-x86_64-unknown-linux-gnu.tar.xz
sudo cp polyresearch-x86_64-unknown-linux-gnu/polyresearch /usr/local/bin/Build from source
From the repo root:
cargo install --path cligitgh- a repo containing
POLYRESEARCH.md,PROGRAM.md, andPREPARE.md - GitHub authentication through
gh auth login
The CLI can read GITHUB_TOKEN, but by default it uses the existing gh authentication on the machine.
Release tags follow vX.Y.Z and must match the version in cli/Cargo.toml. Bump the crate version, push the matching tag, and GitHub Actions publishes the archives and checksums to GitHub Releases.
Initialize the local node identity once per repo:
polyresearch init
polyresearch init --capacity 50This writes .polyresearch-node.toml in the repo root. The file stores a stable node_id and a capacity percentage (1..=100) giving the share of the total machine this project may use. Additional tuning fields such as api_budget and request_delay_ms are documented in POLYRESEARCH.md.
Inspect the current state:
polyresearch pace
polyresearch status
polyresearch audit
polyresearch pace --json
polyresearch status --json
polyresearch status --tuiDebug GitHub traffic when you need to inspect request pacing or rate-limit headers:
polyresearch --github-debug pace --json
POLYRESEARCH_GITHUB_DEBUG=1 polyresearch statusContributor flow:
polyresearch claim 88
polyresearch attempt 88 --metric 0.6244 --baseline 0.5000 --observation improved --summary "River all-in with two pair+"
polyresearch submit 88
polyresearch release 88 --reason no_improvement
polyresearch batch-claimpolyresearch claim creates a dedicated worktree at .worktrees/<issue>-<slug>/ from main and prints the path. Change into that worktree before editing or running evaluations. The main worktree stays on main so the lead can sync, decide, and generate without races from concurrent contributors.
polyresearch batch-claim --count N is the multi-thesis version for contributors dispatching sub-agents. It claims N approved theses, creates one worktree per thesis, and requires worktrees for parallel execution. Pick N from polyresearch pace after dividing your effective hardware budget by each eval's resource footprint.
Review flow:
polyresearch review-claim 93
polyresearch review 93 --metric 0.6244 --baseline 0.5000 --observation improvedLead flow:
polyresearch sync
polyresearch duties
polyresearch generate --title "New thesis" --body "Hypothesis and rationale"
polyresearch policy-check 93
polyresearch decide 93
polyresearch prune
polyresearch admin reconcile-ledgerRun the lead from the repository root on main. Launch contributors as separate agents in their own thesis worktrees.
Maintainer approval (when auto_approve is false in PROGRAM.md):
The maintainer comments /approve or /reject directly on thesis issues and candidate PRs in GitHub. Both commands accept an optional reason that the lead reads as directional input for future thesis generation.
/approve focus on normalization layers
/reject this direction already failed for architectural reasons
- Default output is human-readable terminal text.
--jsonreturns structured JSON for agent consumption.status --tuiopens the ratatui dashboard for a live human view.
polyresearch init-- set node identity andcapacity(percent of total machine), verify GitHub auth, detect repopolyresearch pace-- show the hardware budget (machine, your max, live free), GitHub API budget, active claims, and recent node throughputpolyresearch status-- derive thesis state, queue depth, active nodes, current best metricpolyresearch audit-- validate raw GitHub activity and report invalid or suspicious protocol eventspolyresearch claim-- atomically claim a thesis and create the thesis worktree at.worktrees/<issue>-<slug>/polyresearch batch-claim-- claim up to the node's free thesis slots and create one worktree per thesispolyresearch attempt-- post a structured attempt comment from the current branchpolyresearch release-- release a claim with a structured reasonpolyresearch submit-- push the branch and open a candidate PRpolyresearch review-claim-- claim a PR for reviewpolyresearch review-- post a structured review record with env hashpolyresearch sync-- reconcileresults.tsvfrom the comment trailpolyresearch generate-- open a thesis issue (auto-approves whenauto_approveistrue, otherwise assigns to maintainer)polyresearch policy-check-- validate PR files against the editable surfacepolyresearch decide-- post the lead decision and merge/close accordingly (waits for maintainer/approvewhenauto_approveisfalse)polyresearch duties-- list blocking and advisory work items for the current nodepolyresearch prune-- prune git worktree metadata and remove empty stale directories under.worktreespolyresearch admin ...-- lead-only repair commands for exceptional recovery
- The comment trail remains the visible source of activity.
- Canonical protocol state is derived from validated CLI-compatible events only.
results.tsvis treated as a lead-maintained ledger derived from canonical history.- Raw manual GitHub edits may remain visible for auditability, but they are non-canonical and may be ignored by the lead and the tooling.
- The CLI keeps normal GitHub comments and PR activity human-readable while abstracting the protocol bookkeeping into the tool itself.