Tools are the actions your agent can take. At runtime, the Engine dispatches tool calls from aDocumentation Index
Fetch the complete documentation index at: https://qitor.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Decision to the ToolRegistry, which looks up and executes the matching callable.
The @tool decorator
Mark any callable as a QitOS tool with @tool. The decorator attaches metadata to the function without changing its behavior — you can still call the function normally in tests.
@tool parameters
| Parameter | Type | Description |
|---|---|---|
name | str | None | Tool name used in Decision.actions. Defaults to the function’s __name__. |
description | str | None | Description shown to the LLM. Falls back to the function’s docstring. |
timeout_s | float | None | Per-call timeout in seconds. None means no timeout. |
max_retries | int | How many times to retry on failure. Defaults to 0. |
permissions | ToolPermission | None | Declares which system capabilities this tool requires. |
required_ops | list[str] | None | Low-level operation identifiers required from the environment. |
ToolPermission
ToolPermission declares what the tool is allowed to do. The Engine uses this information during preflight validation to check environment capabilities.
False.
ToolRegistry
ToolRegistry is the collection the Engine queries when dispatching actions. Pass it to your AgentModule via the constructor.
Registering individual tools
Useregistry.register() to add a single callable or BaseTool instance:
Scanning a module or object with include
registry.include(obj) scans all public, callable attributes of obj and registers any that have @tool metadata:
Registering toolsets
A toolset is any object that has atools() method returning a list of callables or BaseTool instances. Register it with register_toolset():
toolset_name.tool_name. You can override the namespace:
BaseTool and FunctionTool
For tools that need shared state or lifecycle management, subclass BaseTool directly:
FunctionTool is the wrapper that register() creates automatically when you pass a plain callable. You rarely need to instantiate it directly.
For most practical coding agents, prefer preset toolsets such as
CodingToolSet or the registry builders in qitos.kit.toolset rather than hand-registering every file and shell tool yourself.Passing the registry to AgentModule
Pass your populatedToolRegistry to AgentModule.__init__():
agent.tool_registry and creates an ActionExecutor from it. You can also call registry.get_tool_descriptions() to get a formatted string of all registered tools for inclusion in your system prompt:
