Skip to content

docs(plugins): fix broken examples, correct plugin callback docs - #2015

Open
GWeale wants to merge 2 commits into
google:mainfrom
GWeale:docs-audit-plugins
Open

docs(plugins): fix broken examples, correct plugin callback docs#2015
GWeale wants to merge 2 commits into
google:mainfrom
GWeale:docs-audit-plugins

Conversation

@GWeale

@GWeale GWeale commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

The plugins and skills pages: examples that can't run as written, plus callback behavior and Python registration guidance that had drifted from the source.

Changes

  • docs/plugins/index.md — the headline CountInvocationPlugin example had its whole class body unindented (docstring, __init__ and both callbacks sat at module level), and the registration example defined root_agent inside the hello_world tool function, so it was never importable; both are now indented correctly. Beyond that: notes that Python's Runner/InMemoryRunner plugins= is deprecated in favor of App(plugins=...) and that passing both raises ValueError; documents on_agent_error_callback, on_run_error_callback and close() (bounded by plugin_close_timeout, five seconds by default); corrects after_run_callback's return annotation from Optional[None] to None; describes the on-event return as a merge onto the original event rather than a wholesale replace, with id, invocation_id and timestamp always taken from the original; adds the built-in Debug Logging plugin to the list; and repairs two garbled "is only supported by the Plugins feature works as follows" sentences.
  • docs/skills/index.md — the inline-skills example passed get_weather_tool to SkillToolset without ever defining it, so it could not run; the function is now shown. The skill directory is renamed weather_skillweather-skill to match the frontmatter name, and the page now states that a filesystem skill's directory name must match that name or loading fails.

How this was produced

Part of a page-by-page audit of the Python docs against the google/adk-python v2.5.0 source: every import resolved against a real 2.5.0 install, every constructor kwarg checked against model_fields / inspect.signature, every documented default read off the field. A second independent pass re-derived each claim from source rather than trusting the finding, and a third conformed the new wording to the surrounding pages. mkdocs build --strict is clean.

Only Python tabs and language-neutral prose were touched — this audit had no ground truth for the Go / Java / TypeScript SDKs.

Split out of a larger audit branch so each area can be reviewed on its own.

@netlify

netlify Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deploy Preview for adk-docs-preview ready!

Name Link
🔨 Latest commit b00885a
🔍 Latest deploy log https://app.netlify.com/projects/adk-docs-preview/deploys/6a6a9987dc9ed4000781bdb6
😎 Deploy Preview https://deploy-preview-2015--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