agent-mcts
github.com
Monte Carlo tree search for coding agents: run Claude Code on several branches and apply the best result.
- Pricing
- Open source
- Published
- Nov 23, 2026
Next steps
- Blobby
Both tools are listed under AI Code Assistant, AI Developer Tools, claude-code, and coding-agent.
- CLI Agent Orchestrator (CAO)
Both tools are listed under AI Code Assistant, AI Developer Tools, claude-code, and codex-cli.
- NekoTrail
Both tools are listed under AI Code Assistant, AI Agent, and claude-code.
- Strix
- Pi
- Daily Stock Analysis (DSA)
What it does
agent-mcts is an open-source test-time search harness that wraps a coding agent CLI with Monte Carlo Tree Search. Instead of one trajectory, the agent explores several solution branches, backtracks from dead ends and concentrates its budget on the most promising path; a live tree view shows progress and the best branch can be applied as a diff. It is verified with Claude Code, with a Codex CLI adapter that is still untested against the real binary. The README publishes its benchmark: with generated tests the answer beat the first attempt in 16 of 20 runs. Version 0.4, MIT licence, available on PyPI.
Use cases
- Let Claude Code explore several solution branches for a well-specified task and keep the best one
- Generate tests before the search so each attempt is scored and revised against them
- Compare tree search with a single agent run on your own tasks before spending more budget
Frequently asked questions
- What does agent-mcts do?
- It wraps a coding agent CLI with Monte Carlo Tree Search, so the agent explores multiple solution branches, backtracks from dead ends and spends budget on the most promising path, then applies the best branch.
- Which agents are supported?
- It is verified with Claude Code. A Codex CLI adapter ships too, but the README says it has so far only been tested against a fake codex binary.
- Does it actually help?
- In the project's own benchmark (Claude Code with haiku, 20 runs on two spec-based tasks) the --generate-tests mode improved on the first attempt in 16 of 20 runs, at about 19 minutes and $2.44 per run. On a vague bug report the gain was much smaller.
- What is the licence and status?
- MIT licence; the project describes itself as v0.4, early but working end to end with Claude Code.