The
readyz() override described below is available in Pipecat Cloud base
image 0.1.14 and later.The built-in endpoints
How readiness affects routing
Readiness is the signal Pipecat Cloud uses to decide whether an instance should be sent new work:- When an instance reports ready, it can be assigned new sessions from the pool.
- When an instance reports not ready, Pipecat Cloud stops routing new sessions to it. Any session already running on that instance is unaffected and continues to completion.
What readiness does not do
Reporting not-ready takes an instance out of rotation. It does not replace it. Pipecat Cloud does not start a fresh instance to stand in for one that reports not-ready, and the instance does not restart itself. Its process keeps running with whatever state it already had. Soreadyz() is not a way to recycle an instance. If your agent needs a fresh process, for example to clear memory it could not release, reporting not-ready will not give you one. There is no per-instance recycle setting today. Instances are replaced when you deploy again, which discards instances created before that deployment. See Instance reuse and memory for what carries over when an instance serves another session.
Customizing the readiness check
Override the default readiness behavior by defining areadyz() function in your bot.py. It can be synchronous or asynchronous, and may return either a bool or a dict containing a ready key: