Metadata-Version: 2.5
Name: livekit-plugins-callyourai
Version: 0.2.0
Summary: callyour.ai avatars for LiveKit Agents: give your voice agent a face
Project-URL: Homepage, https://callyour.ai
Project-URL: Documentation, https://api.callyour.ai/llms.txt
Project-URL: Source, https://github.com/JonasDaWi/livekit-plugins-callyourai
Project-URL: Issues, https://github.com/JonasDaWi/livekit-plugins-callyourai/issues
Author-email: "callyour.ai" <support@callyour.ai>
License-Expression: MIT
License-File: LICENSE
Keywords: agents,avatar,lip-sync,livekit,realtime,voice
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: livekit-agents>=1.2
Description-Content-Type: text/markdown

# livekit-plugins-callyourai

Give your LiveKit voice agent a face. The avatar joins the room as its own participant and speaks with the
agent's voice, lips in sync.

```bash
pip install livekit-plugins-callyourai
```

```python
from livekit.agents import AgentSession, room_io
from livekit.plugins import callyourai

async def entrypoint(ctx):
    await ctx.connect()
    session = AgentSession(stt=..., llm=..., tts=...)
    avatar = callyourai.AvatarSession(avatar_id="YOUR_AVATAR_ID")
    await avatar.start(session, room=ctx.room)
    await session.start(agent=MyAgent(), room=ctx.room,
                        room_options=room_io.RoomOptions(audio_output=False))
```

A complete agent is in `examples/agent.py`; `examples/talk_check.py` calls it without a browser and prints
what arrived and what was billed.

Environment: `CALLYOURAI_API_KEY`, plus the usual `LIVEKIT_URL`, `LIVEKIT_API_KEY`, `LIVEKIT_API_SECRET`.

No account yet? Three calls. The full guide for people and coding agents is at https://api.callyour.ai/llms.txt

```bash
API=https://api.callyour.ai
curl -X POST $API/v1/signup -d '{"email":"you@example.com"}' -H 'content-type: application/json'   # -> api_key
curl -X POST $API/v1/credits/checkout -H "authorization: Bearer $KEY" -H 'content-type: application/json' -d '{"amount":10}'   # euros
curl -X POST $API/v1/avatars -H "authorization: Bearer $KEY" -H 'content-type: application/json' \
     -d '{"name":"Me","image_url":"https://example.com/me.jpg"}'                                    # -> id
```

## When every avatar is busy

By default `start` raises `CallyouraiError` with code `no_capacity` when no avatar is free. Pass `wait_seconds`
(up to 120) to wait in the queue instead:

```python
avatar = callyourai.AvatarSession(avatar_id="YOUR_AVATAR_ID", wait_seconds=60)
await session.start(agent=MyAgent(), room=ctx.room)      # the agent speaks into the room itself
await avatar.start(session, room=ctx.room)                # returns at once if queued
```

Started after `session.start` like this, the agent talks voice-only while the avatar waits, and its speech moves
to the avatar as soon as the avatar is live. Started before `session.start` (with `audio_output=False`), `start`
waits for the avatar instead. Waiting is free; billing starts when the avatar's video is live. Events:
`avatar_queued`, `avatar_joined`, `avatar_unavailable`.

Sessions are billed per second from your prepaid euro credits while the avatar's video is live. `CallyouraiError.code`
tells you why a start was refused (`insufficient_credits`, `no_capacity`, ...).

Questions: support@callyour.ai · Terms and pricing: https://callyour.ai
