> ## Documentation Index
> Fetch the complete documentation index at: https://daily-docs-pr-5482.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Session Arguments

> Understand the session arguments Pipecat Cloud passes to your bot entry point at session start, from the Python SDK.

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.

<Warning>
  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:

  ```bash theme={null}
  uv add "pipecatcloud[pipecat]"
  ```

  Agent images built on `pipecat-base` already have `pipecat-ai`; the extra
  matters when you install `pipecatcloud` yourself.
</Warning>

## PipecatSessionArguments

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

```python theme={null}
from pipecatcloud.agent import PipecatSessionArguments

def bot(args: PipecatSessionArguments):
    print(f"Session ID: {args.session_id}")
    print(f"Custom data: {args.body}")
```

### Properties

<ParamField path="session_id" type="Optional[str]">
  The unique identifier for the current session.
</ParamField>

<ParamField path="body" type="Any">
  The custom data passed to the agent via the session parameters.
</ParamField>

## DailySessionArguments

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

```python theme={null}
from pipecat.runner.types import DailyRunnerArguments

def bot(args: DailyRunnerArguments):
    print(f"Session ID: {args.session_id}")
    print(f"Daily room URL: {args.room_url}")
    print(f"Daily token: {args.token}")
    print(f"Custom data: {args.body}")
```

### Properties

<ParamField path="session_id" type="Optional[str]">
  The unique identifier for the current session.
</ParamField>

<ParamField path="room_url" type="str">
  The URL for the Daily room.
</ParamField>

<ParamField path="token" type="str | None">
  The authentication token for the Daily room.
</ParamField>

<ParamField path="body" type="Any">
  The custom data passed to the agent via the session parameters.
</ParamField>

## WebSocketSessionArguments

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

```python theme={null}
from pipecat.runner.types import WebSocketRunnerArguments

async def bot(args: WebSocketRunnerArguments):
    print(f"Session ID: {args.session_id}")
    await args.websocket.send_text("Hello from the agent!")
```

### Properties

<ParamField path="session_id" type="Optional[str]">
  The unique identifier for the current session.
</ParamField>

<ParamField path="websocket" type="WebSocket">
  The FastAPI WebSocket connection used to communicate with the client.
</ParamField>

## SmallWebRTCSessionArguments

Session arguments for an agent using `SmallWebRTCTransport`.

```python theme={null}
from pipecatcloud.agent import SmallWebRTCSessionArguments

async def bot(args: SmallWebRTCSessionArguments):
    print(f"Session ID: {args.session_id}")
```

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:

```python theme={null}
from pipecatcloud.agent import SessionArguments

def log_session(args: SessionArguments):
    print(f"Session ID: {args.session_id}")
```

<Note>
  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.
</Note>
