Skip to content

interlens.tools.registry

interlens.tools.registry

ToolRegistry

ToolRegistry()

Resolves tool names (which serialize) to live Tool instances (which don't).

This is the tools analogue of the model registry: a template stores tool_names and, at build time on each worker, the registry turns them into callables. Because spawned worker processes inherit no parent state, tools must be registered at import time (or via a worker-init hook), not imperatively in the parent.

Source code in src/interlens/tools/registry.py
def __init__(self):
	self._tools: dict[str, Tool] = {}