agent-mcts
Open-source harness that wraps a coding agent CLI such as Claude Code in Monte Carlo Tree Search to explore several solution branches and keep the best.
- AI tool
- Free
Overview
agent-mcts is an open-source (MIT) test-time search harness that wraps a coding agent CLI in Monte Carlo Tree Search. Instead of a single run, the agent explores several solution branches, backs out of dead ends and spends more of its budget on the most promising path. It can first write tests from the task and score every attempt against them, or use a judge that reads the diffs. It is verified with Claude Code, and its Codex CLI adapter has so far only been tested against a stand-in binary. You get the best-scoring answer from the search, shown in a live tree, ready to apply to your code.
Key features
- Monte Carlo Tree Search over agent attempts
- Generated tests to score each attempt
- Optional diff-reading judge
- Live search tree, then apply
- Verified with Claude Code; Codex CLI adapter
- Python package on PyPI
Use cases
Show all 7Show fewer
Alternatives
Last updated 2026-11-22