Metadata-Version: 2.5
Name: livekit-plugins-thunderphone
Version: 1.8.9
Summary: Agent Framework plugin for ThunderPhone voice agents (speech-to-speech realtime model)
Project-URL: Documentation, https://docs.livekit.io
Project-URL: Website, https://livekit.io/
Project-URL: Source, https://github.com/livekit/agents
Author-email: LiveKit <hello@livekit.io>
License-Expression: Apache-2.0
Keywords: ai,audio,livekit,phone,realtime,thunderphone,video,voice,webrtc
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Multimedia :: Sound/Audio
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10.0
Requires-Dist: livekit-agents[codecs]>=1.8.9
Requires-Dist: livekit-plugins-openai>=1.8.8
Description-Content-Type: text/markdown

# ThunderPhone plugin for LiveKit Agents

Run a [ThunderPhone](https://thunderphone.com) voice agent as the realtime
(speech-to-speech) model of a LiveKit Agents session. ThunderPhone handles
speech recognition, the language model, the voice, turn-taking, 47 languages
and tools; LiveKit handles the room, the transport and the telephony.

See the docs at https://docs.livekit.io/agents/models/realtime/thunderphone/ for
setup and examples.

## Installation

```bash
pip install livekit-plugins-thunderphone
```

## Pre-requisites

A ThunderPhone secret API key (`sk_live_...`), set as `THUNDERPHONE_API_KEY`.

## Usage

```python
from livekit.agents import Agent, AgentSession
from livekit.plugins import thunderphone

# a saved ThunderPhone agent: prompt, voice, engine, languages and tools live on ThunderPhone
session = AgentSession(llm=thunderphone.RealtimeModel(agent_id=12))

# ...or configure the session inline: instructions and tools come from the LiveKit Agent
session = AgentSession(llm=thunderphone.RealtimeModel(model="bolt", voice="olivia"))
await session.start(agent=Agent(instructions="You are Acme Dental's receptionist."), room=ctx.room)
```

An inline call fixes its instructions and tools when it starts. A handoff to an `Agent` with
different instructions or tools therefore ends that ThunderPhone call and starts a new one with
the new configuration. With a saved agent, handoffs keep the call.

Every reply uses the session's instructions and tools (the saved agent's, or the inline
`Agent`'s). ThunderPhone has no per-reply overrides, so `generate_reply(instructions=...)`
replies normally and the plugin logs a warning. Framework features that steer a single reply
with instructions, such as the beta workflows, do not steer it on ThunderPhone.
