Add livekit-plugins-google-adk for Google ADK integration#4872
Open
Add livekit-plugins-google-adk for Google ADK integration#4872
Conversation
Wraps Google Agent Development Kit (ADK) agents as LiveKit LLM plugins, enabling ADK-based agents to be used in LiveKit voice pipelines. ADK handles tool calling and multi-agent orchestration internally while LiveKit manages voice orchestration (turns, interruptions, STT/TTS). - LLMAdapter wraps any ADK BaseAgent/LlmAgent as a LiveKit llm.LLM - ADKStream implements LLMStream delegating to ADK Runner - Session caching across conversation turns - Fix: use ChatContext.items instead of non-existent .messages() method - 39 unit tests covering all edge cases and error paths - E2E test script for manual verification with real Gemini API - Example voice agent demonstrating the integration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fall back to developer/system message when no user message exists in chat context (fixes generate_reply(instructions=...) crash) - Use gemini-2.0-flash in example for broader API key compatibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add has_emitted_partials flag to skip emitting final response text when partial streaming events have already been sent, preventing duplicate output. Usage metadata is still emitted regardless. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Format tests/e2e_google_adk.py with ruff - Add py.typed marker for mypy package discovery - Add type: ignore for untyped InMemorySessionService call Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
davidzhao
reviewed
Feb 17, 2026
Member
davidzhao
left a comment
There was a problem hiding this comment.
some minor comments. I would just keep this as part of the Google plugin, rather than creating a new one for ADK.. it could just be:
livekit.plugins.google.adk.LLMAdapter
| return chunks | ||
|
|
||
|
|
||
| async def collect_text_chunks(stream) -> list[str]: |
Member
There was a problem hiding this comment.
could you add this to the list in makefile: make unit-tests?
| self, | ||
| agent: LlmAgent | BaseAgent, | ||
| *, | ||
| runner: Runner | None = None, |
Member
There was a problem hiding this comment.
nit: slight preference for NotGivenOr[Runner] = NOT_GIVEN as a pattern, to allow future use to distinguish between "not set" vs "do not use"
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.
Summary
livekit-plugins-google-adkplugin that wraps Google ADK agents as LiveKit LLM pluginsLLMAdapterwraps any ADKBaseAgent/LlmAgentso it can be used in LiveKit voice pipelines — ADK handles tool calling and multi-agent orchestration internally, LiveKit manages voice orchestration (turns, interruptions, STT/TTS)ChatContext.messages()(non-existent) — now correctly usesChatContext.itemswithChatMessagefilteringtests/e2e_google_adk.py) for manual verification against real Gemini APIexamples/voice_agents/google_adk_agent.py)Test plan
uv run pytest tests/test_google_adk.py -v)🤖 Generated with Claude Code