Once you have made a successful deployment, you can start on-demand sessions to begin interacting with your agent. An active session is a running instance of your agent code that connects with you or your end-users. Sessions are created in response to a request and scaled up or down based on your deployment configuration (see Scaling).Documentation Index
Fetch the complete documentation index at: https://daily-ms-pcc-830.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
You must have an active billing account to start sessions. Usage is billed for
the duration of each session, please refer to
pricing for more information.
Running an agent
Requests to start an agent requires passing a public API key. Keys are used to ensure that only authorized users or apps can start sessions and can be cycled or revoked at any time.Development pattern
A typical application will start a session in response to a user request (via a web UI, mobile app, phone call or other client). Pipecat Cloud takes care of your session infrastructure and scaling, so you can focus on building your application logic. Developers should:- Provide a secure endpoint to receive requests that keeps your API key secret
- Pass any required data to the agent when starting a session (such as pipeline configuration, transport session data, etc.)
- Handle any errors that may occur during the start process
Using REST
The Pipecat Cloud REST API provides an endpoint to start a session with your agent over HTTP:Using Python
The Pipecat Cloud Python library (uv add pipecatcloud) provides helper methods to start a session with your agent:
Using the CLI
To start an agent via the command line interface:Passing data
Most agents will require some initial data, such pipeline configuration, transport session credentials, etc. For sensitive data, we recommend using secrets to store and access your data securely. You pass a data blob through to the start request (please note that the data must be JSON-serializable):bot() method, which receives session arguments:
- Standard Session
- Daily Voice Session
- WebSocket Session
Size limits
The maximum body size is 1 MB of JSON across all transports. Requests exceeding this limit are rejected with413 Payload Too Large before any bot is started.
For
transport: "websocket", passing a body requires the service to be deployed with websocket_auth = "token" (see WebSocket Authentication). The body is delivered to the bot through the authenticated session, not encoded into the WebSocket URL — so the returned wsUrl stays compact and there are no URL-construction concerns on your client side.A /start call with a body and websocket_auth = "none" is rejected with 400 Bad Request.Agent capacity
Deployments have an upper limit for the number of sessions that can be started concurrently. This helps developers implement cost control and workload management and can be adjusted per deployment. See Scaling for more information. Developers are responsible for handling capacity errors when starting sessions. When your instance pool is at capacity, the start request will fail with a429 status and code.
Here is a simple example of how to handle a capacity error:
Logging and monitoring
Session observability can be accessed via the Dashboard or from the CLI.Active sessions
To view active sessions via the CLI:Session logs
To view individual session logs, use the following command:Stopping sessions
You can issue a termination request to stop an active session. This will immediately stop the instance so be aware of disrupting any ongoing user interactions.Session duration limits
Every service has a maximum session duration. When a session reaches this limit, its connection is forcibly closed — the session is cut off mid-flight with no notice to the bot. This is a platform-level safeguard, not a polite signal: the bot code receives a connection error the next time it tries to send or receive data. If you want the bot to say goodbye gracefully before the cap, you must implement your own timer in bot code that fires slightly earlier. By default, sessions are capped at 7200 seconds (2 hours). You can configure this per service between 60 seconds and 14400 seconds (4 hours):- Increase the limit for agents that routinely run long (e.g. interview, tutoring, or support calls that legitimately last 3+ hours).
- Decrease the limit as a cost safety net — for example, if your application is meant to have 60-second calls, capping sessions at 120s protects you from runaway sessions caused by bugs in your agent code.
- CLI
- REST API
- Dashboard
--max-session-duration for details.Changing the max session duration triggers a new deployment of your service,
which replaces all running pods. Existing sessions running under the previous
configuration will continue to their original cap.
Usage
You are charged for the duration of each session, see pricing. The exact duration of session is calculated based on:- Time spent instantiating the agent
- Time spent running the agent
- Time spent tearing down the agent