AttractorEx.Agent.ToolRegistry (attractor_phoenix v0.1.0)

Copy Markdown View Source

Lightweight registry of agent tools keyed by name.

Summary

Functions

Builds a registry map from a tool list.

Fetches a tool by name.

Registers or replaces a tool in the registry.

Types

t()

@type t() :: %{optional(String.t()) => AttractorEx.Agent.Tool.t()}

Functions

from_tools(tools)

@spec from_tools([AttractorEx.Agent.Tool.t()]) :: t()

Builds a registry map from a tool list.

get(registry, name)

@spec get(t(), String.t()) :: AttractorEx.Agent.Tool.t() | nil

Fetches a tool by name.

register(registry, tool)

@spec register(t(), AttractorEx.Agent.Tool.t()) :: t()

Registers or replaces a tool in the registry.