Skip to main content
When creating agents with Pipecat Cloud, your bot() entry point function receives different types of arguments depending on the session type. These classes represent the structure of those arguments.
These types subclass pipecat-ai’s runner argument types, and pipecat-ai is an optional dependency of pipecatcloud. Importing anything from pipecatcloud.agent without it raises an ImportError. Install the extra:
Agent images built on pipecat-base already have pipecat-ai; the extra matters when you install pipecatcloud yourself.

PipecatSessionArguments

Standard Pipecat Cloud agent session arguments, used for basic sessions.

Properties

Optional[str]
The unique identifier for the current session.
Any
The custom data passed to the agent via the session parameters.

DailySessionArguments

Arguments for sessions that involve Daily WebRTC rooms for voice/video interaction.

Properties

Optional[str]
The unique identifier for the current session.
str
The URL for the Daily room.
str | None
The authentication token for the Daily room.
Any
The custom data passed to the agent via the session parameters.

WebSocketSessionArguments

Arguments for sessions that use WebSocket connections for real-time communication.

Properties

Optional[str]
The unique identifier for the current session.
WebSocket
The FastAPI WebSocket connection used to communicate with the client.

SmallWebRTCSessionArguments

Session arguments for an agent using SmallWebRTCTransport.
Subclasses pipecat-ai’s SmallWebRTCRunnerArguments, so it carries that type’s fields alongside session_id.

SessionArguments

The base type the others share. It contributes session_id and serves as a marker, so you can annotate a handler that accepts any session type:
Every concrete type above lists its pipecat-ai runner base first and SessionArguments second. That ordering is what lets pipecat-ai’s own session_id win once it defines one, so don’t reorder the bases if you subclass these yourself.