Skip to main content

pipecat-thunderphone

Run a ThunderPhone voice agent inside a Pipecat pipeline.

ThunderPhone is a speech-to-speech service in Pipecat terms: audio in, audio out, with speech recognition, the language model, the voice, turn-taking, 62 languages and function calling handled on ThunderPhone's side. You bring the transport (Daily, LiveKit, Twilio, a WebRTC page, a phone line) and Pipecat does the plumbing.

Pricing is cost-plus and pay as you go: each call costs what its parts cost at the providers' list prices, plus hosting and a published margin, from about 2¢ a minute. There is no subscription, and new accounts get $10 of free credit. See pricing.

pip install pipecat-thunderphone

Use a saved agent

The agent's prompt, voice, engine, languages, tools, greeting and silence handling all come from ThunderPhone. The pipeline only moves audio. Build the agent in the dashboard, or have Zeus (the AI agent that builds, tests and tunes ThunderPhone agents) set it up, then pass its ID here. Changes you deploy on ThunderPhone apply to the next call without touching your pipeline.

from pipecat_thunderphone import ThunderPhoneRealtimeLLMService

llm = ThunderPhoneRealtimeLLMService(agent_id=12)  # reads THUNDERPHONE_API_KEY

context = LLMContext()
aggregators = LLMContextAggregatorPair(context)
pipeline = Pipeline([
    transport.input(),
    aggregators.user(),
    llm,
    aggregators.assistant(),
    transport.output(),
])

The saved agent opens the call itself, so the service skips the first response.create Pipecat would normally send. Pass greet_on_connect=True to request an opening response anyway.

Inline configuration

Instructions and tools come from the Pipecat context, exactly as with the OpenAI Realtime service. product picks the engine and voice the voice.

llm = ThunderPhoneRealtimeLLMService(
    api_key="sk_live_...",
    product="bolt",          # the older "spark" and "storm" are still accepted
    voice="olivia",
    language="es",
)

async def get_weather(params: FunctionCallParams):
    await params.result_callback({"conditions": "sunny"})

llm.register_function("get_weather", get_weather)

context = LLMContext(
    messages=[{"role": "system", "content": "You are Acme Dental's receptionist."}],
    tools=ToolsSchema(standard_tools=[weather_schema]),
)

Inline sessions are client-steered: the agent speaks first because Pipecat requests a response when the context arrives, and it stays quiet during silence unless you append a message or request another response.

What the service handles for you

  • The ThunderPhone URL and query (agent_id, product, language, from_number, to_number) and 24 kHz PCM in both directions.
  • Secret-key auth (sk_live_...); the constructor rejects anything else early.
  • Saved-agent sessions: pipeline instructions, tools and voice are dropped from session.update so they cannot collide with the agent's own configuration (the server would reject them).
  • ThunderPhone's call.* platform events, which Pipecat's parser does not know. call.ended pushes an EndWorkerFrame upstream so the pipeline finishes; set end_task_on_call_ended=False to handle it yourself. Every such event is also delivered to the on_call_event handler, and call.ended to on_call_ended.
  • Non-fatal error events for rejected session fields are logged as warnings rather than ending the session.
  • service.call_id holds the ThunderPhone call id once the session is live, for fetching the recording, transcript and grade afterwards via GET /v1/calls/{call_id}.

Limits

  • Turn detection is server-side and always on. turn_detection=False (Pipecat-driven turns) is not supported.
  • Tools registered on the service run only for inline sessions. A saved agent executes its own tools on ThunderPhone.
  • live_transcripts=True streams caller transcript fragments while the caller speaks; it is billed extra per ThunderPhone pricing.
  • Video frames are ignored.

Compatibility

Tested with Pipecat v1.8.1 through v1.13.0 (requires pipecat-ai>=1.8). Python 3.11+.

About

Built and maintained by ThunderPhone (Autophonix, Inc.), the company behind the service. Issues and pull requests are welcome in this repository; ThunderPhone platform questions go to support@thunderphone.com.

Source

https://github.com/autophonix/pipecat-thunderphone — issues and pull requests welcome.

Development

pip install -e ".[dev]"
pytest

The tests run against a scripted stand-in for the ThunderPhone realtime server; inside the ThunderPhone monorepo they also check that every event the real server emits parses in Pipecat.

Metadata

Release files for pipecat-thunderphone 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pipecat-thunderphone 0.1.2
File Size Uploaded Provenance Actions
pipecat_thunderphone-0.1.2.tar.gz 16.9 kB With provenance Details for pipecat_thunderphone-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pipecat-thunderphone 0.1.2
File Interpreter ABI Platform Actions
pipecat_thunderphone-0.1.2-py3-none-any.whl Python 3 none any Details for pipecat_thunderphone-0.1.2-py3-none-any.whl

Total release size: 29.1 kB

Release files / pipecat_thunderphone-0.1.2.tar.gz

Download URL pipecat_thunderphone-0.1.2.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
61a15bea42a07621559e24f82684fa6a9ca0adb4a9141379f850d096b6a20a07
BLAKE2b-256 checksum
How to use checksums
790ee88e3929aff7958912b498a3c5e664292c4d2c681948b8d9dbd900bfff1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / pipecat_thunderphone-0.1.2-py3-none-any.whl

Download URL pipecat_thunderphone-0.1.2-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d35d7a3b62f45cd6158b2936bb4637a1893fda8b45b97a2393046e2d2a00ca4a
BLAKE2b-256 checksum
How to use checksums
76e739c22f1bcb26bb59310baaf89bb7ad17586ffcbc53a6051626ab151aa58a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for pipecat-thunderphone 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pipecat_thunderphone-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page