StudioRunnerTools exposes dispatch tools for AgentOS Studio components. It lists and runs agents, teams, and workflows from the component database or an explicit allowlist. Use it for routers, team leads, and dispatcher agents while a separate builder owns component mutations through StudioTools.
Mount one of
StudioRunnerTools or StudioTools on a component. Both expose overlapping list_* and run_* function names, and Agno’s tool namespace is flat.Prerequisites
The following example requires theopenai and sqlalchemy libraries.
Example
cookbook/05_agent_os/22_studio/studio_runner_dispatcher.py
StudioTools creates the example component. The dispatcher receives StudioRunnerTools for discovery and execution.
Toolkit Params
The Registry restores resources referenced by persisted component configurations. Set
include_all_components=True to dispatch all code-defined Registry agents and teams. Use explicit component lists for a narrower allowlist.
Toolkit Functions
Functions are exposed for component types enabled by the correspondingagents, teams, and workflows parameters.
All functions have sync and async variants.
Execution Behavior
- List components first and run them by exact ID. Display names and their slugs also resolve. An ambiguous name returns the matching IDs for a retry.
- Runs execute as the current user, preserving user-scoped memory, learning, and storage.
- Each target receives one stable session per calling conversation, so repeated dispatches continue its context.
- Runs use
stream=Falseand return JSON containing the component ID,run_id,session_id,status, andcontent. - A paused human-in-the-loop run also returns its unresolved
requirements. Resume it through the AgentOS continuation endpoint with the returned run and session IDs. - Persisted components are rebuilt for each call. Admitted code-defined components are copied before dispatch to isolate per-run state.
- The runner requires complete Registry-backed configuration before executing a persisted component.