Production-ready agent deployment and scaling strategies
Agentic applications demand near-instant agent availability to maintain user engagement and responsiveness. Pipecat Cloud manages the complexity of scaling these agent deployments in production environments, providing granular controls for compute resources and cost optimization.
An instance represents a single unit of compute that runs your agent.
Instance costs are determined by:
Pipecat Cloud automatically provisions and manages agent instances to handle active sessions, ensuring that your deployment can scale to meet demand within the limits of your deployment configuration.
Making a deployment to Pipecat Cloud creates a managed pool of agent instances that:
Developers can configure the upper and lower limit of a deployment’s instance pool, providing a cost-effective way to handle varying loads.
min-agents
0
if unspecifiedMinimum number of agent instances maintained in a pool at all times.
Developers specify a min-agents
configuration to determines the number of agent instances that should be kept warm in their deployment pool. A warm instance is kept running and can immediately be used to serve an active session.
Maintaining a minimum number of agent instances is important to keep agent start times fast and reduce cold starts.
Setting --min-agents
to 1 or greater will incur charges even when the agent
is not in use.
max-agents
Maximum agents is the hard limit on the number of agents in your pool.
During beta, each deployment made to Pipecat Cloud has a maximum allowed pool size of 50. Please contact us at help@daily.co or via Discord if you require more capacity.
Deployments can optionally be made with a max-agents
configuration that limits the number of agent instances that your pool can contain.
This exists as a cost control measure, allowing developers to limit the total number of active sessions that can be run at any one time.
The maximum instance count is a hard limit, meaning requests made to a pool that is at capacity will receive a 429
response. See starting sessions for more information for how to handle this in your application code.
Pool Initialization
min-agents
configuration (defaults to 0
)Session Assignment
429
response from the start requestAuto-scaling
Your are billed for warm agent instances, even if they are not handling active sessions. Developers should consider their deployment strategy when cost optimizing, adjusting the minimum and maximum instance count accordingly. See current pricing for details.
A cold start may occur when an active session request is made and no warm agent instances are available in the pool to handle it. In this case, Pipecat Cloud will provision a new instance to handle the request.
Cold starts require additional time to provision the instance and load the agent instances, which may result in a delay for the user. To minimize cold starts, you can configure your pool to maintain a minimum number of warm agent instances at all times.
Pipecat Cloud aims to mitigate cold starts as much as possible through auto-scaling.
How long does a cold start take?
The exact duration of a cold start depends on multiple factors, such as the size of your agent image and the complexity of your agent. In general, cold starts take around 10 seconds. Once you have a running instance of a deployed image, new sessions start immediately with no cold start delay.
For developers, especially during test and development, using scale-to-zero with cold starts is a good place to start as it saves money. Once you understand your utilization pattern, you can build a strategy around optimizing start times by maintaining warm agent instances.
Mitigation strategies
To avoid cold starts, you can:
min-agents
) in your pool to ensure that there are always agent instances available to handle requests.max-agents
) and issue capacity notifications in your application.For some deployments, using a minimum instance count of 0 is preferable (e.g. while in development.) Since you are only charged for warm agents instances and active sessions, this can be a cost-effective way to manage deployments where fast start times are not required.
When the minimum instance count is set to 0, the pool will scale down to 0 agent instances when there are no active sessions. Idle agent instances are maintained for 5 minutes before being terminated.
Scale-to-zero is not recommended for production deployments where immediate response is required.
Pipecat Cloud performs auto-scaling by default on all deployments. Auto-scaling is accomplished through the following mechanisms:
Pipecat Cloud maintains a free auto-scaling buffer in addition to your paid reserved agent instances. This saves you from over-provisioning warm agent instances while still ensuring fast response times during traffic increases.
When your traffic increases and you have active sessions running, our system automatically:
For example, with multiple active sessions:
/start
endpoint without worrying about configuring additional capacityThis approach means:
min-agents
value than your peak traffic requirementsThe only scenario where you need to consider higher min-agents
values is for extremely rapid traffic spikes (tens or hundreds of calls per second) where the buffer can’t be provisioned fast enough.
Our scaling system is designed to minimize the need for manual capacity planning. Here’s how we recommend thinking about scaling:
Start simple: We encourage you to set min-agents
to 0 initially and test how the system performs for your specific use case. Many applications work well without any pre-warmed agent instances.
Optimize as needed: We work hard to make cold starts rare and as fast as possible so that, for many applications, you don’t have to worry about warm instances at all.
Tune for traffic patterns: If you have spiky workloads with bursty traffic patterns, setting an appropriate min-agents
value can help prevent cold starts during critical periods. Consider scheduling higher min-agents
values only during your peak usage hours.
Our goal is to make scaling decisions as simple as possible while giving you the controls you need for optimization when required.
You can update your deployment’s configuration at any time via the CLI or Pipecat Cloud Dashboard.
Please note that changing your scaling parameters will not disrupt any active sessions. If you reduce your max instance count below the number of currently active sessions, you will still be billed for the duration of those sessions.
Effective capacity planning is crucial for production deployments to ensure your agents respond immediately.
Pipecat Cloud auto-scales your agents. For most cases, the only action you need to take is to set the --min-agents
parameter to 1. However, if your application experiences fluctuations in traffic, you may need to plan for additional warm capacity to ensure your agents are always ready to respond immediately.
See our guide for calculating reserved agents, understanding warm capacity, and implementing scaling strategies for production.
Pipecat Cloud bills based on:
An active session starts when you call the /start
endpoint (or CLI or SDK equivalent). The active session ends when your pipeline shuts down.
Reserved session minutes are the time your warm agent instances are kept running, even if they are not handling active sessions. When active sessions start, the auto-scaler may provision further warm agent instances to support the next incoming request. Reserved session minutes are optional and controlled by setting --min-agents
in your deployment configuration.
Both active and reserved session minutes are rounded up to the nearest minute.
Production-ready agent deployment and scaling strategies
Agentic applications demand near-instant agent availability to maintain user engagement and responsiveness. Pipecat Cloud manages the complexity of scaling these agent deployments in production environments, providing granular controls for compute resources and cost optimization.
An instance represents a single unit of compute that runs your agent.
Instance costs are determined by:
Pipecat Cloud automatically provisions and manages agent instances to handle active sessions, ensuring that your deployment can scale to meet demand within the limits of your deployment configuration.
Making a deployment to Pipecat Cloud creates a managed pool of agent instances that:
Developers can configure the upper and lower limit of a deployment’s instance pool, providing a cost-effective way to handle varying loads.
min-agents
0
if unspecifiedMinimum number of agent instances maintained in a pool at all times.
Developers specify a min-agents
configuration to determines the number of agent instances that should be kept warm in their deployment pool. A warm instance is kept running and can immediately be used to serve an active session.
Maintaining a minimum number of agent instances is important to keep agent start times fast and reduce cold starts.
Setting --min-agents
to 1 or greater will incur charges even when the agent
is not in use.
max-agents
Maximum agents is the hard limit on the number of agents in your pool.
During beta, each deployment made to Pipecat Cloud has a maximum allowed pool size of 50. Please contact us at help@daily.co or via Discord if you require more capacity.
Deployments can optionally be made with a max-agents
configuration that limits the number of agent instances that your pool can contain.
This exists as a cost control measure, allowing developers to limit the total number of active sessions that can be run at any one time.
The maximum instance count is a hard limit, meaning requests made to a pool that is at capacity will receive a 429
response. See starting sessions for more information for how to handle this in your application code.
Pool Initialization
min-agents
configuration (defaults to 0
)Session Assignment
429
response from the start requestAuto-scaling
Your are billed for warm agent instances, even if they are not handling active sessions. Developers should consider their deployment strategy when cost optimizing, adjusting the minimum and maximum instance count accordingly. See current pricing for details.
A cold start may occur when an active session request is made and no warm agent instances are available in the pool to handle it. In this case, Pipecat Cloud will provision a new instance to handle the request.
Cold starts require additional time to provision the instance and load the agent instances, which may result in a delay for the user. To minimize cold starts, you can configure your pool to maintain a minimum number of warm agent instances at all times.
Pipecat Cloud aims to mitigate cold starts as much as possible through auto-scaling.
How long does a cold start take?
The exact duration of a cold start depends on multiple factors, such as the size of your agent image and the complexity of your agent. In general, cold starts take around 10 seconds. Once you have a running instance of a deployed image, new sessions start immediately with no cold start delay.
For developers, especially during test and development, using scale-to-zero with cold starts is a good place to start as it saves money. Once you understand your utilization pattern, you can build a strategy around optimizing start times by maintaining warm agent instances.
Mitigation strategies
To avoid cold starts, you can:
min-agents
) in your pool to ensure that there are always agent instances available to handle requests.max-agents
) and issue capacity notifications in your application.For some deployments, using a minimum instance count of 0 is preferable (e.g. while in development.) Since you are only charged for warm agents instances and active sessions, this can be a cost-effective way to manage deployments where fast start times are not required.
When the minimum instance count is set to 0, the pool will scale down to 0 agent instances when there are no active sessions. Idle agent instances are maintained for 5 minutes before being terminated.
Scale-to-zero is not recommended for production deployments where immediate response is required.
Pipecat Cloud performs auto-scaling by default on all deployments. Auto-scaling is accomplished through the following mechanisms:
Pipecat Cloud maintains a free auto-scaling buffer in addition to your paid reserved agent instances. This saves you from over-provisioning warm agent instances while still ensuring fast response times during traffic increases.
When your traffic increases and you have active sessions running, our system automatically:
For example, with multiple active sessions:
/start
endpoint without worrying about configuring additional capacityThis approach means:
min-agents
value than your peak traffic requirementsThe only scenario where you need to consider higher min-agents
values is for extremely rapid traffic spikes (tens or hundreds of calls per second) where the buffer can’t be provisioned fast enough.
Our scaling system is designed to minimize the need for manual capacity planning. Here’s how we recommend thinking about scaling:
Start simple: We encourage you to set min-agents
to 0 initially and test how the system performs for your specific use case. Many applications work well without any pre-warmed agent instances.
Optimize as needed: We work hard to make cold starts rare and as fast as possible so that, for many applications, you don’t have to worry about warm instances at all.
Tune for traffic patterns: If you have spiky workloads with bursty traffic patterns, setting an appropriate min-agents
value can help prevent cold starts during critical periods. Consider scheduling higher min-agents
values only during your peak usage hours.
Our goal is to make scaling decisions as simple as possible while giving you the controls you need for optimization when required.
You can update your deployment’s configuration at any time via the CLI or Pipecat Cloud Dashboard.
Please note that changing your scaling parameters will not disrupt any active sessions. If you reduce your max instance count below the number of currently active sessions, you will still be billed for the duration of those sessions.
Effective capacity planning is crucial for production deployments to ensure your agents respond immediately.
Pipecat Cloud auto-scales your agents. For most cases, the only action you need to take is to set the --min-agents
parameter to 1. However, if your application experiences fluctuations in traffic, you may need to plan for additional warm capacity to ensure your agents are always ready to respond immediately.
See our guide for calculating reserved agents, understanding warm capacity, and implementing scaling strategies for production.
Pipecat Cloud bills based on:
An active session starts when you call the /start
endpoint (or CLI or SDK equivalent). The active session ends when your pipeline shuts down.
Reserved session minutes are the time your warm agent instances are kept running, even if they are not handling active sessions. When active sessions start, the auto-scaler may provision further warm agent instances to support the next incoming request. Reserved session minutes are optional and controlled by setting --min-agents
in your deployment configuration.
Both active and reserved session minutes are rounded up to the nearest minute.