The worker bus is the communication backbone of every multi-worker system. All workers connect to the same bus and exchange typed messages for frame routing, lifecycle events, and job coordination.Think of it as an internal event bus — workers publish messages and other workers receive them through their subscriptions. The bus handles priority queuing so that urgent messages (like cancellations) are delivered before queued data.
The default bus, created automatically by WorkerRunner when you don’t provide one. It uses asyncio queues for in-process communication with no serialization overhead.
from pipecat.workers.runner import WorkerRunnerrunner = WorkerRunner() # Creates AsyncQueueBus automatically
This is all you need for single-process applications where all workers run together.
For distributed setups where workers run in separate processes or on different machines, use RedisBus. It uses Redis pub/sub to relay messages across process boundaries.
All processes that share the same Redis channel can exchange messages. The programming model stays the same — your agent code doesn’t change between local and distributed setups.
RedisBus requires the redis extra: uv add "pipecat-ai[redis]"
Normal-priority messages that carry data between agents. The most important one is BusFrameMessage, which wraps a Pipecat frame (audio, text, etc.) for transport across the bus.
High-priority messages for lifecycle events: activation, deactivation, shutdown, and worker readiness. These are delivered before data messages in the queue.
Some messages are local-only and never cross process boundaries. For example, child agent errors stay local to the parent. This keeps internal state from leaking across distributed runners.
Targeted messages (with a specific target) are delivered only to the named agent
Broadcast messages (with no target) are delivered to all subscribers
The bus handles this routing automatically. When you call activate_worker("greeter"), it sends a BusActivateWorkerMessage targeted at "greeter" — only that agent receives it.
The runner maintains a WorkerRegistry that tracks which agents are available. To get notified when an agent is ready, use the @worker_ready decorator (or call watch_workers() explicitly):
The framework automatically calls watch_workers() for each @worker_ready handler when the agent starts. If the watched agent is already registered, the handler fires immediately, so you don’t need to worry about race conditions.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Pipecat","description":"Documentation for Pipecat, the open source ecosystem for building real-time voice and multimodal AI agents: the Python framework, client SDKs, Pipecat Flows, and Pipecat Cloud hosting.","colors":{"primary":"#4f46e5","light":"#a5b4fc","dark":"#312e81"},"logo":{"light":"https://mintcdn.com/daily/r4jEtY4thtHXjZ16/logo/light.svg?fit=max\u0026auto=format\u0026n=r4jEtY4thtHXjZ16\u0026q=85\u0026s=46cda5b2f0afabd5f0298c64082c4125","dark":"https://mintcdn.com/daily/r4jEtY4thtHXjZ16/logo/dark.svg?fit=max\u0026auto=format\u0026n=r4jEtY4thtHXjZ16\u0026q=85\u0026s=f018b960ba26051755803a128139431b"},"favicon":"https://mintcdn.com/daily/r4jEtY4thtHXjZ16/favicon.svg?fit=max\u0026auto=format\u0026n=r4jEtY4thtHXjZ16\u0026q=85\u0026s=b1e0fb1fa81bb48e6f1e7af1f51fc916","navbar":{"links":[{"href":"https://discord.gg/pipecat","label":"Join the Discord"},{"icon":"github","href":"https://github.com/pipecat-ai/pipecat","label":"Github"}]},"footer":{"socials":{"x":"https://x.com/pipecat_ai","github":"https://github.com/pipecat-ai/pipecat","discord":"https://discord.gg/pipecat"}},"seo":{"metatags":{"og:site_name":"Pipecat","og:locale":"en_US","og:logo":"/logo/pipecat-logo.svg","article:publisher":"Pipecat AI","twitter:site":"@pipecat_ai","og:image:width":"1200","og:image:height":"630"},"indexing":"navigable"},"styling":{"eyebrows":"breadcrumbs","latex":true},"integrations":{"cookies":{"key":"daily_analytics_consent","value":"granted"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"thumbnails":{"fonts":{"family":"Geist"}},"navigation":{"global":{"anchors":[{"anchor":"Pipecat Events","icon":"calendar","href":"https://pipecat.ai/events"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/pipecat"},{"anchor":"GitHub","icon":"github","href":"https://github.com/pipecat-ai/pipecat"},{"anchor":"Changelog","icon":"file","href":"https://github.com/pipecat-ai/pipecat/blob/main/CHANGELOG.md"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"daily","hasAudioNarration":false,"actualSubdomain":"daily","customDomains":["docs.pipecat.ai"],"gitSource":{"type":"github","owner":"pipecat-ai","repo":"docs","deployBranch":"production","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae62a99f07e7eef79d4f5c2","collectionId":"3c827e9f-4c27-4746-9217-5333b9aea310","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae62a99f07e7eef79d4f5c2"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae62a99f07e7eef79d4f5c2","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"API Reference","count":397},{"language":"default","tag":"Pipecat Server","count":307},{"language":"default","tag":"Services","count":216},{"language":"default","tag":"Pipecat","count":92},{"language":"default","tag":"Text-to-Speech","count":60},{"language":"default","tag":"Pipecat Cloud \u0026 Enterprise","count":54},{"language":"default","tag":"Utilities","count":45},{"language":"default","tag":"Speech-to-Text","count":39},{"language":"default","tag":"Client SDKs","count":34},{"language":"default","tag":"LLM","count":32}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":false},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".compatibility-table table,.compatibility-table th,.compatibility-table td{border:1px solid #ddd;padding:10px}.compatibility-table{width:90%;table-layout:fixed}.compatibility-table tr{width:100%}.compatibility-table th:first-child,.compatibility-table td:first-child{text-align:left;width:100%}.compatibility-table th{writing-mode:sideways-lr;text-align:left}.compatibility-table td{text-align:center;font-weight:bold}.compatibility-table .supported{color:#107714}.compatibility-table .unsupported{color:#de1126}"}],"page":{"pagePath":"pipecat/fundamentals/agent-bus","slug":"/pipecat/fundamentals/agent-bus","pageMetadata":{"title":"The Worker Bus","description":"How Pipecat workers communicate through the shared message bus: publish, subscribe, and message flow between agents.","href":"/pipecat/fundamentals/agent-bus"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"How Pipecat workers communicate through the shared message bus: publish, subscribe, and message flow between agents.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`what-is-the-bus`,children:`What is the bus?`}),`\n`,_jsx(_components.p,{children:`The worker bus is the communication backbone of every multi-worker system. All workers connect to the same bus and exchange typed messages for frame routing, lifecycle events, and job coordination.`}),`\n`,_jsx(_components.p,{children:`Think of it as an internal event bus — workers publish messages and other workers receive them through their subscriptions. The bus handles priority queuing so that urgent messages (like cancellations) are delivered before queued data.`}),`\n`,_jsx(Heading,{level:`2`,id:`bus-implementations`,children:`Bus implementations`}),`\n`,_jsx(_components.p,{children:`Pipecat provides three bus implementations:`}),`\n`,_jsx(Heading,{level:`3`,id:`asyncqueuebus-local`,children:`AsyncQueueBus (local)`}),`\n`,_jsxs(_components.p,{children:[`The default bus, created automatically by `,_jsx(_components.code,{children:`WorkerRunner`}),` when you don’t provide one. It uses asyncio queues for in-process communication with no serialization overhead.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pipecat.workers.runner `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` WorkerRunner`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`runner `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` WorkerRunner() `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Creates AsyncQueueBus automatically`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This is all you need for single-process applications where all workers run together.`}),`\n`,_jsx(Heading,{level:`3`,id:`redisbus-distributed`,children:`RedisBus (distributed)`}),`\n`,_jsxs(_components.p,{children:[`For distributed setups where workers run in separate processes or on different machines, use `,_jsx(_components.code,{children:`RedisBus`}),`. It uses Redis pub/sub to relay messages across process boundaries.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` redis.asyncio `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Redis`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pipecat.bus.network.redis `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` RedisBus`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`redis `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Redis.from_url(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redis://localhost:6379\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`bus `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` RedisBus(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`redis`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`redis, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`channel`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pipecat:my-app\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`runner `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` WorkerRunner(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bus`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`bus)`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`All processes that share the same Redis channel can exchange messages. The programming model stays the same — your agent code doesn’t change between local and distributed setups.`}),`\n`,_jsxs(Info,{children:[_jsx(_components.code,{children:`RedisBus`}),` requires the `,_jsx(_components.code,{children:`redis`}),` extra: `,_jsx(_components.code,{children:`uv add \"pipecat-ai[redis]\"`})]}),`\n`,_jsx(Heading,{level:`3`,id:`pgmqbus-distributed`,children:`PgmqBus (distributed)`}),`\n`,_jsx(_components.p,{children:`An alternative distributed bus backed by PGMQ (PostgreSQL Message Queue). Each instance creates its own queue and broadcasts to peer queues.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pgmq.async_queue `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PGMQueue`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pipecat.bus.network.pgmq `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PgmqBus`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`pgmq `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PGMQueue(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` host`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"localhost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` port`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5432\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` database`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"postgres\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` username`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"postgres\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` password`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` pool_size`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pgmq.init()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`bus `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PgmqBus(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`pgmq`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`pgmq, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`channel`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pipecat:my-app\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`runner `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` WorkerRunner(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bus`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`bus)`})]}),`\n`]})})}),`\n`,_jsxs(Info,{children:[_jsx(_components.code,{children:`PgmqBus`}),` requires the `,_jsx(_components.code,{children:`pgmq`}),` extra: `,_jsx(_components.code,{children:`uv add \"pipecat-ai[pgmq]\"`})]}),`\n`,_jsx(Heading,{level:`2`,id:`message-types`,children:`Message types`}),`\n`,_jsx(_components.p,{children:`Messages on the bus fall into four categories:`}),`\n`,_jsx(Heading,{level:`3`,id:`data-messages`,children:`Data messages`}),`\n`,_jsxs(_components.p,{children:[`Normal-priority messages that carry data between agents. The most important one is `,_jsx(_components.code,{children:`BusFrameMessage`}),`, which wraps a Pipecat frame (audio, text, etc.) for transport across the bus.`]}),`\n`,_jsx(Heading,{level:`3`,id:`system-messages`,children:`System messages`}),`\n`,_jsx(_components.p,{children:`High-priority messages for lifecycle events: activation, deactivation, shutdown, and worker readiness. These are delivered before data messages in the queue.`}),`\n`,_jsx(Heading,{level:`3`,id:`job-messages`,children:`Job messages`}),`\n`,_jsx(_components.p,{children:`Messages for coordinating work between agents: job requests, responses, progress updates, streaming, and cancellation.`}),`\n`,_jsx(Heading,{level:`3`,id:`local-messages`,children:`Local messages`}),`\n`,_jsx(_components.p,{children:`Some messages are local-only and never cross process boundaries. For example, child agent errors stay local to the parent. This keeps internal state from leaking across distributed runners.`}),`\n`,_jsx(Heading,{level:`2`,id:`message-routing`,children:`Message routing`}),`\n`,_jsxs(_components.p,{children:[`Messages have `,_jsx(_components.code,{children:`source`}),` and `,_jsx(_components.code,{children:`target`}),` fields:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Targeted messages`}),` (with a specific `,_jsx(_components.code,{children:`target`}),`) are delivered only to the named agent`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Broadcast messages`}),` (with no `,_jsx(_components.code,{children:`target`}),`) are delivered to all subscribers`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The bus handles this routing automatically. When you call `,_jsx(_components.code,{children:`activate_worker(\"greeter\")`}),`, it sends a `,_jsx(_components.code,{children:`BusActivateWorkerMessage`}),` targeted at `,_jsx(_components.code,{children:`\"greeter\"`}),` — only that agent receives it.`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-agent-registry`,children:`The agent registry`}),`\n`,_jsxs(_components.p,{children:[`The runner maintains a `,_jsx(_components.code,{children:`WorkerRegistry`}),` that tracks which agents are available. To get notified when an agent is ready, use the `,_jsx(_components.code,{children:`@worker_ready`}),` decorator (or call `,_jsx(_components.code,{children:`watch_workers()`}),` explicitly):`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pipecat.workers.base_worker `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` BaseWorker`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pipecat.pipeline.worker_ready_decorator `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` worker_ready`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pipecat.registry.types `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` WorkerReadyData`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` MainAgent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`BaseWorker`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` @worker_ready`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"greeter\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` on_greeter_ready`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: WorkerReadyData) -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.activate_worker(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"greeter\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The framework automatically calls `,_jsx(_components.code,{children:`watch_workers()`}),` for each `,_jsx(_components.code,{children:`@worker_ready`}),` handler when the agent starts. If the watched agent is already registered, the handler fires immediately, so you don’t need to worry about race conditions.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"The Worker Bus","description":"How Pipecat workers communicate through the shared message bus: publish, subscribe, and message flow between agents.","href":"/pipecat/fundamentals/agent-bus"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What is the bus?","slug":"what-is-the-bus","depth":2,"children":[]},{"title":"Bus implementations","slug":"bus-implementations","depth":2,"children":[{"title":"AsyncQueueBus (local)","slug":"asyncqueuebus-local","depth":3,"children":[]},{"title":"RedisBus (distributed)","slug":"redisbus-distributed","depth":3,"children":[]},{"title":"PgmqBus (distributed)","slug":"pgmqbus-distributed","depth":3,"children":[]}]},{"title":"Message types","slug":"message-types","depth":2,"children":[{"title":"Data messages","slug":"data-messages","depth":3,"children":[]},{"title":"System messages","slug":"system-messages","depth":3,"children":[]},{"title":"Job messages","slug":"job-messages","depth":3,"children":[]},{"title":"Local messages","slug":"local-messages","depth":3,"children":[]}]},{"title":"Message routing","slug":"message-routing","depth":2,"children":[]},{"title":"The agent registry","slug":"the-agent-registry","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/daily/8dde88c766733454/kapa-widget.js","/_mintlify/custom/daily/1c9d393ac913fca7/gtm.js"],"subdomain":"daily","siteName":"Pipecat","title":"The Worker Bus - Pipecat","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-19T14:50:19.598Z","originalFileLocation":"pipecat/fundamentals/agent-bus.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"How Pipecat workers communicate through the shared message bus: publish, subscribe, and message flow between agents.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Pipecat\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/daily/p50_8aq8F9lsbdgG/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/daily/p50_8aq8F9lsbdgG/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/daily/p50_8aq8F9lsbdgG/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/daily/p50_8aq8F9lsbdgG/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/daily/p50_8aq8F9lsbdgG/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/daily/p50_8aq8F9lsbdgG/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/daily/p50_8aq8F9lsbdgG/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/daily/p50_8aq8F9lsbdgG/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/daily/p50_8aq8F9lsbdgG/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"The Worker Bus - Pipecat\">\u003cmeta data-mint-head property=\"og:description\" content=\"How Pipecat workers communicate through the shared message bus: publish, subscribe, and message flow between agents.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Pipecat\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.pipecat.ai/pipecat/fundamentals/agent-bus\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://daily.mintlify.site/_mintlify/api/og/v2?division=Multi-Agent+Architecture\u0026amp;title=The+Worker+Bus\u0026amp;description=How+Pipecat+workers+communicate+through+the+shared+message+bus%3A+publish%2C+subscribe%2C+and+message+flow+between+agents.\u0026amp;theme=628c84aee62ec4ecf8a27471\u0026amp;signature=2ad0d867631ee8e0a6f688f29bbcbbcdb62bd1e74687d0f5b21114755929161c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"The Worker Bus - Pipecat\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How Pipecat workers communicate through the shared message bus: publish, subscribe, and message flow between agents.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://daily.mintlify.site/_mintlify/api/og/v2?division=Multi-Agent+Architecture\u0026amp;title=The+Worker+Bus\u0026amp;description=How+Pipecat+workers+communicate+through+the+shared+message+bus%3A+publish%2C+subscribe%2C+and+message+flow+between+agents.\u0026amp;theme=628c84aee62ec4ecf8a27471\u0026amp;signature=2ad0d867631ee8e0a6f688f29bbcbbcdb62bd1e74687d0f5b21114755929161c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/daily/p50_8aq8F9lsbdgG/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Pipecat\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4f46e5\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"og:logo\" content=\"/logo/pipecat-logo.svg\">\u003cmeta data-mint-head name=\"article:publisher\" content=\"Pipecat AI\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.pipecat.ai/pipecat/fundamentals/agent-bus\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/pipecat/fundamentals/agent-bus.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.pipecat.ai/#organization\",\"name\":\"Pipecat\",\"url\":\"https://docs.pipecat.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/daily/r4jEtY4thtHXjZ16/logo/light.svg?fit=max\u0026auto=format\u0026n=r4jEtY4thtHXjZ16\u0026q=85\u0026s=46cda5b2f0afabd5f0298c64082c4125\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.pipecat.ai#website\",\"name\":\"Pipecat\",\"url\":\"https://docs.pipecat.ai\",\"publisher\":{\"@id\":\"https://docs.pipecat.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.pipecat.ai/pipecat/fundamentals/agent-bus#webpage\",\"url\":\"https://docs.pipecat.ai/pipecat/fundamentals/agent-bus\",\"name\":\"The Worker Bus\",\"description\":\"How Pipecat workers communicate through the shared message bus: publish, subscribe, and message flow between agents.\",\"dateModified\":\"2026-10-19T14:50:19.598Z\",\"isPartOf\":{\"@id\":\"https://docs.pipecat.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.pipecat.ai/pipecat/fundamentals/agent-bus#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.pipecat.ai/pipecat/fundamentals/agent-bus#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Fundamentals\",\"item\":\"https://docs.pipecat.ai/pipecat/fundamentals/service-settings\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The Worker Bus\",\"item\":\"https://docs.pipecat.ai/pipecat/fundamentals/agent-bus\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.pipecat.ai/pipecat/fundamentals/agent-bus#article\",\"headline\":\"The Worker Bus\",\"name\":\"The Worker Bus\",\"description\":\"How Pipecat workers communicate through the shared message bus: publish, subscribe, and message flow between agents.\",\"url\":\"https://docs.pipecat.ai/pipecat/fundamentals/agent-bus\",\"mainEntityOfPage\":{\"@id\":\"https://docs.pipecat.ai/pipecat/fundamentals/agent-bus#webpage\"},\"dateModified\":\"2026-10-19T14:50:19.598Z\",\"publisher\":{\"@id\":\"https://docs.pipecat.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.pipecat.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Pipecat\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Pipecat","nav":{"global":{"anchors":[{"anchor":"Pipecat Events","icon":"calendar","href":"https://pipecat.ai/events"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/pipecat"},{"anchor":"GitHub","icon":"github","href":"https://github.com/pipecat-ai/pipecat"},{"anchor":"Changelog","icon":"file","href":"https://github.com/pipecat-ai/pipecat/blob/main/CHANGELOG.md"}]},"tabs":[{"tab":"Overview","pages":[{"title":"Overview","href":"/overview/introduction"}]},{"tab":"Pipecat","groups":[{"group":"Get Started","pages":[{"title":"Introduction to Pipecat","sidebarTitle":"Pipecat","href":"/pipecat/get-started/introduction"},{"title":"Pipecat Quickstart","sidebarTitle":"Quickstart","href":"/pipecat/get-started/quickstart"},{"title":"Build Your Next Bot","href":"/pipecat/get-started/build-your-next-bot"},{"title":"Continue Learning","href":"/pipecat/get-started/next-steps"}]},{"group":"Migration","pages":[{"title":"Migrating to Pipecat 1.0","sidebarTitle":"Pipecat 1.0","href":"/pipecat/migration/migration-1.0"},{"title":"Migrating from pipecat-ai-flows","sidebarTitle":"Pipecat Flows","href":"/pipecat/migration/flows"}]},{"group":"Learning Pipecat","pages":[{"title":"Overview of Pipecat","href":"/pipecat/learn/overview"},{"title":"Your First Agent","href":"/pipecat/learn/your-first-agent"},{"title":"Session Initialization","href":"/pipecat/learn/session-initialization"},{"title":"Pipeline \u0026 Frame Processing","href":"/pipecat/learn/pipeline"},{"title":"Transports","href":"/pipecat/learn/transports"},{"title":"Speech Input \u0026 Turn Detection","href":"/pipecat/learn/speech-input"},{"title":"Speech to Text","href":"/pipecat/learn/speech-to-text"},{"title":"Context Management","href":"/pipecat/learn/context-management"},{"title":"LLM Inference","href":"/pipecat/learn/llm"},{"title":"Function Calling","href":"/pipecat/learn/function-calling"},{"title":"Text to Speech","href":"/pipecat/learn/text-to-speech"},{"title":"Pipeline Termination","href":"/pipecat/learn/pipeline-termination"},{"title":"Pipecat Classifiers","sidebarTitle":"Classifiers","href":"/pipecat/learn/classifiers"},{"title":"Multiple LLM Agents","href":"/pipecat/learn/multiple-llm-agents"},{"title":"Controlling the UI","href":"/pipecat/learn/ui-worker"},{"title":"Agent Handoff","href":"/pipecat/learn/agent-handoff"},{"title":"Job Coordination","href":"/pipecat/learn/job-coordination"},{"title":"Distributed Agents","href":"/pipecat/learn/distributed-agents"},{"title":"Proxy Agents","href":"/pipecat/learn/proxy-agents"},{"title":"LLM with a Backend","href":"/pipecat/learn/llm-with-backend"},{"title":"What's Next","href":"/pipecat/learn/whats-next"}]},{"group":"Fundamentals","pages":[{"title":"Service Settings","href":"/pipecat/fundamentals/service-settings"},{"title":"Interruptions","href":"/pipecat/fundamentals/interruptions"},{"title":"User Input Muting","sidebarTitle":"Muting User Input","href":"/pipecat/fundamentals/user-input-muting"},{"title":"Detecting Idle Users","href":"/pipecat/fundamentals/detecting-user-idle"},{"title":"STT Latency Tuning","href":"/pipecat/fundamentals/stt-latency-tuning"},{"title":"Context Summarization","href":"/pipecat/fundamentals/context-summarization"},{"title":"Saving Conversation Transcripts","sidebarTitle":"Saving Transcripts","href":"/pipecat/fundamentals/saving-transcripts"},{"title":"Recording Conversation Audio","sidebarTitle":"Recording Audio","href":"/pipecat/fundamentals/recording-audio"},{"title":"Metrics","href":"/pipecat/fundamentals/metrics"},{"title":"Voicemail Detection","href":"/pipecat/fundamentals/voicemail"},{"title":"IVR Navigation","href":"/pipecat/fundamentals/ivr"},{"title":"Error Handling","href":"/pipecat/fundamentals/error-handling"},{"title":"Custom FrameProcessor","description":"Write a custom Pipecat FrameProcessor: handle frames, push new ones downstream, and slot into a pipeline.","href":"/pipecat/fundamentals/custom-frame-processor"},{"group":"Multi-Agent Architecture","pages":[{"title":"The Worker Bus","href":"/pipecat/fundamentals/agent-bus"},{"title":"Agent Registry and Discovery","description":"How agents discover each other and get notified when other agents are ready.","href":"/pipecat/fundamentals/agent-registry-and-discovery"},{"title":"Understanding the Bus Bridge","href":"/pipecat/fundamentals/understanding-the-bus-bridge"}]}]},{"group":"Flows","pages":[{"title":"Pipecat Flows","sidebarTitle":"Overview","href":"/pipecat/flows/introduction"},{"title":"Pipecat Flows Quickstart","sidebarTitle":"Quickstart","href":"/pipecat/flows/quickstart"},{"title":"Flow Configs","href":"/pipecat/flows/flow-configs"},{"title":"Nodes \u0026 Messages","href":"/pipecat/flows/nodes-and-messages"},{"title":"Functions","href":"/pipecat/flows/functions"},{"title":"Actions","href":"/pipecat/flows/actions"},{"title":"Context Strategies","href":"/pipecat/flows/context-strategies"},{"title":"State Management","href":"/pipecat/flows/state-management"},{"title":"Pipecat Flows Examples","sidebarTitle":"Examples","href":"/pipecat/flows/examples"}]},{"group":"Evals","pages":[{"title":"Pipecat Evals","sidebarTitle":"Overview","href":"/pipecat/evals/overview"},{"title":"Evals Lifecycle","sidebarTitle":"Lifecycle","href":"/pipecat/evals/lifecycle"},{"title":"Evals Quickstart","sidebarTitle":"Quickstart","href":"/pipecat/evals/quickstart"},{"title":"Scripted Scenarios","href":"/pipecat/evals/scripted-scenarios"},{"title":"Simulated Scenarios","href":"/pipecat/evals/simulated-scenarios"},{"title":"Scenario Configuration","href":"/pipecat/evals/scenario-configuration"},{"title":"Eval Suites","href":"/pipecat/evals/suites"},{"title":"Using the Library","href":"/pipecat/evals/library"},{"title":"The Eval Loop","href":"/pipecat/evals/the-eval-loop"},{"group":"Third-party Platforms","pages":[{"title":"Arize","href":"/pipecat/evals/platforms/arize"},{"title":"Bluejay","href":"/pipecat/evals/platforms/bluejay"},{"title":"Cekura","href":"/pipecat/evals/platforms/cekura"},{"title":"Coval","href":"/pipecat/evals/platforms/coval"},{"title":"Roark Eval Platform","sidebarTitle":"Roark","href":"/pipecat/evals/platforms/roark"}]}]},{"group":"Features","pages":[{"title":"Expressive Conversation","href":"/pipecat/features/expressive-conversation"},{"title":"Krisp VIVA","href":"/pipecat/features/krisp-viva"},{"title":"WhatsApp Business Calling API","href":"/pipecat/features/whatsapp"},{"title":"Building with Gemini Live","href":"/pipecat/features/gemini-live"},{"title":"Building With OpenAI Audio Models and APIs","sidebarTitle":"OpenAI Audio Models and APIs","href":"/pipecat/features/openai-audio-models-and-apis"}]},{"group":"Telephony","pages":[{"title":"Pipecat Telephony Overview","sidebarTitle":"Overview","href":"/pipecat/telephony/overview"},{"title":"Daily Phone Numbers","href":"/pipecat/telephony/daily-phone-numbers"},{"title":"Daily PSTN","href":"/pipecat/telephony/daily-pstn"},{"title":"Daily SIP","href":"/pipecat/telephony/daily-sip"},{"title":"Daily + Twilio SIP","href":"/pipecat/telephony/twilio-daily-sip"},{"title":"Twilio WebSocket Integration","sidebarTitle":"Twilio WebSocket","href":"/pipecat/telephony/twilio-websockets"},{"title":"Telnyx WebSocket Integration","sidebarTitle":"Telnyx WebSocket","href":"/pipecat/telephony/telnyx-websockets"},{"title":"Plivo WebSocket Integration","sidebarTitle":"Plivo WebSocket","href":"/pipecat/telephony/plivo-websockets"},{"title":"Exotel WebSocket Integration","sidebarTitle":"Exotel WebSocket","href":"/pipecat/telephony/exotel-websockets"}]},{"group":"Deployment","pages":[{"title":"Pipecat Deployment Overview","sidebarTitle":"Overview","href":"/pipecat/deployment/overview"},{"title":"Running Bots Locally","href":"/pipecat/deployment/running-bots-locally"},{"title":"Running Bots in Production","href":"/pipecat/deployment/running-bots-in-production"},{"group":"Production Hosting Patterns","pages":[{"title":"VM per Session","href":"/pipecat/deployment/patterns/vm-per-session"},{"title":"Warm Pool with Subprocess Workers","href":"/pipecat/deployment/patterns/warm-pool-subprocess"},{"title":"Managed Agent Runtime","href":"/pipecat/deployment/patterns/managed-runtime"}]},{"title":"Telephony in Production","href":"/pipecat/deployment/telephony-in-production"},{"group":"Hosting Platforms","pages":[{"title":"Fly.io","href":"/pipecat/deployment/platforms/fly"},{"title":"Cerebrium","href":"/pipecat/deployment/platforms/cerebrium"},{"title":"Modal","href":"/pipecat/deployment/platforms/modal"}]}]},{"group":"Examples \u0026 Recipes","pages":[{"title":"Pipecat Examples","sidebarTitle":"Examples","href":"/pipecat/examples/overview"},{"title":"Recipes","href":"/pipecat/examples/recipes"}]}]},{"tab":"Pipecat Clients","pages":[{"title":"Pipecat Clients","href":"/client/introduction"}]},{"tab":"Pipecat Cloud \u0026 Enterprise","pages":[{"title":"Pipecat Cloud \u0026 Enterprise","href":"/pipecat-cloud/introduction"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference"}]}]},"basePath":"","title":"The Worker Bus - Pipecat","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":[],"chunks":[]}