Skip to main content

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.

LLMContextWorker extends LLMWorker with a built-in LLMContext and a context aggregator pair, so it can track its own conversation history without manually wiring an LLMContextAggregatorPair. The pipeline is built as [user_aggregator, llm, assistant_aggregator] automatically. Each LLMContextWorker gets its own context by default; pass the same context= to several workers to give them a shared conversation.
from pipecat.workers.llm import LLMContextWorker

agent = LLMContextWorker("my_agent", llm=OpenAILLMService(api_key="..."))

Configuration

Inherits name, llm, active, bridged, and defer_tool_frames from LLMWorker, plus:
context
LLMContext | None
default:"None"
Optional pre-built LLMContext. When omitted, a fresh empty context is created.
user_params
LLMUserAggregatorParams | None
default:"None"
Optional parameters for the user aggregator.
assistant_params
LLMAssistantAggregatorParams | None
default:"None"
Optional parameters for the assistant aggregator.

Properties

PropertyTypeDescription
contextLLMContextThe LLMContext owned by this agent
user_aggregatorLLMUserAggregatorThe user-side context aggregator
assistant_aggregatorLLMAssistantAggregatorThe assistant-side context aggregator