Agent Usage¶
Deterministic Tools¶
Deterministic commands call local Python functions and external binaries directly:
cspilot inspect tests/examples/input.xyz
cspilot xtb-opt tests/examples/input.xyz
cspilot workflow xtb-orca-sp tests/examples/input.xyz
Use these when you already know the exact calculation.
Direct AGAPI Agent¶
cspilot agent runs an AGAPI/OpenAI-compatible tool-using agent:
It supports --model, --base-url, and --agent-profile
chem|materials|general. Tool calls are still restricted to provided tools.
Planner and Executor¶
plan, execute, and run provide a stricter JSON workflow:
- AGAPI creates a JSON plan.
- The executor accepts only registered tools for the selected profile.
- Step results are written as JSON.
- Verification checks paths, success flags, and numeric values.
- A Markdown or HTML report is generated.
LangGraph¶
graph-run wraps the same planner, executor, verifier, and reporter in a
LangGraph graph.
Single mode:
cspilot graph-run "inspect tests/examples/input.xyz" \
--workdir runs/water --profile chem --agent-mode single
Multi mode:
cspilot graph-run "Find all Al2O3 materials" \
--profile auto --agent-mode multi --html --workdir runs/al2o3
Multi-agent mode means deterministic specialist routing. It does not spawn parallel autonomous agents.
Profiles¶
Planner/graph profiles include:
| Profile | Role |
|---|---|
chem |
ASE, molecule conversion, xTB, ORCA, MACE, stk, NWPESSe, GreenCatAI |
stk |
stk-focused planning with chemistry tools available for follow-up calculations |
materials |
AGAPI materials query and GreenCatAI catalyst tools |
analysis |
result JSON search and property extraction |
thermo |
result JSON thermochemistry extraction |
general |
no calculation tools unless explicit materials query rules apply |
auto |
graph multi-mode router selects a specialist |
Repair Mode¶
src/cspilot/agents/repair.py implements a repair helper for missing-file
handoffs and AGAPI repair fallback. The current graph-run integration uses
the clean single or routed multi graph without a repair node. Treat repair as
available implementation groundwork, not a current CLI mode.
Pretty, HTML, and Quiet Output¶
run and graph-run support:
--prettyprints Rich panels and tables. It is the default.--no-prettyprints the older simple terminal output.--quietprints only verification status and report path.--htmlwritesfinal_report.html; otherwisefinal_report.mdis written.
JSON files are always written regardless of terminal style.
Interactive Mode¶
No interactive REPL mode is currently implemented. The CLI accepts explicit commands and natural-language request strings.