Tools & Env¶
Goal¶
Build portable agents where action intent is stable but execution backend can change.
Mental model¶
- Tool: semantic operation (
read_file,replace_lines,run_command,fetch_url). - Env: execution backend implementing capability ops (
file,process, etc.).
Tutorial: one tool, multiple env backends¶
- Define/register a tool requiring ops group
file. - Run with
HostEnv. - Run with
DockerEnv(same tool, different backend). - Verify behavior parity via trace.
Practical rules¶
- Keep tool inputs/outputs structured and explicit.
- Fail early on missing required ops.
- Never hide backend assumptions inside parser or prompts.
- Keep side effects localized to env ops layer.
Predefined kits you can use directly¶
Tool kits (qitos.kit.tool):
EditorToolSet,EpubToolSetWriteFile,ReadFile,ListFilesRunCommandHTTPRequest,HTTPGet,HTTPPost,HTMLExtractTextWebSearch,VisitURL,PageDown,PageUp,FindInPage,FindNext,ArchiveSearchThinkingToolSet
Planning kits (qitos.kit.planning):
ToolAwareMessageBuilder,LLMDecisionBlockPlanCursor,parse_numbered_planGreedySearch,DynamicTreeSearchappend_log,format_action,set_final,set_if_empty
See full details in:
Troubleshooting¶
ENV_CAPABILITY_MISMATCH:-
tool required ops are missing in current env.
-
action succeeds in host but fails in docker:
-
path mapping or workspace root mismatch.
-
command tool unstable:
- tighten timeout and sanitize command template.