Skip to content

symfonic.core.tools.agent_tools

agent_tools

Agent tools — mediate between agent state and AgentStore.

All tool functions follow the Phase 2 access pattern

store = state["deps"].get(StoreType)

No direct infrastructure imports allowed.

list_agents async

list_agents(state: dict[str, Any]) -> list[AgentDefinition]

Return all agent definitions.

Source code in src/symfonic/core/tools/agent_tools.py
async def list_agents(state: dict[str, Any]) -> list[AgentDefinition]:
    """Return all agent definitions."""
    store = _get_agent_store(state)
    return await store.list()

read_agent async

read_agent(
    state: dict[str, Any], name: str
) -> AgentDefinition | None

Read an agent definition by name. Returns None if not found.

Source code in src/symfonic/core/tools/agent_tools.py
async def read_agent(
    state: dict[str, Any], name: str
) -> AgentDefinition | None:
    """Read an agent definition by name. Returns None if not found."""
    store = _get_agent_store(state)
    return await store.read(name)

run_agent async

run_agent(
    state: dict[str, Any], name: str, agent_input: Any
) -> Any

Run an agent by name.

Source code in src/symfonic/core/tools/agent_tools.py
async def run_agent(state: dict[str, Any], name: str, agent_input: Any) -> Any:
    """Run an agent by name."""
    store = _get_agent_store(state)
    return await store.run(name, agent_input)