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 Python library 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:
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.While in beta, the default instance pool capacity is 50 active sessions per
deployment. Please contact us at help@daily.co or via
Discord if you require more capacity.
429
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
Session logs are not available in beta.
Stopping sessions
Session termination is not available in beta.
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