Skip to content

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

  1. Define/register a tool requiring ops group file.
  2. Run with HostEnv.
  3. Run with DockerEnv (same tool, different backend).
  4. Verify behavior parity via trace.

Practical rules

  1. Keep tool inputs/outputs structured and explicit.
  2. Fail early on missing required ops.
  3. Never hide backend assumptions inside parser or prompts.
  4. Keep side effects localized to env ops layer.

Predefined kits you can use directly

Tool kits (qitos.kit.tool):

  • EditorToolSet, EpubToolSet
  • WriteFile, ReadFile, ListFiles
  • RunCommand
  • HTTPRequest, HTTPGet, HTTPPost, HTMLExtractText
  • WebSearch, VisitURL, PageDown, PageUp, FindInPage, FindNext, ArchiveSearch
  • ThinkingToolSet

Planning kits (qitos.kit.planning):

  • ToolAwareMessageBuilder, LLMDecisionBlock
  • PlanCursor, parse_numbered_plan
  • GreedySearch, DynamicTreeSearch
  • append_log, format_action, set_final, set_if_empty

See full details in:

Troubleshooting

  1. ENV_CAPABILITY_MISMATCH:
  2. tool required ops are missing in current env.

  3. action succeeds in host but fails in docker:

  4. path mapping or workspace root mismatch.

  5. command tool unstable:

  6. tighten timeout and sanitize command template.

Source Index