Skip to main content

Overview

The Pipecat development runner provides a unified way to run voice AI bots across multiple transport types. It handles infrastructure setup - creating Daily rooms, managing WebRTC connections, and routing telephony calls.

Installation

What is a Runner?

A runner in Pipecat refers to a “bot runner”, an HTTP service that provides a gateway for spawning bots on-demand. It’s the component that enables your bot to run by providing it with server infrastructure and connection details like rooms and tokens. A bot runner typically creates transport sessions (like Daily WebRTC rooms), generates authentication tokens for both bots and users, spawns new bot processes when users request sessions, and manages bot lifecycle and cleanup. Think of it as the bridge between incoming user connections and your bot logic.

How the Development Runner Works

The development runner operates as a FastAPI web server that automatically discovers and executes your bot code. By default it starts a single server that supports all transports simultaneously — WebRTC, Daily, LiveKit, SIP, telephony (Twilio, Telnyx, Plivo, Exotel), and plain WebSocket. Clients choose which transport they want per-request by sending a "transport" field in the POST /start body; you no longer restart the server to switch transports.
  • WebRTC connections: It serves a built-in web interface where users can connect directly as well as an endpoint to create new WebRTC sessions
  • Daily integration: It provides endpoints that create new rooms and tokens and redirect users to join them
  • LiveKit integration: It mints room tokens and spawns bots as participants in LiveKit rooms
  • Telephony providers: For Twilio, Telnyx, and Plivo, it sets up webhook endpoints that handle incoming calls and establish WebSocket connections for audio streaming
  • SIP: It starts bots that register a SIP account, and serves a webhook for Daily SIP-trunk notifications
  • Plain WebSocket: It exposes a /ws-client endpoint for non-telephony WebSocket clients (e.g. browser apps using protobuf framing)
The runner registers the infrastructure for every transport and dispatches each connection to the right handler. It then discovers your bot function and spawns new instances whenever users connect. This means you can focus on writing your bot logic while the runner handles all the server infrastructure, connection management, and transport-specific details.
Passing -t/--transport is optional. Omit it to support all transports at once (the default). Pass it (e.g. -t daily) to restrict the server to a single transport and make it the default for /start.
Your bot code receives runner arguments that contain everything it needs, including Daily room URLs and tokens, WebRTC connections, or WebSocket streams for telephony. The runner abstracts away the complexity of managing these different connection types, providing a unified interface for building bots that work across multiple platforms.

Pipecat Cloud Ready

The bot runner is designed to be cloud-ready, meaning that you can run the same bot code locally and deployed to Pipecat Cloud without any modifications. It automatically handles the differences in transport setup, providing you with the flexibility to test locally using an open source transport, like SmallWebRTCTransport, but run in production using Daily or telephony transports.

Building with the Runner

Now let’s build a practical example to see how this works. The key insight is that your bot code is structured into two parts: the core bot logic that works with any transport, and the entry point that creates the appropriate transport based on the runner arguments. Here’s the basic structure:
The run_bot() function contains your actual bot logic and is transport-agnostic. The bot() function is the entry point that the runner calls - it creates the appropriate transport and passes it to your bot logic. This separation allows the same bot code to work across different transports. When you run this with python bot.py, the development runner starts a web server and opens a browser interface at http://localhost:7860/client. Each time someone connects, the runner calls your bot() function with WebRTC runner arguments.
webrtc_connection only exists on SmallWebRTCRunnerArguments, not on the base RunnerArguments class. The example above works because it runs with the WebRTC transport. If you run with any other transport, accessing runner_args.webrtc_connection raises AttributeError: 'RunnerArguments' object has no attribute 'webrtc_connection'. To support more than one transport, branch on the argument type with the isinstance pattern shown in Supporting Multiple Transports below.

Supporting Multiple Transports

To make your bot work across different platforms, you can detect the transport type from the runner arguments and create the appropriate transport. Here’s how to support both Daily and WebRTC:
Now you can run your bot. A single server supports every transport at once, and the client picks which one to use when it starts a session:
If you want to limit the server to one transport (and make it the default for /start), pass -t/--transport:

Understanding Runner Arguments

Runner arguments are how the runner communicates transport-specific information to your bot. The runner determines which transport to use based on the command-line arguments, then creates the appropriate runner arguments:
  • DailyRunnerArguments: Contains room_url, token (Optional), body (Optional) for joining Daily rooms
  • LiveKitRunnerArguments: Contains room_name, url, token, body (Optional), session_id for joining LiveKit rooms
  • SmallWebRTCRunnerArguments: Contains webrtc_connection for local WebRTC sessions, body (Optional) for WhatsApp call metadata
  • SIPRunnerArguments: Contains the SIP account (user, domain, password, transport) and the connection settings read from the environment, for registering with a SIP server
  • WebSocketRunnerArguments: Contains websocket for both telephony and plain WebSocket connections. The transport_type field distinguishes them: "websocket" for plain (non-telephony) clients connecting via /ws-client, or None for connections via /ws until create_transport() sets it to the detected telephony provider.
All runner arguments also include:
  • handle_sigint: Whether the bot should handle SIGINT (Ctrl+C) signals. Pass this to WorkerRunner(handle_sigint=runner_args.handle_sigint) so bots run directly can install their own signal handler while hosted bots leave signals to the host.
  • handle_sigterm: Whether the bot should handle SIGTERM signals (managed automatically)
  • file_storage: The FileStorage backend serving the host’s upload endpoints, or None when uploads are disabled. It is the backend returned by a synchronous create_file_storage() function defined in the bot module, if there is one; otherwise the runner’s -u/--uploads-folder local storage. Pass it to an LLM service’s file resolver with file_resolver=FileResolver(file_storage=runner_args.file_storage) so send-file messages can resolve uploaded files.
For WhatsApp connections, SmallWebRTCRunnerArguments.body contains a WhatsAppConnectCall object with caller metadata (phone number, call ID, direction, timestamp). This allows your bot to access caller information without additional API calls.
handle_sigint and handle_sigterm are development only features and cannot be used when deploying to Pipecat Cloud.
The runner handles all the complex setup - creating Daily rooms, generating tokens, establishing WebSocket connections - and provides your bot with everything it needs through these runner arguments. Notice how we use lazy imports (from pipecat.transports.daily.transport import ...) inside the conditional blocks. This ensures that transport-specific dependencies are only required when that transport is actually used, making your bot more portable.
RunnerArguments is the base class for all runner arguments. It provides a common interface for the runner to pass transport-specific information to your bot.

Environment Detection

When building bots that work both locally and in production, you often need to detect the execution environment to enable different features. The development runner sets the ENV environment variable to help with this:

Environment Values

The development runner automatically sets environment variables based on how your bot is running:
  • Local development: ENV=local (set by the development runner)
  • Production/Cloud deployment: ENV is not set or has a different value
This allows you to easily customize behavior between development and production environments:

All Supported Transports

The development runner supports ten transport types, each designed for different use cases. By default all are available from one server; the client selects one per session via the "transport" field in the /start request. The -t <transport> form below is the optional way to restrict the server to a single transport.

WebRTC ("transport": "webrtc")

Local WebRTC connections with a built-in browser interface. Perfect for development and testing. This is the default transport when a /start request omits the "transport" field.
Runner Arguments: SmallWebRTCRunnerArguments
  • webrtc_connection: Pre-configured WebRTC peer connection

Daily ("transport": "daily")

Integration with Daily for production video conferencing with rooms, participant management, and Pipecat client compatibility.
Runner Arguments: DailyRunnerArguments
  • room_url: Daily room URL to join
  • token: Authentication token for the room
  • body: Request data from /start endpoint (dict) or dial-in webhook data
Available Endpoints:
  • GET /daily: Browser redirect that creates a room and joins it
  • POST /start: RTVI-compatible endpoint for programmatic access (send "transport": "daily")
  • POST /daily-dialin-webhook: PSTN dial-in webhook handler (on by default; --no-dialin disables it)
GET / redirects to the prebuilt client UI at /client/ for all transports. The Daily browser redirect moved to GET /daily in Pipecat 1.3.0.

LiveKit ("transport": "livekit")

Integration with LiveKit for production WebRTC conferencing with rooms and participant management.
Runner Arguments: LiveKitRunnerArguments
  • room_name: LiveKit room name to join
  • url: LiveKit server URL to connect to
  • token: Authentication token for the room
  • body: Request data from /start endpoint (dict)
  • session_id: Unique session identifier
Available Endpoints:
  • POST /start: RTVI-compatible endpoint for programmatic access (send "transport": "livekit")
Environment Variables:
  • LIVEKIT_URL: LiveKit server URL (required)
  • LIVEKIT_API_KEY: LiveKit API key (required)
  • LIVEKIT_API_SECRET: LiveKit API secret (required)
  • LIVEKIT_ROOM_NAME: Room name to use (optional, defaults to pipecat-{random})

Telephony ("transport": "twilio" | "telnyx" | "plivo" | "exotel")

Phone call integration through telephony providers. Requires a public webhook endpoint and provider credentials.
The provider-specific XML webhook (POST /) is only registered when you select a single telephony transport with -t (the XML template needs the --proxy hostname). The media WebSocket at /ws is always available. Environment Variables:
  • Twilio: TWILIO_ACCOUNT_SID, plus either TWILIO_AUTH_TOKEN or the API key pair TWILIO_API_KEY and TWILIO_API_SECRET (not both). To hang up calls in a non-US1 region such as ie1 / dublin, also set TWILIO_REGION and TWILIO_EDGE.
  • Telnyx: TELNYX_API_KEY
  • Plivo: PLIVO_AUTH_ID, PLIVO_AUTH_TOKEN
  • Exotel: None required (no hang-up functionality available)
Environment variables are optional, but when provided will attempt to hang up the call when the session ends. Runner Arguments: WebSocketRunnerArguments
  • websocket: WebSocket connection for audio streaming
Your bot receives the accepted FastAPI WebSocket. create_transport() detects the telephony provider from its first messages and configures the matching serializer; when you build the transport yourself, call parse_telephony_websocket() to detect the provider and set the serializer in FastAPIWebsocketParams.

SIP ("transport": "sip")

Native SIP calling through SIPTransport. Requires pipecat-ai[sip] (Linux or macOS; Windows through WSL2).

Quick start

The runner can run a SIP bot with no SIP account at all. With DAILY_API_KEY set, plus whatever keys the bot’s own services need:
The runner provisions a temporary SIP client on your Daily domain, logs Created Daily SIP client: sip:pipecat-<id>@<domain>.sip-us.daily.co, and the bot registers and waits. Dial that URI from any SIP softphone (Linphone, Zoiper, Telephone.app on macOS) and the bot answers. The client expires on its own after two hours and is deleted when the bot exits. Nothing else is needed to hear the transport work; the rest of this section is for a real account and for phone calls.

Where the account comes from

The runner resolves the account from three sources, in this order; the first that applies wins. 1. The request body (body.sip_client). A /start request, or the --runner-body file in direct mode, names the account:
username, password, and domain are required. transport is optional and wins over SIP_TRANSPORT; it is tls when neither is given. sip_uri is optional and informational. This is the shape a Daily SIP trunk sends for each call, so one bot serves /start and the trunk webhook below without a code change. The whole body reaches the bot as runner_args.body. 2. The environment (SIP_USER, SIP_PASS, SIP_DOMAIN). A fixed account on any registrar: a PBX such as FreeSWITCH or Asterisk, a Kamailio deployment, a carrier’s registration trunk, or a persistent Daily SIP client. The bot registers it at start and stays registered between calls. For a carrier trunk that authenticates each call instead of a registration (a credential list), set SIP_REG_INTERVAL=0 and, when the digest username differs from the address, SIP_AUTH_USER. 3. A provisioned Daily SIP client (DAILY_API_KEY). When neither of the above is set, the runner creates a temporary client, as in the quick start. Only the runner’s own /start and direct modes provision; Pipecat Cloud and create_transport() on plain runner arguments never do.

The Daily SIP-trunk webhook

With -t sip, the runner also serves POST /daily-sip-trunk-webhook, a local stand-in for Pipecat Cloud’s handler of Daily SIP-trunk notifications. A sip_client trunk on Daily provisions a SIP client for each inbound call and POSTs a sip_trunk.incoming notification to the trunk’s webhook_url. The route starts a bot on that per-call account and answers at once, while Daily holds the caller until the bot’s REGISTER lands. The config-time sip_trunk.test probe is acknowledged without starting anything, and a notification without a usable sip_client is refused with HTTP 400. The whole notification reaches the bot as runner_args.body.
The runner’s route does not verify the notification’s X-Siptrunk-Signature; it is a development tool meant to sit behind a tunnel. Pipecat Cloud’s handler verifies every notification with the trunk’s secret, and a self-hosted handler must do the same. The signature recipe is in Daily’s notification reference.
To use it: run python bot.py -t sip, expose the port (ngrok http 7860), create the trunk through the Daily SIP trunk API with notification.webhook_url set to https://<host>/daily-sip-trunk-webhook, and point your carrier at the trunk’s sip_uri.

Environment variables

Grouped by what they are for; only the account group is ever required. The account
  • SIP_USER, SIP_PASS, SIP_DOMAIN: An existing SIP account; set these to run against your own registrar. Without SIP_USER and SIP_DOMAIN, and no sip_client in the body, a temporary Daily SIP client is provisioned.
  • DAILY_API_KEY: Needed only when the runner provisions that client. DAILY_API_URL (Optional) overrides the API URL.
  • SIP_TRANSPORT (Optional): udp, tcp, or tls. Defaults to udp for an account from the environment and tls for a provisioned client or a body account; a transport in the body wins. Use tls whenever the registrar offers it.
  • SIP_AUTH_USER (Optional): The digest username when it differs from SIP_USER; carrier credential lists are the usual case.
  • SIP_REG_INTERVAL (Optional): Seconds between registration refreshes; default 240, which fits common cloud NAT idle timeouts. Lower it for a NAT that drops idle connections sooner. 0 disables registration: trunk mode, for a carrier that authenticates each INVITE instead.
Media and NAT
  • SIP_STUN_SERVER (Optional): The runner enables medianat=stun by default with stun.l.google.com, so the bot advertises its public address in the SDP. Set off to disable it, for a registrar on the same network or on loopback. STUN alone does not work behind a symmetric NAT (Pipecat Cloud, AWS NAT Gateway); the remedies are under extra_params in the SIPConnection reference.
  • SIP_EXTRA_PARAMS (Optional): Comma-separated raw baresip account parameters (key=value), for anything the typed settings do not cover, medianat=turn,stunserver=turn:HOST:3478,stunuser=USER,stunpass=PASS for instance. It replaces the default STUN setting, so repeat medianat=stun,stunserver=... if you still want that.
  • SIP_AUDIO_CODECS (Optional): Comma-separated codec preference list by stack name, for example opus/48000/2,PCMU/8000/1. Set it to match what the far end offers; PSTN trunks are PCMU and PCMA.
  • SIP_JITTER_BUFFER (Optional): off, fixed:MIN-MAX, or adaptive:MIN-MAX in milliseconds; default a fixed 40-60 ms. Raise the minimum on a jittery path (choppy audio, on_dialin_warning reports); lower it on a clean one to shave latency.
  • SIP_RTP_TIMEOUT (Optional): Seconds without received RTP before the call is closed as dead; default 0 (off). Set it (30, say) for peers that can vanish without a BYE.
Deployment
  • SIP_INSTANCE_ID (Optional): A stable UUID identifying this endpoint across restarts (RFC 5626 +sip.instance). Set it so a restarted bot replaces its own registration instead of leaving a stale one that still receives calls.
  • SIP_NET_INTERFACE (Optional): Restrict the stack to one local interface, by name or address: 127.0.0.1 for a registrar on loopback, or one address of a multi-homed host.
Debugging
  • SIP_NATIVE_LOG_LEVEL (Optional): Lowest severity captured from the native SIP stack (debug, info, warning, or error); default warning.
  • SIP_TRACE (Optional): 1 or true logs every SIP message verbatim, SDP included. The trace carries authentication material: never enable it in production or paste it into an issue.

Debugging a SIP bot

The events tell most of the story; the trace tells the rest. When the table does not settle it, SIP_TRACE=1 SIP_NATIVE_LOG_LEVEL=debug shows the signaling and the stack’s view of it. Runner Arguments: SIPRunnerArguments create_transport() builds the SIPTransport from the runner arguments, so bots need a "sip" key in transport_params and nothing else. It also builds it from plain RunnerArguments, as on Pipecat Cloud, when the body carries sip_client or the environment holds SIP_USER and SIP_DOMAIN. It never provisions a Daily SIP client on its own. To work with the account yourself, pipecat.runner.sip provides configure() (resolves the account), sip_runner_arguments() (converts it into SIPRunnerArguments), and cleanup() (deletes a client that configure() provisioned).

WebSocket ("transport": "websocket")

Plain (non-telephony) WebSocket connections, for clients such as browser apps that speak protobuf framing directly. Selecting this transport on /start returns a wsUrl pointing at the /ws-client endpoint, which the client then connects to.
Runner Arguments: WebSocketRunnerArguments
  • websocket: WebSocket connection for audio streaming
  • transport_type: "websocket" for plain clients (distinguishes them from telephony connections, which arrive on /ws)
Use the transport_type field to branch your bot’s setup — plain WebSocket clients typically use a ProtobufFrameSerializer, whereas telephony clients use a provider-specific serializer.

Command Line Options

The development runner accepts several command-line arguments to customize its behavior:

Key Arguments

--transport / -t: Optional. When omitted, the server supports all transports at once and the client chooses one per /start request. When provided, it restricts the server to a single transport and makes it the default for /start; requests for any other transport are rejected with HTTP 400. Valid values:
  • webrtc: Local WebRTC with browser interface
  • daily: Daily.co integration with room management
  • livekit: LiveKit integration with room management
  • twilio, telnyx, plivo, exotel: Telephony provider integration
  • websocket: Plain WebSocket server
  • sip: SIP calling, registering a SIP account
  • moq: Media over QUIC, serving its own socket or dialing a relay
--proxy / -x: Required for most telephony transports (Twilio, Telnyx, Plivo). This should be a publicly accessible hostname (like yourbot.ngrok.io) that can receive webhooks from telephony providers. The runner automatically strips protocol prefixes (http://, https://) if provided. Not required for Exotel, which uses direct WebSocket connections. --direct / -d: Bypasses the web server and runs your bot immediately: it joins a Daily room, or with -t sip registers the SIP account. Useful for quick testing but not recommended for production use. --dialin / --no-dialin: The /daily-dialin-webhook endpoint for handling Daily PSTN dial-in calls is mounted by default; pass --no-dialin to leave it out. This endpoint receives webhook data from Daily when a phone call dials into your configured phone number, creates a SIP-enabled room, and spawns your bot. It doesn’t require -t daily. --allowed-origins: Restricts which origins can connect to HTTP and WebSocket endpoints. Useful for preventing Cross-Site WebSocket Hijacking (CSWSH) attacks. When set, connections with a missing or disallowed Origin header are rejected. Pass several origins after one flag, separated by spaces (--allowed-origins https://a.com https://b.com); when the flag is repeated, only the last one counts. Defaults to the PIPECAT_ALLOWED_ORIGINS environment variable (comma-separated). Leave unset to allow all origins. --ws-auth: WebSocket authentication for the telephony (/ws) and plain WebSocket (/ws-client) endpoints, none (default) or token. With token, a client calls POST /start first, which returns a token alongside the wsUrl, then presents that token when it connects, in one of three ways:
  • Authorization: Bearer <token> header
  • ?token=<token> query parameter
  • Path segment: /ws/<token> or /ws-client/<token> (recommended for telephony providers)
Each token works for one connection and expires after 5 minutes. A missing, invalid, expired, or reused token closes the WebSocket with code 4003. /start itself isn’t authenticated, so token auth makes every connection trace back to a /start call but doesn’t restrict who can make one. Telephony providers configured through the runner’s POST / XML webhook connect to /ws without a token, so under token they’re rejected: have your own webhook call /start and return the tokened URL instead. Defaults to the PIPECAT_WEBSOCKET_AUTH environment variable. The setting matches websocket_auth = "token" on Pipecat Cloud; see WebSocket Authentication. --downloads-folder / -f: Folder of files the runner makes available for download. The older --folder flag still works as a deprecated alias. --uploads-folder / -u: Enables client file uploads, stored in the given folder through a LocalFileStorage. The runner exposes POST /sessions/{session_id}/files (50 MB cap), and a flat POST /files for transports whose clients never learn a session id. Each responds with an RTVI file source ({"type": "url", "url": "pipecat:<id>"}) that the client passes straight back in a send-file message. A session’s uploads are deleted when its bot session ends (not for the flat /files route). /start responses include a fileUploadUrl, relative to the /start endpoint’s origin, naming the route to use; it’s omitted when uploads are disabled. Defaults to the PIPECAT_UPLOADS_FOLDER environment variable. --uploads-folder-max-files: Caps how many saved uploads stay in the uploads folder as a backstop; the oldest are removed first. Other files in the folder are left alone. Defaults to 10. To store uploads somewhere other than the local folder, such as a cloud bucket, define a create_file_storage() function next to your bot() that returns a FileStorage (pipecat.utils.file_storage). The runner calls it and injects the result into the bot as runner_args.file_storage; pass it to your LLM service’s FileResolver so send-file URLs can be resolved. --esp32: Enables SDP (Session Description Protocol) modifications needed for ESP32 WebRTC compatibility. Must be used with a specific IP address via --host.

Environment Variables

Different transports require different environment variables: Daily:
  • DAILY_API_KEY: Daily API key for creating rooms and tokens (required for dial-in)
  • DAILY_ROOM_URL (Optional): Existing room URL to use
  • DAILY_API_URL (Optional): Daily API URL (defaults to https://api.daily.co/v1)
LiveKit:
  • LIVEKIT_URL: LiveKit server URL (required)
  • LIVEKIT_API_KEY: LiveKit API key (required)
  • LIVEKIT_API_SECRET: LiveKit API secret (required)
  • LIVEKIT_ROOM_NAME (Optional): Room name to use (defaults to pipecat-{random})
Telephony:
  • TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN: Twilio credentials (or TWILIO_API_KEY and TWILIO_API_SECRET instead of the Auth Token)
  • TWILIO_REGION, TWILIO_EDGE (Optional): Twilio region and edge for non-US1 regions (set both)
  • PLIVO_AUTH_ID, PLIVO_AUTH_TOKEN: Plivo credentials
  • TELNYX_API_KEY: Telnyx API key
SIP: See SIP for the full list.
  • SIP_USER, SIP_PASS, SIP_DOMAIN: Existing SIP account
  • DAILY_API_KEY: Provisions a temporary SIP client when no account is given
Security:
  • PIPECAT_ALLOWED_ORIGINS: Comma-separated list of allowed origins for HTTP and WebSocket connections. When set, the runner and WebSocket transports reject any connection whose Origin header is missing or not in this list. Leave unset or empty to allow all origins. Example: https://example.com,https://app.example.com
  • PIPECAT_WEBSOCKET_AUTH: Default for --ws-auth, none or token.
The runner automatically uses these environment variables when creating transport sessions and authentication tokens.

Simplifying with the Transport Utility

While the manual approach gives you full control, the create_transport utility provides a much cleaner way to handle multiple transports. Instead of writing conditional logic for each transport type, you define transport configurations upfront and let the utility handle the selection:
The utility automatically:
  • Detects the telephony provider from WebSocket messages
  • Configures the appropriate serializer (Twilio, Telnyx, Plivo, or Exotel)
  • Sets up authentication using environment variables
  • Handles WebRTC, Daily, and plain WebSocket transport creation
Each transport your bot accepts needs a key in transport_params ("telnyx", "plivo", "exotel", "livekit", "moq", and so on); create_transport() raises ValueError for a transport without one.

RTVI Integration

The development runner provides RTVI (Real-Time Voice Interface) compatible endpoints for the Pipecat client SDKs. This allows you to use the Pipecat client libraries locally during development as well as when deployed to Pipecat Cloud.

The /start Endpoint

The runner exposes a single unified POST /start endpoint that works for all transports. The client picks the transport via the "transport" field in the request body (default: "webrtc"); the runner then spawns the bot and returns transport-specific connection details in RTVI-compatible format.
If you started the runner with -t <transport>, a /start request for any other transport is rejected with HTTP 400. Request Format ("transport": "webrtc", the default):
Returns a sessionId, plus an iceConfig when the runner was started with --ice-servers or the client set enableDefaultIceServers. The bot starts when the WebRTC offer arrives.
--ice-servers names the STUN and TURN servers for both ends of the connection: the runner gathers candidates with them and returns them to the client as iceConfig. They take precedence over enableDefaultIceServers, which adds Google’s public STUN server (stun:stun.l.google.com:19302) and nothing else. See Using ICE servers with the development runner.
Request Format ("transport": "daily"):
createDailyRoom: true (or a configured DAILY_ROOM_URL) makes the runner create a room and token using your DAILY_API_KEY. Without either, the bot receives a base RunnerArguments with no room, and the response is null. dailyRoomProperties and dailyMeetingTokenProperties are applied when provided. Response:
Request Format (telephony or plain WebSocket): For "transport": "twilio" | "telnyx" | "plivo" | "exotel" or "transport": "websocket", /start returns the WebSocket URL the client should connect to:
Telephony connections use /ws; plain WebSocket clients use /ws-client (and also receive a sessionId). The bot starts when the connection is established. When the runner uses --ws-auth token, the response also carries a one-time token the client must present when it connects. When file uploads are enabled, the /start response also includes fileUploadUrl, the route to POST uploads to, relative to the /start endpoint’s origin. It is the session-scoped /sessions/{session_id}/files route when the session is registered, or the flat /files route otherwise. Files uploaded through a session-scoped route are deleted when the session ends. The field is omitted when uploads are disabled. Request Format ("transport": "sip"):
The bot registers the account immediately and the response is {"sessionId": "..."}. body.sip_client is optional: without it the account comes from the environment, else a Daily SIP client is provisioned (see SIP). An unusable account returns HTTP 400.

The /status Endpoint

GET /status reports which transports the running instance accepts — all of them by default, or the single transport passed via -t. Transports whose routes are disabled in the environment (for example, because their dependencies aren’t installed) are left out, so the list matches what POST /start accepts and clients can build their transport options from it:

Accessing Request Data in Your Bot

The body field from the /start request is passed to your bot through DailyRunnerArguments.body:

RTVI Client Example

You can use RTVI client libraries to connect to your local development runner:
The /start endpoint serves every transport. The client SDK posts only requestData as the request body, so set "transport" there; without it the runner uses the -t transport, or "webrtc".

Daily Dial-In Webhook

The development runner handles Daily PSTN dial-in webhooks unless started with --no-dialin. This allows you to test phone call integrations locally before deploying to production.

Webhook Endpoint

How It Works

When a phone call dials into your Daily phone number:
  1. Daily sends a webhook to your configured endpoint with call details
  2. The runner creates a SIP-enabled room with appropriate configuration
  3. Your bot is spawned with dial-in context in runner_args.body
  4. The call is connected to the room where your bot is waiting

Webhook Payload

Daily sends the following data to the /daily-dialin-webhook endpoint:

Accessing Dial-In Data in Your Bot

The dial-in webhook data is passed to your bot through DailyRunnerArguments.body. You need to parse it and configure the Daily transport with dial-in settings:

Configuring Daily Phone Numbers

To test dial-in locally, you need to:
  1. Configure a Daily phone number in your Daily dashboard
  2. Set the webhook URL to your public endpoint (e.g., via ngrok)
  3. Ensure DAILY_API_KEY is set in your environment
Dial-in is a Daily feature and requires a valid DAILY_API_KEY environment variable.

Error Handling and Debugging

The development runner includes built-in error handling to help debug issues with incoming requests and webhook payloads.

422 Validation Error Logging

When FastAPI receives a malformed request that fails Pydantic validation (HTTP 422 Unprocessable Entity), the runner automatically logs both the validation errors and the raw request body. This makes it much easier to debug malformed payloads from any transport — WhatsApp webhooks, WebRTC signaling, telephony providers, or RTVI clients. The runner logs:
  • The request URL path where the error occurred
  • Detailed validation error messages from Pydantic
  • The raw request body (up to 5000 characters)
This automatic logging applies to all runner endpoints and helps identify issues with webhook configurations, client implementations, or API changes without requiring manual debugging code.

Quick Reference

All transports are available from python bot.py; the -t form below restricts the server to one. Access columns assume the default localhost:7860.

Examples

For practical examples of using the development runner with different transports, check out the following:

Runner Examples

Explore the examples for different ways to use the development runner with various transports.