Documentation Index
Fetch the complete documentation index at: https://docs.pipecat.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
AgentRunner manages agent pipelines, coordinates startup and shutdown, and responds to bus messages. It owns the shared AgentRegistry and AgentBus for all agents in the system.
Configuration
Unique name for this runner. Defaults to a UUID-based name. Must be unique
across all runners in a distributed setup.
The
AgentBus instance.
Creates an
AsyncQueueBus if not
provided.Whether to handle SIGINT for graceful shutdown.
Properties
bus
registry
Methods
add_agent
run(). When called after run() has started, the agent’s pipeline task is created and started immediately.
| Parameter | Type | Description |
|---|---|---|
agent | BaseAgent | The agent to add |
run
on_ready event handler, then blocks until end() or cancel() is called. New agents can be added dynamically via add_agent() after run() has started.
end
| Parameter | Type | Default | Description | |
|---|---|---|---|---|
reason | `str | None` | None | Human-readable reason for ending |
cancel
| Parameter | Type | Default | Description | |
|---|---|---|---|---|
reason | `str | None` | None | Human-readable reason for cancelling |
Event Handlers
| Event | Description |
|---|---|
on_ready | Fired after all registered agents have been started |
on_error | Fired when the runner encounters an error |