orxtra v0.13.0 /tool.src.orxtra.tool._load_tools
On this page

The load_tools meta-tool: lets an agent request full schemas for tools currently present only as deferred stubs, replacing each stub in the session tool set with a fully pipeline-wrapped Tool built lazily on demand.

#tool.src.orxtra.tool._load_tools

#tool.src.orxtra.tool._load_tools

Meta-tool that lets agents request full tool schemas on demand.

When using deferred/compact tool manifests, agents start with minimal tool specs. Calling load_tools requests full schemas for specific tools, which are then built lazily from the registry, wrapped through the pipeline, and added to the active session tool set.

#_LoadToolsParams

Parameters for the load_tools meta-tool.

#make_load_tools_tool

python
def make_load_tools_tool(allowed_names: frozenset[str], build_tool: Callable[[str], Tool], get_session_tools: Callable[[], list[Tool]], set_session_tools: Callable[[list[Tool]], None]) -> Tool

Create the load_tools meta-tool.

Args:

  • allowed_names: Set of tool names the agent is allowed to load.

Loading a name outside this set is a hard ToolError.

  • build_tool: Callable that builds a fully pipeline-wrapped Tool

by name. Called lazily when the agent requests loading.

  • get_session_tools: Callable that returns the current active tool list.
  • set_session_tools: Callable that replaces the active tool list

(e.g., session.update_tools).

Search