From 0c4bf3c660d751bcb18a036c9fbebb58750b3c04 Mon Sep 17 00:00:00 2001 From: Umer Ali Date: Thu, 23 Jul 2026 01:25:30 +0500 Subject: [PATCH] docs: fix missing imports in custom agents and graph routes examples --- docs/agents/custom-agents.md | 2 ++ docs/graphs/routes.md | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/docs/agents/custom-agents.md b/docs/agents/custom-agents.md index ce6eb9405e..05c190c247 100644 --- a/docs/agents/custom-agents.md +++ b/docs/agents/custom-agents.md @@ -865,8 +865,10 @@ Allows an [`LlmAgent`](llm-agents.md) to treat another `BaseAgent` instance as a ```python # Conceptual Setup: Agent as a Tool + from google.adk import Event from google.adk.agents import LlmAgent, BaseAgent from google.adk.tools import agent_tool + from google.genai import types from pydantic import BaseModel diff --git a/docs/graphs/routes.md b/docs/graphs/routes.md index a8960e6546..d05bcdf86b 100644 --- a/docs/graphs/routes.md +++ b/docs/graphs/routes.md @@ -154,6 +154,10 @@ A sequential route runs each node once, in the listed order. `Event(route=...)` value, which the `edges` dict dispatches to different nodes. ```python + from google.adk import Event, Workflow + from google.adk.agents import Agent + + def router(node_input: str): """Route to task B or C based on node_input.""" if condition(node_input): @@ -407,6 +411,9 @@ lifecycle on each iteration. === "Python" ```python + from google.adk import Event, Workflow + + def router(node_input: str): """Route to task B or C based on node_input.""" if condition(node_input):