adk-kotlin 0.7.0 added a plugins parameter to the agent-based InMemoryRunner
constructor. App.plugins already existed at 0.6.0, so this is an ergonomic
shorthand rather than a new capability, but it is the form a Kotlin reader
should see and the plugins page had no Kotlin at all.
Two tab groups rather than one. The Register group's prose refers to
"the CountInvocationPlugin plugin defined in the previous section", so a Kotlin
tab there alone would point at a class the page never defines in Kotlin. Adding
the Create group as well makes the pair self-contained.
Kotlin now appears in two of the page's nine groups; the remaining seven are
per-callback detail. Whether to finish the page is a separate decision.
Plugin declares exactly one abstract member, name -- all twelve callbacks and
close() have defaults -- so a custom plugin only overrides what it needs. The
snippet overrides beforeAgent and beforeModel, matching the callbacks the
surrounding prose describes.
Transcluded and registered, so CI compiles and lints it. Also run: the runner is
constructed with the plugin wired, and invoking beforeAgent twice prints
"[Plugin] Agent run count: 1" then 2, so the counter callbacks work.
* Upgrade Kotlin examples to adk-kotlin 0.7.0
The Kotlin examples were pinned to adk-kotlin 0.5.0, which predates the
context caching, Vertex AI memory, and RAG retrieval APIs. Bump the pin to
0.7.0 so snippets for those features can be added.
Three consequences of the bump are handled here:
- `ExperimentalResumabilityFeature` was removed in 0.7.0, so RunConfigExample
no longer opts into it. The annotation class is gone, not merely deprecated,
so this is a hard compile break rather than a warning that could be deferred.
- The Vertex AI session and memory services expose Ktor's `HttpClient` as a
defaulted constructor parameter, so any snippet naming them needs Ktor on the
compile classpath, not just at runtime.
- The `resolutionStrategy` block forcing kotlin-stdlib 2.1.20 is now dead. It
worked around 0.5.0 publishing a stdlib newer than this project's compiler;
0.6.0 fixed that upstream. Verified that the highest stdlib on the compile
classpath is still 2.1.20 without it.
Also fixes two unrelated snags found while validating the above:
- `check_kotlin_snippets.sh` walked `examples/kotlin` without pruning build
output, so after any local build it reported every generated KSP file as an
unregistered snippet. CI only ever ran it against a clean checkout, so the
bug was invisible there.
- A transclusion path in logging.md was split across two lines, so the include
never resolved and the code block rendered empty.
* Fix broken links to adk-python plugin samples
The three plugin sample links 404. adk-python renamed
`contributing/samples/plugin/` to `contributing/samples/plugins/`; the
directory contents are otherwise unchanged, so only the path segment moves.
This is what the repo-wide `link-check` job has been failing on. It is
unrelated to the 0.7.0 upgrade in this PR, but the check gates the merge and
the fix is confined to the three URLs.
Verified all three targets return 200.
The site rendered one language under two names. Tab labels were split
137 `TypeScript` / 53 `Typescript`, with three pages carrying both
spellings at once (custom-agents.md 7/7, patterns.md 1/7,
function-tools.md 4/1), and the language-support badges were split 67/18
the same way. Because pymdownx.tabbed slugifies tab labels to lowercase,
both variants rendered and linked fine, so no link check or build warning
ever flagged it -- it was visible only to readers, as two names for one
SDK.
Every user-visible occurrence is normalized to `TypeScript`, plus the two
inconsistencies that turned up while doing it. 80 changed lines, accounted
for exactly:
53 tab label === "Typescript" -> === "TypeScript"
18 badge span lst-typescript">Typescript -> TypeScript
3 prose mention cloud-run.md, mcp-tools.md, workflows/patterns.md
2 api-reference/index.md card heading and link text
1 badge div attr title="...Python and Typescript."
1 mkdocs.yml nav Typescript ADK -> TypeScript ADK
1 code fence ```javascript -> ```typescript on a .ts include
1 artifacts/index.md closing summary sentence
---
80
The first six rows are pure casing: 78 lines that differ from their
originals by nothing but `Typescript` -> `TypeScript`. The last two are
not, and are the reason this is not a `sed`:
llm-agents.md:872 fenced `--8<-- ".../capital_agent.ts"` as ```javascript.
It was the only javascript-fenced `.ts` include in docs/ (the other 189
TypeScript fences are correct), and it cost that one snippet its
TypeScript highlighting.
artifacts/index.md:1084 closed the page by naming languages and got the
list wrong. It described reaching the artifact methods "using Python's
context objects or directly interacting with the `BaseArtifactService` in
Java" -- a two-language enumeration at the end of a page that carries
Python, TypeScript, Go, Java and Kotlin tabs (11/10/10/10/11), and one
that contradicts :556, which correctly names four of them. The
enumeration is dropped rather than extended: the sentence now describes
the two ways to reach these methods -- through the context object, or
through `BaseArtifactService` -- which is what the page actually teaches
and does not rot when a sixth language is added.
docs/api-reference/index.md is included even though the rest of
docs/api-reference/ is generated output that must not be touched. That
tree holds 3,140 generated HTML files and exactly one hand-authored page:
this one. It is Markdown, it is the only api-reference entry mkdocs.yml
lists as `.md` rather than `index.html` (:272, :441), it uses Material
`grid cards` and `:fontawesome-*:` shortcodes, and it carries a
`CONTRIBUTORS:` note citing issues #1716 and #1717. Its TypeScript card
already said "TypeScript" twice in its body text while its heading and
link text said "Typescript"; those two are now consistent with the body.
No generated file is modified.
Not in this change: the broken `SseConnectionParams` sample in
mcp-tools.md (docs-ts/p6c-mcp-ts-sample) and the `@google/adk` example
version bumps (docs-ts/p6b-example-versions). Only the casing of the
prose line above that sample is touched here.
Verified: `mkdocs build` exits 0 with an empty warning set on both main
and this branch, and the two warning sets are identical. A rendered
before/after diff of the whole site shows every `__tabbed_*` id, every
tab radio id and every heading anchor unchanged. Zero `=== "Typescript"`
and zero `lst-typescript">Typescript` remain anywhere in the repo.
Co-authored-by: Amaad Martin <amaadmartin@google.com>
* docs: update ADK Go imports to v2 for core concepts and tutorials
* docs: update ADK Go imports and APIs to v2 for runtime and safety
* docs: update ADK Go imports to v2 for features (workflows, tools, skills, sessions, plugins)
* docs: update ADK Go imports to v2 for operations and integrations
---------
Co-authored-by: Kristopher Overholt <koverholt@google.com>
The "Runner start callbacks" section described `before_run_callback` as
returning a `types.Content` to "replace the user's original message". That is
actually the behavior of `on_user_message_callback`; the text (including the
"Purpose" line) was duplicated from that section.
In the implementation, returning a `Content` from `before_run_callback` halts
the run: the Runner yields it as an early-exit event and skips all subsequent
processing instead of invoking the agent.
See `Runner._exec_with_plugin` in `src/google/adk/runners.py`:
early_exit_result = await plugin_manager.run_before_run_callback(...)
if isinstance(early_exit_result, types.Content):
early_exit_event = Event(..., content=early_exit_result)
...
yield early_exit_event # early exit, agent never runs
else:
# normal execution
This also matches the BasePlugin docstring: "Returning a value to halt
execution of the runner and ends the runner with that event."
Fix the "When It Runs", "Purpose", and "Flow Control" bullets accordingly.
Co-authored-by: Kristopher Overholt <koverholt@google.com>
* docs: home page
* updates based on feedback
* respond to review feedback
* docs: update gemini selector strings to "flash-latest"
* Update homepage.css
* Replace google.github.io/adk-docs URLs and /adk-docs/ paths with adk.dev
Migrate all hardcoded documentation references to use the new custom
domain. Update root-relative links to remove the /adk-docs/ subpath
prefix since the site will be served from the root of adk.dev.
* Additional fixes
* Update snippets to new Context type
* Updating documentation to reflect the unified Context type in Typescript
* Incorporating review feedback
---------
Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
* docs: MCP pages, add tip pointer to Tools and integrations
* adding Integration tips
- also removing incorrect Plugin / ADK Web incompatibility issue
* docs: centralize 3P and 1P Integrations content
- move all content to integrations/
- frontmatter headings for all integration listings
* respond to review comments
* Deleted redundant files.
* Deleted redundant files.
* Deleted redundant files.
* Deleted redundant files.
* Deleted redundant files.
* Deleted redundant files.
* Delete .gitignore
Deleted redundant files.
* Delete .gitignore
Deleted redundant files.
* Delete .gitignore
* Delete .gitignore
* Delete .gitignore
* Revert changes to .gitignore
* Revert changes to .gitignore
* Revert changes to .gitignore
* Revert changes to .gitignore
* Revert changes to .gitignore
* Revert changes to .gitignore
* Add MCP Tools TS example
* Removed unnecessary changes
* Removed extra slashes
* Added the custom agent sample.
* Corrected an error in the package.json file.
* Updated custom-agent.md
* Made small fixes.
* Add Session TS examples
* Added the typescript code snippets for multi agent.
* added the code sample for loop agent
* Added the code sample for loop agent
* Added the code sample for parallel agent
* Fixed a few issues and bugs
* Added the code sample for sequential agent
* Renamed run back to runAsync
* Updated the capital agent code sample.
* Corrected the snippet
* Renamed run() to runAsync()
* Add Runtime TS examples
* Fixed the snippets after library updates.
* Fixed the sample code after library changes.
* Added final touchups and fixes.
* Updated the code based on recent library changes.
* Updated package.json
* Updated package.json
* Updated package.json
* Updated the code with runAsync and package.json
* Updated the typescript sample.
* Updated after_tool_callback.ts with runAsync
* Updated after_model_callback.ts
* Updated before_model_callback.ts
* Updated before_tool_callback.ts
* Created before_agent_callback.ts
* Update before_agent_callback.ts
Changed the condition
* Update before_model_callback.ts
Changed the condition
* Update after_model_callback.ts
Changed the condition
* Update after_tool_callback.ts
Changed the condition
* Update after_agent_callback.ts
Changed the condition
* Update callback_basic.ts
Changed the condition
* Update storyflow_agent.ts
Changed the condition
* Update sequential_agent_code_development_agent.ts
Changed the condition
* Updated before_agent_callback.ts
* Removed unnecessary comment.
* Updated comment
* Renamed run to runAsync
* Added artifact code snippets.
* Fixed .link-checker-config.json
* Added tsconfig.json
* Update .gitignore with node modules files
* Added 7 typescript code snippets
* Cleaned up and corrected the snippets for plugins
* Update index.md
Undid the changes in artifacts/index.md
* Escaped properly.
* Add Long Running Function Tool TS examples
* Resolved code review feedback
* Fixed the code sample per git comments.
* Fixed the code per git comments.
* Fixed the md file per git comments.
* Fixed the issues per git comments.
* Fixed issues per github comments.
* Fixed the issues per PR comments.
* Fixed issues per PR comments.
* Added a code sample for HITL
* Fixed the indentations in the typescript code
* Used createPartFromBase64 when appropriate.
* Switched to use createUserContent.
* docs: Add JavaScript Quickstart, short unified format
* Added a simulated user delay to the code sample.
* Made some cosmetic improvements
* Added the code snippet with HITL with policy
* Made cosmetic modifications to multi-agents.md
* Added more tutorial for the HITL with policy
* Modularized the main function and added helper functions.
* Resolved code review feedback
* Resolved code review feedback
* Resolved code review feedback
* Fixed minor things in the typescript code per PR comments.
* Fixed the import for Event and used createEventActions.
* Simplified functionResponse code.
* Corrected the Event import and used createEventActions.
* Updated ADK versions in package.json.
* Final review of all changes & Add Safety TS example
* Make tsconfig.json files consistent
* Generated the API Reference for typescript
* Resolved code review feedback
* feat: Add Typescript API reference to docs
This commit adds the generated TypeDoc documentation for the Typescript ADK to the documentation site.
It also updates the main API reference page to include a link to the new Typescript API reference.
* docs: update TypeScript quickstart
* docs: Add version tags for Build Agents topics
- add version tags
- move TS content to second position (after Python)
* docs: Add MCP Toolbox for databases TS SDK Documentation
* Update mcp-toolbox-for-databases.md
* use typescript code block
* minor changes
* Update mcp-toolbox-for-databases.md
* Auto generated the typescript API reference.
* Added the TS code snippets for context.
* Fixed TS code snippets for context.
* Modified the sample based on the comment.
* docs: adding TypeScript language tags (2 of 3)
- Update all Run Agents section topics
- change all TS tags to v0.2.0 per eng agreement
* docs: Add TypeScript language support tags, Components (3 of 3)
- add TS language support tags
- re-order TS examples to be second
- minor fixes: remove trailing spaces
* Added callback samples for typescript to the markdown files.
* Updated adk version in quickstart
* Updated google/adk version for typescript.
---------
Co-authored-by: manchan <manchan@google.com>
Co-authored-by: Mandy Chan <75594070+slothwriter@users.noreply.github.com>
Co-authored-by: Joe Fernandez <joefernandez@google.com>
Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
Co-authored-by: Twisha Bansal <58483338+twishabansal@users.noreply.github.com>
* Add mkdocs-llmstxt and related config
* Remove existing llms.txt and llms-full.txt from repo
* Add docs page for llms.txt
* Minor edit
* Minor edit
* Add *.md to glob syntax in mkdocs-llmstxt config
* Add explicit URLs in API reference section to avoid build warnings
* Fix all build warnings related to bad cross-links and incorrect anchor links
* Suppress INFO logs about absolute links - the CI link checker will catch any issues
* Fix remaining build warnings
* Add Gemini CLI instructions
* Fix link to bidi tutorial
* docs: add language support tags to pages
- replace img.shield tags
- add language support tags where missing
* update Agents page with general tags
* update language and version tagging
- response to review comments
- rename css styles to avoid style name conflicts
* add tags to api-server page
* docs: Update formatting of logging information
- Remove duplicates
* Fix formatting/spelling issues in Express Mode page
* Fix code formatting
* Rename "Google Cloud's" -> Google Cloud per branding guidelines
* Spelling fix on A2A
* Formatting fixes in a2a consuming
* Fix typo/formatting error on API Reference homepage
* Remove custom anchors in CONTRIBUTING.md because GFM doesn't support them
* Add imports to A2A Samples and update agent.json to agent-card.json
---------
Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
* feat: Update Safety and Security page to include plugins as a method for implement agent-agnostic security
* Add hyperlinks to newly added plugin section
---------
Co-authored-by: sammalik-lgtm <sammalik@google.com>
* feat: Update Safety and Security page to include plugins as a method for implement agent-agnostic security
* Add hyperlinks to newly added plugin section
---------
Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>