types
Runner session argument types for the development runner.
These types are used by the development runner to pass transport-specific information to bot functions.
- class pipecat.runner.types.DialinSettings(*, call_id: str, call_domain: str, To: str | None = None, From: str | None = None, sip_headers: dict[str, str] | None = None)[source]
Bases:
BaseModelDial-in settings from the Daily webhook.
This model matches the structure sent by Pipecat Cloud and Daily.co webhooks for incoming PSTN/SIP calls.
- Parameters:
call_id – Unique identifier for the call (UUID representing sessionId in SIP Network)
call_domain – Daily domain for the call (UUID representing Daily Domain on SIP Network)
To – The dialed phone number (optional)
From – The caller’s phone number (optional)
sip_headers – Optional SIP headers from the call
- class pipecat.runner.types.DailyDialinRequest(*, dialin_settings: DialinSettings, daily_api_key: str, daily_api_url: str)[source]
Bases:
BaseModelRequest data for Daily PSTN dial-in requests.
This is the structure passed in runner_args.body for dial-in calls. It matches the payload structure from Pipecat Cloud’s dial-in webhook handler.
- Parameters:
dialin_settings – Dial-in configuration including call_id, call_domain, To, From
daily_api_key – Daily API key for pinlessCallUpdate (required for dial-in)
daily_api_url – Daily API URL (staging or production)
- class pipecat.runner.types.CallData(*, stream_id: str | None = None, call_id: str | None = None, from_number: str | None = None, to: str | None = None, body: dict = <factory>, **extra_data: Any)[source]
Bases:
BaseModelParsed telephony handshake data from the provider’s first WebSocket messages.
Populated by
pipecat.runner.utils.parse_telephony_websocket()and exposed onWebSocketRunnerArguments.call_databycreate_transport. Gives typed attribute access —call_data.to_number,call_data.call_id— while staying dict-compatible (call_data["call_id"],call_data.get("body", {})) so bots written against the old dict keep working.Fields are populated per provider; absent ones stay
None. Provider-specific keys not modeled here remain accessible (extra="allow").This base holds the fields common to all providers. Provider-specific fields live on subclasses (
TelnyxCallData,ExotelCallData), whichparse_telephony_websocket/create_transportconstruct per provider.- Parameters:
stream_id – Provider media-stream identifier.
call_id – Provider call identifier, normalized across providers (Twilio
callSid, PlivocallId, Exotelcall_sid, Telnyxcall_control_id).from_number – Caller’s number. Wire key
from.to_number – Dialed number. Wire key
to.body – Custom parameters sent by the provider (e.g. Twilio TwiML stream parameters).
- class pipecat.runner.types.TelnyxCallData(*, stream_id: str | None = None, call_id: str | None = None, from_number: str | None = None, to: str | None = None, body: dict = <factory>, outbound_encoding: str | None = None, **extra_data: Any)[source]
Bases:
CallDataTelnyx-specific parsed telephony handshake data.
- Parameters:
outbound_encoding – Telnyx outbound media encoding.
- class pipecat.runner.types.ExotelCallData(*, stream_id: str | None = None, call_id: str | None = None, from_number: str | None = None, to: str | None = None, body: dict = <factory>, account_sid: str | None = None, custom_parameters: str | dict | None = None, **extra_data: Any)[source]
Bases:
CallDataExotel-specific parsed telephony handshake data.
- Parameters:
account_sid – Exotel account sid.
custom_parameters – Exotel custom parameters.
- class pipecat.runner.types.RunnerArguments(*, body: Any | None = <factory>, call_data: CallData | None = None, session_id: str | None = None, file_storage: FileStorage | None = None)[source]
Bases:
objectBase class for runner session arguments.
- Parameters:
handle_sigint – Whether the bot should install a SIGINT handler.
handle_sigterm – Whether the bot should install a SIGTERM handler.
pipeline_idle_timeout_secs – Seconds the pipeline may stay idle before shutting down;
Nonedisables the idle timeout.body – Optional request body data passed from the runner entry point.
call_data – Parsed telephony handshake as a
CallDatamodel — typed attribute access (call_data.to_number) that’s also dict-compatible (call_data["call_id"]). Populated bycreate_transport(or a directparse_telephony_websocketcall) for telephony connections;Noneotherwise. Lives on the base so any bot can readrunner_args.call_datauniformly, mirroringbody.session_id – Identifier for this bot session.
cli_args – Parsed CLI arguments from the runner, when launched via the development runner.
file_storage – The storage backend serving the host’s upload endpoints, injected by whichever host runs the bot — the one returned by the bot module’s
create_file_storage()if it defines one, otherwise the host’s default (the development runner’s-u/--uploads-folderlocal storage). Hand it to the LLM service’sFileResolver(file_resolver=FileResolver(file_storage=runner_args.file_storage)) so send-file messages can resolve the URLs it mints.Nonewhen uploads are disabled.
- file_storage: FileStorage | None = None
- class pipecat.runner.types.DailyRunnerArguments(room_url: str, token: str | None = None, *, body: Any | None = <factory>, call_data: CallData | None = None, session_id: str | None = None, file_storage: FileStorage | None = None)[source]
Bases:
RunnerArgumentsDaily transport session arguments for the runner.
- Parameters:
room_url – Daily room URL to join
token – Authentication token for the room
body – Additional request data
- class pipecat.runner.types.VonageRunnerArguments(application_id: str, vonage_session_id: str, token: str, *, body: Any | None = <factory>, call_data: CallData | None = None, session_id: str | None = None, file_storage: FileStorage | None = None)[source]
Bases:
RunnerArgumentsVonage transport session arguments for the runner.
- Parameters:
application_id – Vonage application ID
vonage_session_id – Vonage session ID
token – Vonage Session Token
- class pipecat.runner.types.WebSocketRunnerArguments(websocket: WebSocket, transport_type: str | None = None, *, body: Any | None = <factory>, call_data: CallData | None = None, session_id: str | None = None, file_storage: FileStorage | None = None)[source]
Bases:
RunnerArgumentsWebSocket transport session arguments for the runner.
The parsed telephony handshake is available on the inherited
call_datafield (aCallDatamodel), populated bycreate_transport.- Parameters:
websocket – WebSocket connection for audio streaming
transport_type – Transport type identifier. Set to
"websocket"for plain WebSocket connections;Nonetriggers auto-detection from the first telephony provider message. After auto-detection,create_transportoverwrites this in place with the detected provider (e.g."twilio").body – Additional request data
- class pipecat.runner.types.SmallWebRTCRunnerArguments(webrtc_connection: Any, *, body: Any | None = <factory>, call_data: CallData | None = None, session_id: str | None = None, file_storage: FileStorage | None = None)[source]
Bases:
RunnerArgumentsSmall WebRTC transport session arguments for the runner.
- Parameters:
webrtc_connection – Pre-configured WebRTC peer connection
- class pipecat.runner.types.LiveKitRunnerArguments(room_name: str, url: str, token: str, *, body: Any | None = <factory>, call_data: CallData | None = None, session_id: str | None = None, file_storage: FileStorage | None = None)[source]
Bases:
RunnerArgumentsLiveKit transport session arguments for the runner.
- Parameters:
room_name – LiveKit room name to join
url – LiveKit server URL to connect to
token – Authentication token for the room
body – Additional request data
- class pipecat.runner.types.EvalRunnerArguments(**kwargs)[source]
Bases:
RunnerArgumentsEval transport session arguments for the runner.
Used to launch a bot with a local
SingleClientWebsocketServerTransportspeaking RTVI (viaEvalSerializer). The eval harness connects as an RTVI client, sends scripted user input, and asserts on the RTVI events the bot emits. Intended for fast pipeline behavioral evaluations.Deprecated since version 1.13.0: Use
WebSocketRunnerArgumentsinstead: the dev runner hands an eval harness’s connection to the bot like any WebSocket session. Will be removed in 2.0.0.- Parameters:
host – Host address to bind the eval transport’s WebSocket server to.
port – Port number to bind the eval transport’s WebSocket server to.
- class pipecat.runner.types.SIPRunnerArguments(user: str, domain: str, password: str = '', transport: str = 'udp', audio_codecs: tuple | None = None, auth_user: str | None = None, extra_params: tuple | None = None, reg_interval: int = 240, rtp_timeout: int = 0, instance_id: str | None = None, native_log_level: str = 'warning', sip_trace: bool = False, net_interface: str | None = None, jitter_buffer_mode: str | None = None, jitter_buffer_ms: tuple | None = None, *, body: Any | None = <factory>, call_data: CallData | None = None, session_id: str | None = None, file_storage: FileStorage | None = None)[source]
Bases:
RunnerArgumentsSIP transport session arguments for the runner.
Used to launch a bot on a
SIPTransport. baresip registers with the SIP server itself, so there is no HTTP signaling route; the development runner reads the account from theSIP_USER,SIP_PASS,SIP_DOMAIN,SIP_TRANSPORT,SIP_AUDIO_CODECS,SIP_AUTH_USER,SIP_REG_INTERVAL,SIP_RTP_TIMEOUT,SIP_INSTANCE_ID,SIP_NET_INTERFACE, andSIP_JITTER_BUFFERenvironment variables. WithoutSIP_USERandSIP_DOMAIN, the runner provisions a temporary SIP client on the Daily domain instead (DAILY_API_KEY) and deletes it when the bot exits. For debugging,SIP_NATIVE_LOG_LEVELandSIP_TRACEcontrol the native stack’s logging. The account may also arrive in the request body asbody["sip_client"](a Daily SIP-trunk notification), whichpipecat.runner.sip.configure()reads first. Building this type by hand is the advanced layer:pipecat.runner.sip.sip_runner_arguments()builds it from an account and the environment, andpipecat.runner.utils.create_transport()does so itself for plainRunnerArgumentswhose body or environment holds the account.- Parameters:
user – The user part of
sip:user@domain.domain – Registration domain; may carry a port.
password – Authentication password; may be empty.
transport – SIP transport: “udp”, “tcp”, or “tls”.
audio_codecs – Codec preference order by stack name (e.g.
("opus/48000/2", "PCMU/8000/1")); None uses the stack default.auth_user – Digest username when the credential store keys it differently from
user(credential-list trunks).extra_params – Extra baresip account parameters, each a
"key=value"string, appended verbatim to the SIP address-of-record — e.g.("medianat=stun", "stunserver=stun:HOST:PORT")for media-NAT traversal behind an endpoint-independent NAT,medianat=turnbehind a symmetric one, andmedianat=iceonly when the peer also speaks ICE; see the NAT notes onSIPConnection. None adds nothing.reg_interval – Seconds between registration refreshes; 0 disables registration entirely (trunk mode).
rtp_timeout – Seconds without received RTP after which a call is declared dead and closed; 0 disables detection.
instance_id – A canonical lowercase UUID identifying this endpoint across restarts (RFC 5626
+sip.instance); None sends no instance parameter.native_log_level – Lowest severity captured from the native SIP stack’s own logging (“debug”, “info”, “warning”, or “error”).
sip_trace – Log every SIP message sent and received, verbatim. Contains authentication material — keep it off in production.
net_interface – Restrict the stack to one local interface, by name or address; None (the default) lets the OS pick the source address per destination. Set it for a registrar on loopback (“127.0.0.1”) or one address of a multi-homed host. See
SIPConnection.jitter_buffer_mode – The receive jitter buffer: “off”, “fixed”, or “adaptive”; None selects the transport’s default, a fixed 40–60 ms buffer. See
SIPConnectionfor what each mode costs.jitter_buffer_ms –
(min, max)in milliseconds for a fixed or adaptive buffer; None with no mode selects the default.
- class pipecat.runner.types.MOQRunnerArguments(host: str | None = None, port: int | None = None, path: str = '/moq', namespace: str = 'pipecat', participant_id: str = 'response', peer_id: str = 'request', verify_ssl: bool = True, serve: bool = False, bind: str | None = None, serve_tls_host: str = 'localhost', serve_tls_cert: str | None = None, serve_tls_key: str | None = None, *, body: Any | None = <factory>, call_data: CallData | None = None, session_id: str | None = None, file_storage: FileStorage | None = None, relay_url: str | None = None, serve_bind: str | None = None, ready_event: Event | None = None, cert_fingerprints: list[str] = <factory>)[source]
Bases:
RunnerArgumentsMOQ (Media over QUIC) transport session arguments for the runner.
The
ready_eventandcert_fingerprintsfields are populated automatically bypipecat.runner.utils.create_transport(); bots don’t need to thread them by hand.- Parameters:
host – MOQ relay/server hostname. Composes the relay URL with
portandpathwhenrelay_urlis unset; in serve mode it is the name the browser dials.port – MOQ relay/server port; see
host.path – MOQ endpoint path on the relay when the URL is composed from
hostandport(client mode).relay_url – Full relay URL to dial in client mode, query string included (e.g.
https://relay.example.com/?jwt=…). Takes precedence overhost/port/path, with a warning whenhostorportis given as well. Client mode needs either this orhostandport.namespace – MOQ namespace (like a room identifier).
participant_id – This bot’s participant id; it broadcasts under
<namespace>/<participant_id>.peer_id – The peer’s participant id; the bot subscribes to
<namespace>/<peer_id>.verify_ssl – Whether to verify SSL certificates (client mode).
serve – When True, the bot binds its own MOQ server instead of dialing a relay — useful for local dev with no separate
moq-relayprocess.bind – Local UDP bind address — the listen address in serve mode (e.g.
"[::]:4080"), the dial source address in client mode (ephemeral if unset).serve_bind –
Serve-mode listen address.
Deprecated since version 1.8.0: Use
bindinstead, which also covers client mode. Will be removed in 2.0.0.serve_tls_host – Hostname used for the generated self-signed cert when no on-disk cert/key is provided.
serve_tls_cert – Path to a PEM-encoded TLS cert chain.
serve_tls_key – Path to the matching PEM-encoded private key.
ready_event – Event the bot fires once it has finished MOQ bring-up. The HTTP
/startendpoint waits on this before telling the browser to open its WebTransport.cert_fingerprints – SHA-256 fingerprints (hex) of the bot’s TLS cert chain — populated by the transport in serve mode so
/api/configcan hand them to the browser for pinning.