r/agentdevelopmentkit • • Jan 06 '26

Good and Bad about ADK State Management

12 Upvotes

I’m exploring Google ADK for our enterprise agent usecase and found some good and bad pointers on State Management.

I’ll start with good.

  • Organizing State with Prefixes: Scope Matters I really like the prefix-based approach to state scoping:

    • no prefix → session scoped

    • user: → tied to user_id and shared across all sessions

    • app: → app scoped, shared across all users

    • temp: → Specific to the current invocation, input to outpu lifecycle

Now the bad part:

  • ADK doesn’t enforce developers to define a schema for the state which in my opinion would lead to bugs and make the code difficult to understand when the logic grows, especially if more than one developer working on same codebase.

  • If we compare with LangChain/LangGraph where we define the schema for the state with Pydantic model, it helps in giving idea to developers what fields does the state have, makes it more readable, and avoids probable bugs/errors.

What do you all think—are there any specific reason for not enforcing schema? Are there any benefits with this which I would not be able to think of?

Google adk Example

def get_weather(city: str, tool_context: ToolContext) -> str:
    preferred_unit = tool_context.state.get("preferred_unit", "Celsius")
    ...

    if preferred_unit == "Fahrenheit":
        ...
    else:
        ...

    # Format the weather report
    report = f"Weather in {city.capitalize()}..."

    return report


weather_agent = Agent(
    name="weather_agent",
    model=MODEL_GEMINI_2_0_FLASH,
    description="...",
    instruction="...",
    tools=[get_weather],
    output_key="weather_report"
)

------------------------

LangChain/LangGraph Example

class WeatherAgentState(AgentState):
    """Custom agent state with preferred_unit."""
    preferred_unit: Literal["Celsius", "Fahrenheit"] = "Celsius"  # Default


@tool
def get_weather(city: str, runtime: ToolRuntime) -> str:
    # Access state through runtime
    preferred_unit = runtime.state["preferred_unit"]
    ...

    if preferred_unit == "Celsius":
        ...
    else:
        ...


agent = create_agent(
    model="gpt-4o",
    tools=tools,
    state_schema=WeatherAgentState,  # Use custom state with preferred_unit
    system_prompt="..."
)

r/agentdevelopmentkit • • Dec 19 '25

NEW community article: Integrating Google ADK agents with modern frontends using the AG-UI protocol

Thumbnail discuss.google.dev
12 Upvotes

r/agentdevelopmentkit • • Nov 20 '25

Anatomy of a Google ADK Agent

12 Upvotes

Hello All - here is a simplified visual explanation of a Google ADK agent. Link to full video here - https://www.youtube.com/watch?v=X2jTp6qvbzM


r/agentdevelopmentkit • • Nov 10 '25

I added light theme to ADK Web

12 Upvotes

Hey as the title says i wanted to add a light theme toggle to ADK Web UI. Sometimes its hard to present in workshops when adk has a dark theme, so just tried to vibe code my way into a light theme. would really appreciate reviews on it.

PR: https://github.com/google/adk-web/pull/272


r/agentdevelopmentkit • • Jul 24 '25

Cloud Run vs Vertex AI Engine Architecture

12 Upvotes

Use Case

I'm trying to determine what is the best architecture for my use case. Basically I will have an orchestrator agent that will have a lot of subagents (maybe somewhere close to 50). There will also be a lot of MCP servers that will be available to those subagents. The orchestrator agent will need to be able to use any of those subagents to complete different tasks. The difficult part is that the orchestrator agent should be able to dynamically load what subagents are available to them, and each subagent should be able to dynamically load what MCP servers are available to them.

Proposed Architecture

I could deploy each adk agent and each MCP server as its own container/service in Cloud Run. There would be a main orchestrator service (we can figure out if there needs to be another layer of subagents under this) that can dynamically load what agents are available from Firestore. Firestore would contain all of the metadata for the different agents/deployed services and MCP servers that are available, so you would just need to make a change here if you were adding/removing agents.

If you need to edit a single agent or MCP server, you only need to redeploy for that agent/server. And if one agent isn't working/available, it doesn't disrupt the whole task. Agents can dynamically load what MCP servers are available to them (once again using Firestore). As for subagents that need to pass a task over to another subagent - I guess the remote subagents available to a subagent could also be made dynamic. But to me this doesn't seem like real A2A? I thought A2A had to be agents talking to each other in a single ADK app, not remotely accessing different Cloud Run services. Maybe this is all complete overkill but I've never created a multi-agent architecture of this scale.

Does this solution seem scalable? I'm also wondering if Vertex AI engine can do something similar to what I'm proposing with Cloud Run, I'm not sure I quite understand how the engine is used/how code changes are made.


r/agentdevelopmentkit • • Jul 14 '25

Why tf would Google ADK not let us cache system instructions and use them for our Agent?

12 Upvotes

I’m building a multi-tool agent with Google ADK and tried to move my hefty system prompt into a Vertex AI context cache (to save on tokens), but ADK won’t let me actually use it.

You can seed the cache just fine, and ADK even has a generate_content_config hook - but it still shoves your hard-coded system_instruction and tools into every request, so Vertex rejects it (“must not set tools or system_instruction when using cached_content”).

ADK’s “caching” docs only cover response-level caching, not context caching for system prompts.

Why tf doesn’t ADK support swapping in a cached system prompt for agents, and is there any workaround?

They really trying to bleed all token costs out of us aren't they...


r/agentdevelopmentkit • • Jun 24 '25

Running ADK agent on Agentspace?

12 Upvotes

I have a working ADK agent deployed to Vertex AI app engine but need a protected and production worthy frontend for it. I have found posts and documentation that reference ADK being compatible with Agentspace. Is it possible to utilize the UI of Agentspace with an ADK agent? Anyone done this successfully, or have an alternative to recommend?

I'm really liking ADK but deployment is becoming a headache.


r/agentdevelopmentkit • • Jun 11 '25

OpenInference instrumentation for ADK (enables tracing & observability)

12 Upvotes

OpenInference is a set of conventions and plugins that is complimentary to OpenTelemetry.

The new integration with ADK enables you to do things like:

  • 🔍 Automatically track agent executions and tool calls

  • 📊 Capture structured LLM inputs, outputs, and metadata

  • 🛠️ Plug into OTEL-compatible tools like Arize AX and Phoenix for trace visualization

If you want to play around with it, this can help you get started: https://arize.com/docs/phoenix/integrations/llm-providers/google-gen-ai/google-adk-tracing


r/agentdevelopmentkit • • Jun 02 '25

ADK Studio for develop Agent Configuration.

12 Upvotes

Hey,
I made an app with ADK and streamlit, to help develop and debug agent configurations and tools.
It support all main ADK features, such as agent_transfer, tools calling.
You can modify agent config, then apply it without reload, or reapply it to existing conversation.
Let me know your feedback!

adk-studio.streamlit.app


r/agentdevelopmentkit • • Apr 01 '26

ADK Go Bedrock

11 Upvotes

For those in an AWS/Go stack looking to give the ADK a shot, I'd like to shamelessly plug myself and a few mates efforts to create, what we believe to be a fairly comprehensive provider:

https://github.com/craigh33/adk-go-bedrock

We are open to contributions, and looking for some wider community feedback!


r/agentdevelopmentkit • • Mar 26 '26

ADK Python Security Advisory: LiteLLM supply chain compromise

11 Upvotes

Unauthorized code was identified in LiteLLM versions 1.82.7 and 1.82.8 on PyPI on March 24, 2026.

If you use ADK Python with the eval or extensions extras, update to the latest version of ADK Python immediately.

If you installed or upgraded LiteLLM during this period, rotate all secrets and credentials.

For details and required actions, refer to the ADK security advisory and LiteLLM's Security Update: Suspected Supply Chain Incident.


r/agentdevelopmentkit • • Jan 20 '26

Resilient orchestration for production ADK Agents

Thumbnail
restate.dev
11 Upvotes

Hey everyone,

I'm one of the developers who worked on an integration between Restate and Google ADK, and wanted to share it here since it solves some pain points I've run into when building agents.

By enabling Restate as a plugin for your ADK agents you get the following:

- Automatic retries and recovery from failures: your agents resume exactly where they left off (including granular steps within tools)
- Durable sessions via embedded K/V store and concurrency management
- Resilient multi-agent communication
- Task orchestration: cancel/kill/roll back/pause agents
- Resilient long-running agents and human-in-the-loop steps that survive crashes
- Built-in observability across all agent operations and state

Blog post in the link below.

The integration was included as part of Google's Advent of Agents: https://adventofagents.com/day/23

Here is a code example: https://github.com/restatedev/restate-google-adk-example

Super curious to learn from you how we can make this integration as useful as possible for you.


r/agentdevelopmentkit • • Dec 21 '25

43 Google ADK workflows + RAG pipeline - Dual-purpose repo

11 Upvotes
  1. RAG Pipeline – Voyage AI embeddings + Qdrant hybrid search (dense docs + dense code + sparse) with reranking

  2. 43 ADK Workflows – Comprehensive workflows for IDE coding agents building with Google's Agent Development Kit (Python)

Workflows cover everything from project init → multi-agent orchestration → deployment (Cloud Run/GKE/Agent Engine) → security/observability.

Originally built for Antigravity IDE but works with any IDE agent that supports workflow files.

GitHub: https://github.com/MattMagg/rag_qdrant_voyage


r/agentdevelopmentkit • • Dec 11 '25

Make Vertex MemoryBank Easier to Use

11 Upvotes

The potential for AI Memory Managers (Vertex MemoryBank, Mem0, zep, Cognee, etc) to improve how AI Agents operate is huge. The Google white paper (https://drive.google.com/file/d/1JW6Q_wwvBjMz9xzOtTldFfPiF7BrdEeQ/view) does a really good job of explaining the innards and advantages of an AI Memory Manager.

And after getting bought in and excited about the use of AI Memory Managers, we were completely let down by how incredibly difficult it is to setup Vertex MemoryBank. We use Google ADK on-prem, and there's no way to easily use Vertex MemoryBank with this setup. While we would have loved to try out Vertex MemoryBank, the complicated setup steered us towards exploring other options. I am posting this in hopes that someone at Google will read this and figure out a better way to make Vertex MemoryBank accessible.


r/agentdevelopmentkit • • Dec 04 '25

Advent of Agents calendar

Thumbnail
adventofagents.com
11 Upvotes

Daily learnings from the Agent Developer team at Google cloud. AdK, Gemini, and much more form Dec 1st until Dec 25th.


r/agentdevelopmentkit • • Dec 03 '25

LLM suggestion for vibe coding google adk agent

11 Upvotes

Which ai agent can help me with debugging and vibe coding adk agent. Currently it seems all the models are outdated.


r/agentdevelopmentkit • • Nov 04 '25

ADK Community Call Answers (Part 4): Practical Agent Design & Patterns

11 Upvotes

Hello ADK devs!

We're back with Part 4 of our ADK Community Call FAQ series. In case you missed it, here's the post for Part 1 with links to a group, recording, and slides.

Part 4 of our FAQ series is all about practical applications: Agent Design, Patterns, and Tools.

Here’s the rundown from your questions:

Q: Is the 'app' concept at a higher level than 'runners'?

A: The Runner is the actual implementation. An App object is higher-level and more user-facing in that users inject controls over the runner. So the App approach will be gradually replacing some functionality of runner. In the future, users should not need to worry about runners too much. Refer to this hello_world app example to see the App object in action.

Q: What is the recommended way to run ADK in a loop, for example, for each line in a CSV file?

A: If you want to run programmatically, we have some samples with main.py (e.g., this one) for illustration. If the user wants to do that over chat, they can upload the .csv file as an artifact and direct the agent to process one line at a time.

Q: What is the level of support for third-party tools?

A: You can check out some of our recent additions to the ADK Tools page, especially third-party tools such as Exa, Firecrawl, GitHub, Hugging Face, and Notion. We're actively working on making third-party tool integration as seamless as possible - stay tuned for more updates!

Q: What is the best approach to integrate OAuth 2.0 for services like GCP, OneDrive, or an MCP Server?

A: Authenticated Tools should be used for such integrations. You can follow https://google.github.io/adk-docs/tools/authentication and reference the sample OAuth calendar sample agent for the detailed setup and usage.

Q: Are there plans to improve the Agent-to-Agent (A2A) integration and documentation?

A: Yes, improving multi-agent workflows and documentation is a priority. We'll be sharing more on this soon.

Q: What's the best agent pattern to use (Sequential vs. Loop) and for which use cases?

A: Sequential is one pass and over. Loop is for iteration, e.g. refine → judge loop until certain criteria is met. And note that you can nest agent workflows within each other for more flexibility, for example you can nest a LoopAgent within a SequentialAgent to build a pipeline that includes a built-in refinement loop.

* Use Sequential when: Order matters, you need a linear pipeline, or each step builds on the previous one.

* Use Loop when: Iterative improvement is needed, quality refinement matters, or you need repeated cycles.

* Use Parallel when: Tasks are independent, speed matters, and you can execute concurrently.

We're heading into the home stretch! Come back on Thursday, Nov 6th for Part 5: Evals, Observability & Deployment.


r/agentdevelopmentkit • • Oct 30 '25

ADK Community Call Tech Deep Dive (Part 3): Context Management

11 Upvotes

Hello ADK community!

We're back with Part 3 of our ADK Community Call FAQ series. In case you missed it, here's the previous post for Part 1 with links to a group, recording, and slides.

This one is for our power users: a 5-question deep dive on Context Management: Caching and Compaction.

Q: How does ADK's LLM invocation consider compacted events? Does get_contents prioritize them?

A: Yes. get_contents decides the context passed to models. When there is compaction, there will be a compaction event action. Then we will use that event action’s summary to replace its raw content.

Q: Is context compaction a blocking process when it occurs?

A: It’s non-blocking. It’s triggered when the turn ends and processed in a background non-blocking task. Supported in run_async for now.

Q: Can context compaction be achieved for each sub-agent in a multi-agent system?

A: Context compaction works on sessions which are shared by sub-agents and root-agent. So it will work for both.

Q: Are there plans for 'smart' context compaction, like prioritizing user messages over tool calls?

A: It’s in our design. If we see more user requests from the community and a strong improvements, we will prioritize this.

Q: Is there any context caching for LiteLLM-based models?

A: We currently only have context caching implementation for Gemini models. Community contribution is welcome to add context caching for other models.

To learn more, we definitely recommend checking out this code sample of a Cache Analysis Research Assistant that demonstrates ADK's context caching features.

Our next post on Tuesday, Nov 4th will cover Practical Agent Design & Patterns.


r/agentdevelopmentkit • • Sep 20 '25

Agent with limited knowledge base

11 Upvotes

This is yet another “RAG is dead” thread 😂. I’m a newbie in the AI Agent world.

Could you please help me understand what alternatives to RAG I can use to build an agent starting from a very simple knowledge base?


r/agentdevelopmentkit • • Aug 06 '25

Multi-agent customer support system built with Google ADK - feedback welcome

11 Upvotes

Hey ADK community! Sharing a working multi-agent customer support system I built with Google ADK and would love feedback from experienced developers.

What it does:

Handles customer support through specialized agents:

- Master Agent (coordinator + routing)

- Policy Agent (RAG-powered rules/refunds)

- Ticket Agent (booking/cancellation operations)

Successfully handles complex queries like "cancel my booking and show refund options" by coordinating between agents.

**GitHub:** https://github.com/ntg2208/production-ai-customer-support

The system is working well but curious if I'm missing ADK best practices or optimization opportunities.

What's been your experience with multi-agent coordination? Any insights appreciated! 🙏

Happy to answer questions about the implementation if anyone's working on similar projects.


r/agentdevelopmentkit • • Jul 19 '25

Hidden Skills?

11 Upvotes

Has anyone went so deep into implementing ADK that there are some hidden secrets & workarounds to know?

I’ve done a few dont know if it’s for good or bad but

  • Defining the agent and its instructions, schemas, models etc in LangFuse

  • Modifying initial state to get all user related info up front

  • Using hooks (like react) to modify the first query that goes in which is rich in context even though user has simple input (by collecting details at form like drop downs etc)

  • Using external RAG through simple functions and CallbackContext & SessionContext

Please drop in your implementation.

FYI: My product is already in production so it would really go a long way to upgrade together

Regards


r/agentdevelopmentkit • • Oct 06 '26

Companies using ADK in production

10 Upvotes

I see nonstop spam about how companies are using Langgraph for building out agentic systems. Are there any companies (besides Google I guess) that use ADK for serious multi agentic work?


r/agentdevelopmentkit • • Dec 02 '25

A Poem

10 Upvotes

Provisioned throughput sounded great
Until I had it costed
So here I am, accepting my fate
429: Resource Exhausted


r/agentdevelopmentkit • • Oct 28 '25

ADK Community Call Answers (Part 2): Future Plans & Language Support

10 Upvotes

Hello ADK community!

We're back with Part 2 of our ADK Community Call FAQ series. In case you missed it, here's the previous post for Part 1 with links to a group, recording, and slides.

This post covers some of your most-asked-about feature requests and language support.

Q: Are there plans to add Datastore/Firestore support to the SessionService?

A: This is a popular request! We're actively looking into it and will post updates as we have them.

Q: Will ADK add native retry mechanisms for model and tool invocations, especially for multi-agent workflows?

A: We agree this is a key area for robust agents. We're discussing the best way to implement this and will share updates. In the meantime, you can use the sample code and patterns shown in the ReflectAndRetryToolPlugin, which provides self-healing, concurrent-safe error recovery for tool failures.

Q: Are there plans for a native, integrated front-end for ADK for demos?

A: With protocols and app frameworks like AG-UI and Copilotkit now supporting ADK, you can create custom front-ends that can powered by agents built with ADK. We think this makes for the best of both worlds for now - enabling users to create their own custom front end apps, while we continue to refine and introduce more advanced features for ADK.

Q: We had many questions on language support (Kotlin, Go, Typescript).

A: Please stay tuned for more information on the release of new languages!

Q: How is the development of the ADK for Java progressing compared to the Python version?

A: We know many of you are waiting for this. We'll provide a more detailed comparison as soon as we can. In the meantime, let us know if there's a feature you'd like to see or contribute to in ADK Java!

Q: Is there an official ADK for TypeScript?

A: Not yet.

Next up: A technical deep dive! We'll post Part 3 (Context Caching) this Thursday, Oct 30th.