Pipecat Cloud agents are designed to be run from containerized images. This allows you to run the agent in a controlled environment, with all the dependencies and configurations needed.Your project defines the environment that your agent will run using Docker and built using a Dockerfile in the root directory of the project.For example, your Dockerfile might look like this:
Dockerfile using uv
Dockerfile using pip
Copy
Ask AI
FROM dailyco/pipecat-base:latest# Enable bytecode compilationENV UV_COMPILE_BYTECODE=1# Copy from the cache instead of linking since it's a mounted volumeENV UV_LINK_MODE=copy# Uncomment this if you wish to print a summary of the features available in the base image.# ENV PCC_LOG_FEATURES_SUMMARY=true# Install the project's dependencies using the lockfile and settingsRUN --mount=type=cache,target=/root/.cache/uv \ --mount=type=bind,source=uv.lock,target=uv.lock \ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ uv sync --locked --no-install-project --no-dev# Copy the application codeCOPY ./bot.py bot.py
Copy
Ask AI
FROM dailyco/pipecat-base:latestCOPY ./requirements.txt requirements.txt# Uncomment this if you wish to print a summary of the features available in the base image.# ENV PCC_LOG_FEATURES_SUMMARY=trueRUN pip install --no-cache-dir --upgrade -r requirements.txtCOPY ./bot.py bot.py
Pipecat Cloud provides a series of base images that we recommend for most use-cases. Base images provide:
Simplified development and deployment
Optimizations for performance and security
Pre-installed system dependencies for most multi-modal agent use-cases
Using a base image reduces complexity in your project but requires you to adhere to a specific project structure.
Your project must contain a bot.py file that defines the agent pipeline
The bot.py must contain a bot() method that is the entry point for your agent pipeline
The bot() method must be asynchronous, e.g. async def bot():
You do not need to specify a CMD as part of your Dockerfile - the base image is configured to run your bot.py module.You can browse available base images in the Pipecat Cloud Docker Hub .
The base image uses the /app directory for its internal operation. Avoid copying files to /app in your Dockerfile to prevent conflicts with system files.
Writing to /app may overwrite critical system files and cause your
deployment to fail. Your agent code should be placed in bot.py (required)
and any additional modules, which the base image handles automatically.
The base image exposes the following HTTP routes for Pipecat Cloud platform integration:
Route
Method
Description
/bot
POST
Main entry point called by Pipecat Cloud to start agent sessions
/ws
WebSocket
WebSocket endpoint for real-time communication (e.g., telephony integrations)
/api/offer
POST
SmallWebRTC offer handling for peer-to-peer connections
/api/offer
PATCH
SmallWebRTC ICE candidate handling
/whatsapp
POST
WhatsApp Business webhook endpoint
These routes are automatically configured based on available features. For
example, the /whatsapp route is only available when WhatsApp environment
variables are configured.
For more complex use-cases, you can use a custom image.When doing so, we recommend following best practices to ensure your agent instance runs optimally on the platform.Our base image is open source and serves as a useful blueprint for configuring your custom agent image.
Custom agent images are for advanced use cases. For most teams,
we recommend using our base images. If needed, consult the base
image code as a reference.For unsupported use cases, contact us at help@daily.co or via
Discord.
Pipecat Cloud agent images must adhere to a specific structure to run on the platform. Our base images abstract away much of this complexity, but if you are building a custom image, you must ensure your agent adheres to the following:
HTTP API that can handle requests from the platform to configure and run agent instances.
The necessary system level dependencies (such as Python.)
In order to start an instance of your custom agent, you must expose a HTTP POST /bot route that will be called by the platform.We recommend using FastAPI to create this route. Please refer to the base image code for an example of how to do this.