计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
tree-of-thoughts【效率与协作】Use the tree-of-thoughts Python package to configure TotAgent model callers and run DFS/BFS Tree-of-Thoughts reasoning workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this repo skill when a task involves the tree-of-thoughts / tree_of_thoughts Python package, TotAgent, ToTDFSAgent, BFSWithTotAgent, Tree-of-Thoughts prompt orchestration, thought/evaluation output contracts, DFS pruning, BFS breadth limits, or package-specific install/import troubleshooting.
Do not use this skill for the Princeton reference implementation unless the user is specifically porting concepts into this package. Do not use it for generic prompt engineering with no package/API work.
tree-of-thoughts.tree_of_thoughts.0.6.5.TotAgent, ToTDFSAgent.BFSWithTotAgent from tree_of_thoughts.bfs.OPENAI_API_KEY and external service access.{"thought": str, "evaluation": float}.python -m pip install -U tree-of-thoughts==0.6.5
# If imports fail through swarm-models/LangChain split packages:
python -m pip install -U langchain-community==0.3.31
Minimal import probe:
python - <<'PY'
from tree_of_thoughts import TotAgent, ToTDFSAgent
from tree_of_thoughts.bfs import BFSWithTotAgent
print(TotAgent.__name__, ToTDFSAgent.__name__, BFSWithTotAgent.__name__)
PY
Expected signal: TotAgent ToTDFSAgent BFSWithTotAgent.
For a fuller no-network check, run scripts/check_tree_of_thoughts_env.py; it verifies package metadata, public imports, and the root/BFS API split without calling a provider.
| If the task asks about... | Read |
|---|---|
| Installing/importing the package, package purpose, public API map, prompt-template caveats | references/package-overview.md |
Configuring TotAgent, choosing OpenAI vs custom/fake model callers, validating Thought outputs, or handling OPENAI_API_KEY | sub-skills/agents-and-models/SKILL.md |
| Running DFS, running BFS, choosing thresholds/loop/breadth settings, parsing JSON results, autosave behavior, or offline smoke tests | sub-skills/search-workflows/SKILL.md |
| Import errors, dependency compatibility, unsafe parsing, real-model failures, or autosave surprises | references/troubleshooting.md |
| Repository scripts, packaging/release facts, stale maintainer automation, or source maintenance caveats | references/maintainer-notes.md |
| Checking whether this skill matches a checkout/commit | references/repo-provenance.md |
scripts/check_tree_of_thoughts_env.py --json.agents-and-models first. Validate the model output contract before passing model results into search.search-workflows. Keep max_loops, number_of_agents, and BFS breadth_limit small until the deterministic fake-agent helper passes..run(...) return values with json.loads; both return JSON strings.OPENAI_API_KEY and network/provider permission before running TotAgent(use_openai_caller=True).TotAgent.run converts model text to a dict using Python eval; never treat arbitrary or user-controlled model output as safe.highest_rated_thought.tree_of_thoughts_runs/ relative to the process working directory when autosave_on=True; disable autosave for tests.