feat: add Google ADK integration plugin (#5107)#5110
Open
Harshil7875 wants to merge 3 commits intolivekit:mainfrom
Open
feat: add Google ADK integration plugin (#5107)#5110Harshil7875 wants to merge 3 commits intolivekit:mainfrom
Harshil7875 wants to merge 3 commits intolivekit:mainfrom
Conversation
Add livekit-plugins-google-adk, a new plugin that adapts Google's Agent Development Kit (ADK) Runner into the LiveKit llm.LLM interface. This follows the same framework-level integration pattern as the existing LangChain plugin, letting users combine ADK agent orchestration with LiveKit's realtime voice transport.
…current _run calls.
… instructions when no user message is present.
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.
PR: Add
livekit-plugins-google-adk— initial Google ADK adapter (closes #5107)Summary
This PR introduces a new plugin package,
livekit-plugins-google-adk, which provides a first-class adapter between LiveKit Agents and Google’s Agent Development Kit (ADK). It implements a text-only MVP that mirrors the existinglivekit-plugins-langchainpattern so ADK-based agents and runners can be used directly asllm.LLMimplementations insideAgent/AgentSession.Closes: #5107
What I added
New package:
livekit-plugins-google-adkFiles created
pyproject.toml— package configuration; adds dependency pins:google-adk>=1.0.0,livekit-agents>=1.4.5.__init__.py— plugin registration and public exports (LLMAdapter,ADKStream).adk.py— core adapter implementation:LLMAdapterandADKStream.google_adk_agent.py— example voice agent demonstrating usage and tool delegation to ADK.version.py— package version0.1.0.py.typed— PEP 561 type marker.Design & implementation details
This package intentionally follows the LangChain adapter pattern to keep behavior consistent with existing non-provider framework integrations.
Key points:
LLMAdapterimplementslivekit.agents.llm.LLMand wraps a Google ADKRunner(or can accept an ADKAgent/factory).ADKStreamimplementslivekit.agents.llm.LLMStream. It executes the ADK runner asynchronously and converts ADK events intoChatChunk/ token text pushes on the LiveKit stream.chat()/stream()call. ADK is allowed to manage its own conversation history (consistent with the LangChain approach).ChatContextand forwards text torunner.run_async()(or ADK equivalent). For the MVP only final response events are emitted back to LiveKit (text-only), to keep semantics simple and predictable.Behavioral choices & rationale
LLMStream.push_text()andLLMStream.end(); onlyis_final_response()events are emitted to LiveKit in the MVP to avoid partial/incomplete UI behavior that might be surprising for users.LLMAdapter(runner=my_adk_runner)matches the suggested UX in the issue and mirrors the LangChain plugin’s ergonomics.Usage example
See
google_adk_agent.pyin the package for a runnable voice-agent example that demonstrates streaming and tool usage delegated to ADK.Dependencies & compatibility
Declared in
pyproject.toml:google-adk>=1.0.0livekit-agents>=1.4.5Package version:
0.1.0(fileversion.py).Type hints included (
py.typed) to facilitate consumption in type-checked projects.How to test locally
Install the package in editable mode:
pip install -e .[dev] # from the package directory, if you want dev depsRun the example:
python google_adk_agent.py— the example demonstrates initialization, a single conversation exchange, and streaming behavior.Unit tests (suggested):
ADKStreamforwards tokens andend()properly.LLMAdapterto confirmChatContext→ ADKContentconversion and that only final responses are emitted back.Documentation & example
google_adk_agent.pyfunctions as an example and minimal usage guide.Follow-ups / roadmap
After merging this MVP, suggested follow-ups:
Checklist
LLMAdapterthat satisfieslivekit.agents.llm.LLM.ADKStreamthat satisfieslivekit.agents.llm.LLMStream.google_adk_agent.pyincluded.0.1.0andpy.typedadded.Suggested commit / PR title
feat(plugins): add livekit-plugins-google-adk (initial ADK adapter)Reviewers / reviewers’ notes
Suggested reviewers: maintainers who reviewed or authored
livekit-plugins-langchainor other plugin adapters, since this mirrors that architecture.Notes for reviewers:
LLM/LLMStreamsurface conformance and event-to-stream translation.