feat: integrate LiveKit for real-time voice agents#286
Open
pulinduvidmal wants to merge 11 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new LiveKit integration to let Agent Kernel agents participate in real-time voice sessions, along with documentation and an end-to-end demo project under examples/.
Changes:
- Added
AgentLiveKitRequestHandler+AgentKernelLLMbridge to run a LiveKit worker alongside the FastAPI REST server and expose/livekit/token. - Extended core configuration with a new
livekitsection and added a newlivekitoptional extra inak-py/pyproject.toml. - Added docs + a runnable
examples/api/livekitdemo, and wired the new docs page into the Docusaurus sidebar.
Reviewed changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/api/livekit/server.py | Demo REST API entrypoint for LiveKit voice handler |
| examples/api/livekit/README.md | Demo instructions for token endpoint + LiveKit workflow |
| examples/api/livekit/pyproject.toml | Demo project dependencies (agentkernel extras) |
| examples/api/livekit/build.sh | Demo environment/bootstrap script |
| examples/api/livekit/.env.example | Demo environment variable template |
| docs/sidebars.js | Adds LiveKit integration doc page to sidebar |
| docs/docs/intro.md | Updates intro diagrams/lists to reflect LiveKit support |
| docs/docs/integrations/overview.md | Adds LiveKit under integrations overview + diagrams |
| docs/docs/integrations/livekit.md | New LiveKit integration documentation page |
| ak-py/src/agentkernel/livekit.py | Public module export for the LiveKit integration |
| ak-py/src/agentkernel/integration/livekit/README.md | Integration README (library-internal) |
| ak-py/src/agentkernel/integration/livekit/livekit_handler.py | Core LiveKit handler + AgentKernel LLM bridge implementation |
| ak-py/src/agentkernel/integration/livekit/init.py | Exposes LiveKit handler/LLM symbols |
| ak-py/src/agentkernel/core/config.py | Adds livekit config model to AKConfig |
| ak-py/pyproject.toml | Adds livekit optional extra dependencies |
| ak-py/uv.lock | Locks new dependency set for LiveKit integration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 19 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (2)
examples/api/livekit/server_test.py:42
- The fixture uses a fixed
await asyncio.sleep(5)to wait for the server to start, which is flaky across machines and can cause intermittent failures or unnecessary delays. Prefer polling the/healthendpoint (with a timeout/backoff) until it responds before yielding the client.
proc = subprocess.Popen(
[sys.executable, "server.py"],
stdout=sys.stdout,
stderr=sys.stderr,
env=my_env,
)
await asyncio.sleep(5)
try:
yield APITestClient(f"http://localhost:8000")
examples/api/livekit/server_test.py:45
proc.wait()in thefinallyblock has no timeout. If the server doesn’t terminate cleanly, the test session can hang. Considerwait(timeout=...)and falling back toproc.kill()if needed.
proc.terminate()
proc.wait()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
add livekit integration
Type of Change
Related Issues
Fixes #
Relates to #
Changes Made
Testing
Checklist
Screenshots (if applicable)
Additional Notes