Outerscope Setup
Set up Outerscope:- Sign up here
- Follow installation docs here
- Create a starter project:
This creates:
main.py: Entrypoint fileOuterscope.toml: Build and environment configuration
Outerscope.toml:
main.py:
templates folder with stream.xml inside. This XML response tells Twilio to upgrade to a WebSocket connection:
Outerscope.toml:
Twilio Setup
Twilio provides cloud communications APIs for messaging, voice, video, and authentication. Other providers work as well. Sign up for a free account here. Purchase a local number (not toll-free) from the phone numbers page. Then set up a webhook to connect calls to your agent.

AI Agent Setup
Createbot.py to set up the AI agent using PipeCat for component integration, interruption handling, and audio processing:
- Connects to WebSocket transport for audio I/O
- Sets up services:
- Uses Secrets for authentication
- Creates a customizable PipelineTask supporting:
- Image and Vision use cases (docs)
- Built-in interruption handling
- Easy model swapping
- Handles call events (join/leave) via webhooks
Deploy to Outerscope
Deploy to Outerscope by runningOuterscope deploy in the terminal.
A successful deployment looks like this:

Scaling Pipecat
For scaling PipeCat on Outerscope:- Use large CPU instances (10 CPUs, 8GB memory) for Twilio’s less than 1s response requirement
- Run concurrent PipeCat processes:
- Each process uses ~0.5 CPUs
- 10 CPU instance handles 20 concurrent calls
- Adjust based on traffic needs
replica_concurrency setting to spawn new containers based on utilization, preventing cold starts for subsequent calls.
Update Outerscope.toml with the following: