Skip to content

Add LiveKit Agents + Eleven Realtime example (Python) - #263

Draft
kraenhansen wants to merge 2 commits into
mainfrom
kh/livekit-eleven-realtime-example
Draft

kraenhansen wants to merge 2 commits into
mainfrom
kh/livekit-eleven-realtime-example

Conversation

@kraenhansen

Copy link
Copy Markdown
Member

Developers building on LiveKit Agents need a runnable example of using ElevenLabs Realtime as the speech-to-speech model. Blocked on livekit/agents#8075 being released: until then requirements.txt installs livekit-plugins-elevenlabs from that PR's branch.

Merging this PR will:

  • Add agents/python/livekit (PROMPT.md, setup.sh, README.md, generated example/): a LiveKit AgentServer console agent using elevenlabs.realtime.RealtimeModel with an on_enter greeting and a lookup_weather function tool.
  • List the example in the root README.md.

Additional context intended for coding agents and bots

Layout and conventions

  • Follows <product>/<runtime>/<slug> from .cursor/skills/scaffold-elevenlabs-example, seeded from templates/python like the other Python quickstarts (main.py, requirements.txt, .env loaded with load_dotenv(), .venv/bin/python main.py ...).
  • setup.sh overwrites the template's requirements.txt (no ElevenLabs SDK; livekit-agents plus the plugin) and .env.example, analogous to how the Next.js setup.sh scripts patch package.json.
  • The env var is ELEVEN_API_KEY rather than the repo's usual ELEVENLABS_API_KEY, because that is what livekit-plugins-elevenlabs reads by default.

Unblocking

Once livekit/agents#8075 ships, replace the git requirement in setup.sh and example/requirements.txt with a released livekit-plugins-elevenlabs>=<version>, drop the TODO in setup.sh, and remove the dependency note from both README.md copies.

Test plan and verification

  • bash agents/python/livekit/setup.sh (Python 3.14): resolves and installs livekit-agents 1.8.10 from PyPI and livekit-plugins-elevenlabs from the PR branch
  • Loaded main.py with a dummy ELEVEN_API_KEY: AgentServer and RealtimeModel construct, Assistant exposes the lookup_weather tool
  • .venv/bin/python main.py --help lists the console command
  • ruff check . (clean, matches CI)
  • npx prettier . --check (clean, matches CI)
  • Live console session against ElevenLabs Realtime (not run)

🤖 Generated with Claude Code

kraenhansen and others added 2 commits October 29, 2026 08:50
Installs livekit-plugins-elevenlabs from the livekit/agents#8075 branch until its realtime module is released.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
livekit-plugins-elevenlabs reads ELEVEN_API_KEY, unlike the ELEVENLABS_API_KEY used across this repo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kraenhansen kraenhansen self-assigned this Oct 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant