Expand description
Agent tools + registry. Port of the reusable shape of agent_core/tools/.
A tool exposes a JSON-Schema interface to the model and an async
implementation. The registry resolves the name the model emits in a
tool_call to an implementation, exposes the LLM-facing specs, and runs
the call. Domain tools live in a product
crate and register here.
Modules§
Structs§
- Cancellation
Token - Hierarchical cancellation flag. Cancelling a parent cancels every child;
cancelledresolves without polling. - Tool
Execution Context - Identity, position and controls for one tool execution.
- Tool
Meta - Static execution metadata for a tool.
- Tool
Registry - Registry of tools available to an agent.
Enums§
- Tool
Concurrency - Whether a tool may run alongside others in one step.
- Tool
Surface - Who may call a tool.
Traits§
- Tool
- A callable tool.
parametersis a JSON-Schema object describing the args.
Functions§
- model_
tool_ name - Model-facing tool name (dots become underscores).
- validate_
json_ schema - Validate
valueagainstschema. - validate_
json_ schema_ definition - Check that
schemais a valid JSON Schema. - validate_
json_ schema_ value - Validate
valueagainstschema, labelling errors withsubject.