- Category
- AI Tools
- Rank
- No. 860Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- sakanaai
- GitHub
- 565 stars
- Latest release
- v0.3.2
- Date
About
Tree-search library with a flexible API for LLM inference-time scaling, from Sakana AI.
What it does
TreeQuest explores candidate answers by growing a tree of user-defined states. You supply generation and scoring logic, while its search algorithms choose what to expand. It can return leading candidates, run batched expansions, resume searches, and render the resulting tree.
Why it's ranked here
TreeQuest is a focused research-engineering library with unusually clear separation between search policy and model execution. Multiple Monte Carlo variants, order-independent result reporting, checkpoint support, and inspectable visualizations make it credible for controlled inference experiments. The heavier mixed-model path and scoring requirements keep it from being a turnkey answer system.
What's good
States can be any Python object, and actions can represent different models, prompts, or strategies. The ask-and-tell workflow separates candidate generation from tree management, supports batches, accepts results in any order, and ignores duplicate reports. Search state lives outside algorithm objects, which makes persistence and orchestration easier.
Tradeoffs
Users must implement generation, evaluation, and normalized scoring, so usefulness depends heavily on an external judge. The mixed-model algorithm needs substantial optional scientific dependencies and can run slowly. Large batches may produce overly wide trees, while HTML visualization requires careful handling when state content is untrusted.
How to use it well
Use TreeQuest when Python researchers or inference engineers need explicit control over branching, budgets, models, prompts, and scoring. Start with small batches, persist the returned search state, and inspect tree outputs while tuning policies. It does not supply an LLM provider, prompts, or a trustworthy evaluator.
Technical notes+
pyproject.toml defines a Hatchling-built Python package requiring Python 3.11 or newer, with abmcts-m, vis, and all extras. src/treequest/algos/base.py specifies a stateless Algorithm abstraction around step, ask_batch, and tell. src/treequest/trial.py tracks ULID-keyed running, completed, and invalid trials, including idempotent completion behavior and queued expansion handling. src/treequest/algos/tree.py validates non-root scores and stores parent-child relationships. src/treequest/__init__.py exposes ABMCTSA, ABMCTSM, StandardMCTS, TreeOfThoughtsBFSAlgo, ranking, and rendering, while deferring ABMCTSM dependency failures. src/treequest/vis/render.py routes snapshots to Graphviz images, JSON, YAML, Mermaid, Markdown, or interactive HTML.
Observed
- License
- Apache 2.0
- Primary language
- Python 3.11 or newer
- Packaging
- Hatchling package installable with pip or uv
- Interface
- Python library with direct and batched ask-and-tell search workflows
- Optional dependencies
- Separate extras for mixed-model AB-MCTS and visualization
- Algorithms
- AB-MCTS-A, AB-MCTS-M, Standard MCTS, and Tree of Thoughts breadth-first search are exposed
- Visualization
- Supports Graphviz images, JSON, YAML, Mermaid, Markdown, and interactive HTML output
Read from README.md, pyproject.toml, src/treequest/trial.py, src/treequest/types.py, src/treequest/ranker.py, src/treequest/imports.py, src/treequest/__init__.py, src/treequest/visualization.py, src/treequest/algos/base.py, src/treequest/algos/tree.py, src/treequest/vis/errors.py, src/treequest/vis/render.py, src/treequest/vis/__init__.py, src/treequest/vis/snapshot.py, src/treequest/vis/build_snapshot.py.
What it can do
Perform tree-based search for LLM inference scaling
Language model and search parameters → Optimized inference results with improved reasoning
Scale LLM inference computation at runtime
Base language model and computational budget → Enhanced model responses with increased compute allocation
Implement flexible tree search algorithms
Search configuration and model queries → Tree-structured exploration paths and results
Integrate with existing LLM workflows
Language model API and application code → Enhanced LLM system with tree search capabilities
Configure adaptive inference strategies
Performance requirements and resource constraints → Optimized inference strategy configuration
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.
