Structured Parallel Automated Research
SPAR is a command-line tool for structured, parallel automated research, combining Monte Carlo tree search guidance with judgement from delegated research agents.
- Structured: explicit objective, candidate hypotheses, lineage, measurements, decisions, and artifacts
- Parallel: isolated candidate work proceeds concurrently
Comparison of a simple sequential agent (no subagents) with SPAR at different parallelism levels, using the same harness and model across N=8 runs on a VLIW SIMD optimization problem. Each run used 32 candidate iterations.
Early results suggest that SPAR reaches better results with fewer candidate iterations and lower variance.
With a fresh agent session for every turn, both SPAR configurations took longer to complete all 32 candidates than the simple sequential agent, with p=1 taking the longest. This motivated SPAR's subsequent transition to persistent agent sessions; see LEARNINGS.md.
Caveat: proof-of-concept results from limited resources, not a rigorous benchmark.
Explore SPAR's search progression through these interactive visualizations.
SPAR research improved on the July 17, 2026 upstream best by 5.2 seconds (6.9%): 75.772s → 70.554s across eight seeds on the same GCP 8×H100 allocation. See nanogpt/ for the solution, validation results, and raw logs.
Requires uv:
uv tool install --python 3.14 git+https://github.com/mrhooray/spar.gitSupported harnesses: codex, claude-code, opencode, and pi.
Inside the target Git repository:
spar init SESSION_NAMEInitialized session SESSION_NAME.
Edit:
objective: /path/to/repo/.spar/SESSION_NAME/objective.md
config: /path/to/repo/.spar/SESSION_NAME/config.toml
spar start SESSION_NAMECheck progress or inspect candidates with:
spar status SESSION_NAME
spar top SESSION_NAME
spar inspect SESSION_NAME CANDIDATE_IDUse spar stop SESSION_NAME or press Ctrl-C to request a stop. A repeated spar start SESSION_NAME continues a stopped or interrupted session.

