AbstractAbstract ReadonlydescriptionHuman-readable description shown to the model
Abstract ReadonlynameTool name — used as the function identifier in tool calls
Abstract ReadonlyparametersJSON Schema describing the tool's expected arguments
OpenAI-compatible function tool schema
Auto-generated from name, description, and parameters.
Used by createToolkit to build the JSON string passed
to formatChat().
AbstractexecuteExecute the tool with parsed arguments
Called by the agent pool when the model emits a tool call matching this tool's name. The return value is JSON-serialized and prefilled back into the agent's context as a tool result.
Returns an Effection Operation — implement as a generator method. The operation runs inside the agent pool's scope, so it has access to Ctx, Store, and Events contexts for nested agent spawning.
Parsed arguments from the model's tool call
Optionalcontext: ToolContextExecution context with progress reporting callback
Tool result (will be JSON-serialized)
Abstract base class for tools usable by agents in the runtime
Subclass to define tools that agents can invoke during generation. Implement
name,description,parameters, andexecute(). The schema getter auto-generates the OpenAI-compatible function schema expected byformatChat().Pass tool instances to createToolkit to build the
toolMapandtoolsJsonpair consumed by useAgentPool and runAgents.execute()returns an EffectionOperation, enabling tools to spawn sub-agents via runAgents or withSharedRoot. For async work, wrap incall(). For synchronous tools, return directly from the generator body.Example: Search tool