Skip to content

docs: fix missing imports in custom agents and graph routes examples#1995

Open
Syed-Umer-Ali wants to merge 1 commit into
google:mainfrom
Syed-Umer-Ali:docs/fix-missing-imports-custom-agents-routes
Open

docs: fix missing imports in custom agents and graph routes examples#1995
Syed-Umer-Ali wants to merge 1 commit into
google:mainfrom
Syed-Umer-Ali:docs/fix-missing-imports-custom-agents-routes

Conversation

@Syed-Umer-Ali

Copy link
Copy Markdown
Contributor

What

Three Python code examples in the docs were missing required imports, making them uncopy-pasteable (would raise NameError at runtime).

Fix

  1. docs/agents/custom-agents.md:866-900 — Added from google.adk import Event and from google.genai import types in the AgentTool example. ImageGeneratorAgent._run_async_impl used both without importing them.

  2. docs/graphs/routes.md:151-182 — Added from google.adk import Event, Workflow and from google.adk.agents import Agent in the branching code block.

  3. docs/graphs/routes.md:407-428 — Added from google.adk import Event, Workflow in the loop code block.

Verification

All three code blocks pass ast.parse() — no syntax errors.

@netlify

netlify Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploy Preview for adk-docs-preview ready!

Name Link
🔨 Latest commit 0c4bf3c
🔍 Latest deploy log https://app.netlify.com/projects/adk-docs-preview/deploys/6a612860683ede000847c510
😎 Deploy Preview https://deploy-preview-1995--adk-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant