Commit Graph

55 Commits

Author SHA1 Message Date
Shahin Saadati 674851324e Add the Kotlin tab for answering a long-running tool call (#2149)
* Show how a Kotlin client answers a long-running tool call

The function-tools page documents long-running tools in two halves: defining one
(which Kotlin already covered) and driving it from the client, which Kotlin did
not. Nothing in the docs showed a Kotlin reader how the deferred result gets
back to the model - the only Kotlin mention of longRunningToolIds in the repo is
a commented-out field listing in events/index.md.

The new region continues the reimbursement scenario the Kotlin tab above it
already sets up, rather than importing the nav-agent scenario the upstream demos
use. It shows the two things that are easy to get wrong:

- A pending call is one whose id the event also lists in `longRunningToolIds`;
  the FunctionResponse must reuse that id or the model cannot match the answer
  to the request it is waiting on.
- A resumable app must pass `invocationId` to the second `runAsync`. Without it
  the response opens a new invocation instead of resuming the paused one, which
  the page's own resume note warns about for Python. Grounded in
  ResumableLongRunningToolDemoAgent.kt:84-99 at the v0.8.0 tag.

Appended to the existing, already-registered LongRunningTool.kt instead of the
new file the backlog row proposed: this page already owns that snippet, and a
second file elsewhere would split one page's Kotlin across two directories.

Also added a bullet to "Key aspects of this example", which explains the group
purely in terms of `LongRunningFunctionTool` - a class Kotlin does not have. The
Kotlin form is `@Tool(isLongRunning = true)` or a `BaseTool` subclass, and a
long-running tool returning `Unit` suppresses even the placeholder response
(InvocationContext.kt:447).

Verified: runner.sh build and lint both PASS on the snippet (JDK 17),
check_kotlin_snippets.sh passes, L0/L5/L6 pass. L3 reports two orphaned-tab
problems at lines 123 and 227; both pre-date this change and are false
positives - rendering the page with the repo's own markdown extensions shows
every group, including the one edited here, as a single tabbed set with Kotlin
among its labels.

* Correct the long-running snippet's account of resume and turn count

Review against the v0.8.0 sources found three claims in this branch that a
reader would have acted on and been wrong.

The invocationId argument was the worst of them. The snippet took an
`appIsResumable` flag and passed `invocationId` on the second `runAsync`,
commenting that a resumable app must do so or the response opens a new
invocation. The runner does not work that way: `resolveInvocationId`
(AbstractRunner.kt:468-483) looks the id up from the function-call event that
matches the response's own id and discards whatever the caller passed. The flag
was inert, and anyone plumbing it through their call sites would have got
nothing for it. Both are gone; the comment now says what actually resumes the
invocation - the response id itself.

"Returns a placeholder and the turn ends" was wrong for the snippet's own
default. This tool returns a data class, not `Unit`, so a non-resumable app
emits the placeholder as a function response and calls the model again:
LongRunningToolIntegrationTest's scenario table records two model calls and a
trailing text event for that combination, and asserts it in
runAsync_longRunningToolReturnsDict_propagatesPayloadAndAcknowledges. A reader
building a HITL flow would have budgeted one model call and been surprised by an
interim reply. The KDoc and the page bullet now describe both modes.

Reusing the call id was described as something the model needs to match the
answer to its request. The model never gets that far: an unknown id throws from
HistoryRewriterProcessor.findMatchingFunctionCallEvent, and a null one throws
too, because the id set is built with mapNotNull and an empty set matches no
event. The comment now says it throws.

Also prints turn 1, which is where the interim reply appears, and says so when
the model answers without calling the tool instead of returning silently.

Verified: runner.sh build and lint both PASS (JDK 17), L0/L1/L2/L5/L6 pass, and
rendering the page with the repo's markdown extensions puts Kotlin in the target
group's tab set. L3's two orphaned-tab reports are pre-existing on main and are
false positives - the render shows those groups whole.

* Update function-tools.md

* Say that Kotlin resolves the invocation from the response itself

Adding a Kotlin tab to this section quietly extended the Resume note to
Kotlin, where it does not hold: resolveInvocationId matches the function
response's own call ID against the session and ignores the invocationId
the caller passes, so requiring one sends readers looking for a
parameter that changes nothing. An ID matching no call throws rather
than starting a fresh invocation.

Also fix subject-verb agreement in the turn-count bullet.

---------

Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
2026-08-31 14:32:08 -07:00
Shahin Saadati fb99006173 Add Kotlin tabs to the tool confirmation page (#2157)
* Add Kotlin tabs to the tool confirmation page

All three tab groups showed Python, TypeScript, Go and Java but not
Kotlin, even though the API has existed since adk-kotlin v0.1.0.

Kotlin turns out to sit closer to Python than to TypeScript here: the
@Tool annotation carries a requireConfirmation flag, so the boolean case
is a direct equivalent of FunctionTool(require_confirmation=True) rather
than something callers hand-roll. The flag is a compile-time constant,
though, so dynamic thresholds are evaluated inside the tool through
ToolContext, the way ADK Java does it. The prose that previously singled
out TypeScript for that now names Kotlin too.

The advanced example reads the returned payload through Number rather
than casting straight to Int, because the payload arrives decoded from
JSON and its numeric type is not guaranteed - the same trap the Go tab
calls out for float64.

* Badge the confirmation page with the version the API shipped in

The badge said Kotlin v0.8.0, the version adk-docs compiles against,
rather than the introducing release. ToolConfirmation,
ToolContext.requestConfirmation and the @Tool requireConfirmation flag
were all present at v0.1.0.

* Update confirmation.md

---------

Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
2026-08-31 12:09:44 -07:00
Shahin Saadati e59783b904 Add the Kotlin tab for driving a long-running tool to completion (#2159)
The call_reimbursement_tool group showed Python, TypeScript, Go and Java
but not Kotlin, even though the page already carries a Kotlin tab for
defining the tool a few sections earlier. Defining a long-running tool
without showing how to resume it leaves the Kotlin reader at the point
where the invocation pauses.

The new region extends the file that already backs this page rather than
adding a second one. It mirrors the Python flow: watch for the call whose
id appears in Event.longRunningToolIds, keep the matching
FunctionResponse, then send a copy of it back with the final status to
resume the paused invocation.

Scoped deliberately to that group. RequestInputTool and GetUserChoiceTool
were also on this backlog row, but they have no host page in ANY language
- they appear nowhere in the narrative docs, only in generated API
reference - so adding a Kotlin-only section for them would invent
structure rather than close a gap. Recorded for a product-docs request
instead.
2026-08-31 11:14:09 -07:00
Shahin Saadati 8da5856bc5 Add Kotlin snippets to the custom tools page, including toolset filtering (#2114)
* Add Kotlin snippet for filtering a toolset's tools

The Toolsets section had no Kotlin. ToolFilter and ToolPredicate arrived in
adk-kotlin 0.7.0 and give Kotlin something the other languages do not have: a
filter that receives the ReadonlyContext, so a toolset's tool list can depend on
session state or the current user.

The Python tab in the Simple Math Toolset example only gestures at this, in a
commented-out branch inside get_tools(). This snippet implements it, showing all
three states: no filter selects everything, allowList selects by name, and a
Predicate decides per invocation.

Placed in its own subsection rather than as a fourth tab on the Simple Math
Toolset example. That group is one worked example explained by five bullets --
an agent, a greet tool, name prefixing, a tool_context.state write and close() --
and a filtering snippet satisfies none of them. Kotlin cannot satisfy the prefix
bullet at all, since BaseTool.name is a val and adk-kotlin has no prefix
mechanism. A tab there would have left readers with four bullets that do not
describe the code above them.

Transcluded, so CI compiles and lints it. Verified beyond compiling: the tools
are generated by KSP, filtering returns the expected sets for all three cases,
and the tool bodies run -- addNumbers(7,3) -> {result=10}.

* feat: add Kotlin code snippets for tool definition and usage examples to ADK documentation

* refactor: move doc snippet markers above imports in Kotlin tool examples

* Match ExternalApprovalTool to the 0.8.0 BaseTool.run signature

adk-kotlin 0.8.0 widened `BaseTool.run`'s args from `Map<String, Any>` to
`Map<String, Any?>`, so the override in this snippet overrides nothing and the
class no longer implements its abstract member. `compileKotlin` fails with
"'run' overrides nothing" at MultiAgentExample.kt:61.

The break arrived on main with the 0.8.0 bump in #2143, not from this branch.
It surfaces here because the snippet runner builds the whole examples project,
while that PR's own check only compiled the files it changed - and it changed
no .kt files at all. Fixing it here because it blocks this PR; it is one
character and unrelated to the toolset filtering content.

* Correct the tool badges and drop the exclusivity from the filter heading

Four things from joefernandez's review:

- Heading shortened to "Filter tools in toolsets" as suggested.
- That shorter heading is conceptual, and the subsection carries a Kotlin-only
  badge, which would repeat the exclusivity claim his b/548652184 is about.
  Python, Java and TypeScript all filter toolsets by name or by a
  context-aware predicate on BaseToolset, so the section now says so in a
  sentence and the badge's title scopes the version to the Kotlin ToolFilter
  API rather than to filtering as a concept.
- Page badge Kotlin v0.7.0 -> v0.1.0, and the Toolsets badge likewise. @Tool,
  ToolContext and Toolset all exist at the v0.1.0 tag; only ToolFilter is new
  in v0.7.0, and function-tools.md already carries v0.1.0.
- The Toolsets badge's bare "Java" span now reads v0.3.0, the first adk-java
  release containing BaseToolset (added in a211ac4c, tagged v0.3.0).
2026-08-19 10:32:11 -07:00
Shahin Saadati 6b8b086052 Add Kotlin snippet for remote MCP with a suspend headerProvider (#2113)
* Add Kotlin snippet for remote MCP with a suspend headerProvider

The MCP tools page had no Kotlin content. This adds a Kotlin tab to the
"Agent Configuration for Remote MCP" group, where it differs from the sibling
tabs in a way worth showing: adk-kotlin 0.7.0 made McpToolset's headerProvider
a suspend function, so a token can be minted per request rather than baked in
as a static header the way the Python and Java tabs do.

Two things the snippet has to get right, both of which a reader porting from
the Java tab would otherwise hit:

- McpToolset's constructor is internal. The Java tab's
  `new McpToolset(streamableParams)` has no Kotlin equivalent; instances come
  from McpToolsetConfig.toToolset(), as the KDoc directs. Confirmed by
  compiling the direct form, which fails with "Cannot access 'constructor
  (...)': it is internal".
- Supplying a headerProvider disables session reuse, so that headers can vary
  per context. That is a real cost, so the comment says so and points at static
  headers on StreamableHttp for callers who want a single cached session.

Badged Kotlin v0.7.0: the page had no Kotlin badge, and the suspend
headerProvider signature is 0.7.0.

Inline to match the page's other tabs, so CI will not compile it. Extracted,
compiled and ran it against the 0.7.0 pin in a throwaway project:
OK toolset=McpToolset.

* Tighten the MCP snippet after self-review

Three presentation fixes; no change to what the snippet does.

- Comment cut from five lines to three. The Python and Java tabs in this group
  carry a single comment line each, so the original block was well out of step
  with its neighbours.
- Closed the config constructor before chaining .toToolset(), removing an
  eight-space hanging indent that no formatter would produce. Nothing catches
  it, since inline snippets are never linted.
- Said that fetchToken() awaits. The v0.7.0 badge on this page rests entirely
  on that: headerProvider existed at 0.6.0, just not as a suspend function.
  Compiling the snippet against a 0.6.0 pin confirms it -- with a suspend
  fetchToken() it fails, with a plain one it compiles. A reader whose token
  source is synchronous does not need 0.7.0, and nothing in the visible code
  said which case this is.

Re-ran the snippet against the 0.7.0 pin: OK toolset=McpToolset.
2026-08-13 08:30:49 -07:00
Amaad Martin c75e61f5f3 docs: normalize Typescript to TypeScript across the site (#2079)
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>
2026-08-05 15:58:49 -07:00
Zyan cd66bc5128 Update propagate grounding metadata as per Issue #1587 - 6 (#2033)
* Update propagate grounding metadata as per Issue #1587 - 6

Rendered view
PR #1598 
Original Issue #1587 

--

- Improved explanation of original ask bot draft
- Added code example

* Update function-tools.md

* Update function-tools.md

* Update function-tools.md
2026-07-31 12:11:57 -06:00
adk-bot 23ea009dfc Update ADK doc according to issue #1256 - 4 - McpToolset Progress Updates (#1263)
* docs: Add section on Handling Progress Updates for McpToolset

* Update mcp-tools.md

---------

Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
2026-07-28 19:26:39 -07:00
Zyan 342e36d8ee Update OpenAPI tool execution section per Issue #1227 - 11 (#1991)
* OpenAPI tool execution section per Issue #1227 - 11

Rendered view
PRs> #1245 #1246 
Original Issue> #1227 

---

- Updated the execution section of the OpenAPI tool and improved language.
- Did minor edits to format and headers

* Update openapi-tools.md
2026-07-28 16:39:51 -06:00
Zyan 0a9cc3a7db Update include_plugins per Issue #1173 - 9 (#1990)
* Update include_plugins per Issue #1173 - 9

Rendered page>
PRs> #1190  #1192 
Original Issue> #1173 

- Changed the proposed note format into a bullet point.
- Made the explanation shorter and more direct so it matches Google's writing style guide.
- Fixed and replaced the undefined agent variable with a concrete MyImageAgent placeholder class to make the Python snippet self-contained.
- Added comments inside the code to explain exactly what happens when you turn plugins on or off (like how it affects things like tracing and events).
- Did light formatting in the rest of the page

* Update function-tools.md

* Update function-tools.md

fixed rendering mistakes

* Update function-tools.md

Adding a bullet did not work, I created a sub topic to stop the snippet from breaking in the rendering.

* Update function-tools.md
2026-07-28 16:30:37 -06:00
Zyan c8e6c03f6f Update external access tokens per issue 1292 - 7 (#1974)
* Update external access tokens per issue 1292 - 7

- Reviewed original PR and added some corrections to the agent's draft.
- Added more info about authentication warnings.
- Added documentation for the external_access_token_key feature in authentication.md.
- Reviewed against python repository.

Links:
- Rendered page: 
- Original PRs: #1303 and #1304 
- Issue: #1292

* Update authentication.md
2026-07-24 15:14:00 -06:00
Zyan c78be66c78 Add docs for context injection for function tools (issue #1438 - 17) (#1958)
* Updated Context injection according to issue #1438 - 17

This PR adds documentation for context injection.

* Update function-tools.md

Worked on feedback.
- Updated Imports: Fixed the import path for ToolContext to correctly pull from google.adk.tools instead of google.adk.types.
- Snippet Formatting: Removed the unnecessary parentheses around "secondary_agent" in the commented-out transfer_to_agent action example.
- Removed Dead Code: Removed the redundant pass statement at the end of the my_tool function.

* Fix context injection docs and headings in function-tools.md

* Format function-tools.md: line wrapping, bullet markers, and copy cleanup

---------

Co-authored-by: Kristopher Overholt <koverholt@google.com>
2026-07-13 18:03:38 -05:00
Hyang-Ah Hana Kim af790ae141 docs: update more Go documentation and examples to ADK Go v2 (#1936)
* 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>
2026-07-07 18:09:07 -05:00
Zyan 29a1d4de46 Document ID token authentication for service accounts (#1350 - 8) (#1875)
* I updated the section to include token id

* Update authentication.md

* Update authentication.md

* Update authentication.md

* Update authentication.md

* Update authentication.md

* Fix heading casing and anchor link text in ID token section

* Drop letter prefixes from toolset config headings

* Expand intro to "Configure tools with authentication"

---------

Co-authored-by: Kristopher Overholt <koverholt@google.com>
2026-07-06 11:47:23 -05:00
Zyan eb2c7ff1bf Update mcp-tools.md (#1845)
* Update mcp-tools.md

* Update mcp-tools.md
2026-06-25 15:21:16 -06:00
Kristopher Overholt 1c93532ca6 Fix broken external links to adk-python contributing/samples and other internal links (#1773)
* Add link to ignore

* Update links to code samples

* Fix links related to graphs and workflows

* Fix more sample links
2026-05-19 13:53:51 -07:00
Kristopher Overholt 50f7df7f46 Add Kotlin language support to ADK docs (#1768)
* Add Kotlin to hero / front page

* Add quickstart page for Kotlin

* Complete Kotlin quickstart guide and fix hero code sample (#2)

* Replace GitHub repo links with language icons in header (#3)

* Fix header icon FOUC and homepage font weight regression (#4)

* Testing staging pipeline

* Revert test edit (for staging pipeline)

* Update language icon tooltips to indicate GitHub destination (#5)

* Add link to ADK Kotlin release notes (#7)

* Initial commit of ADK Kotlin API reference docs (#6)

* Add script to generate ADK Kotlin API reference docs (#8)

* Update links and link checker ignore list (temporarily) (#9)

* Add ADK Kotlin for Android getting started guide to Advanced setup page (#10)

* Add advanced setup page with steps to "Use ADK Kotlin in Android projects"

* Update temp link checker rules

* Add placeholder folder for adk-samples (#13)

* adding linter/compilation checks for kotlin snippets (#12)

* adding linter/compilation checks for kotlin snippets

* Add Kotlin validation scripts

* Initial commit of Kotlin sample agents for adk-samples (#15)

* Adding kotlin snippet for llm agents (#16)

* Adding kotlin snippets to  Events (#17)

* Pull changes to docs/events/index.md from glaforge-kotlin-snippets

* fixing kotlin event timestamp and longRunningToolIds

* Fix language tags (#19)

* Fix language tags

* Update

* Fix wrapping

* Fix wrapping (again)

* Fix wrapping/format

* Fix language tag on integration page

* Enable check_paths in PyMdown Snippets Extension to make the build fail if a snippet can't be found (#20)

* Update mkdocs config (#21)

* Fix broken links, update URLs to adk.dev, and improve (temp) lychee config (#22)

* Add Kotlin/maven badge to README (#23)

* Adding Kotlin snippets for artifacts  (#18)

* Pull Kotlin snippets for artifacts from glaforge-kotlin-snippets

* Add comprehensive Kotlin snippets for artifacts

* Refactor artifacts documentation to use external Kotlin snippets

* Update Kotlin model to gemini-flash-latest

* Fix GCS initialization in Kotlin artifact snippet

* afixi failing test with capital-agent added to files_to_check

* Fix snippet label syntax for MkDocs build

* Configure proper Gradle project for Kotlin snippets and fix dependencies

* Add KSP support and generated sources to Kotlin snippets build

* fixing capital_agent turnComplete

* Fix syntax error in build.gradle.kts by removing invalid placeholders (#25)

* Adding Kotlin snippets to google-gemini.md (#27)

Pulling kotlin changes to google-gemini.md from glaforge-kotlin-snippets

* Add a warning about not adding an api key to production code. (#28)

* Add a warning about not adding an api key to production code.

* Update note

---------

Co-authored-by: Kristopher Overholt <koverholt@google.com>

* Add ADK Demo App sample showcasing Gemini-powered agents (#29)

This sample demonstrates how to use the Google ADK (Agent Development Kit) in an Android application to create a chat interface powered by a Gemini-based "Fun Facts" agent. The implementation features:
*   Integration with the Kotlin ADK core and processor libraries.
*   A `FunFactsAgent` defined using `LlmAgent` and the Gemini model.
*   A `ChatViewModel` utilizing `InMemoryRunner` for asynchronous message streaming.
*   A modern UI built with Jetpack Compose and Material 3.
*   Build configuration logic for secure API key management via environment variables or `local.properties`.

* Update Kotlin docs and samples to align with adk-kotlin API changes (#30)

Rename GeminiModel to Gemini, @AdkTool/@AdkParam to @Tool/@Param,
adkTools() to generatedTools(), replace DebugRunner with InMemoryRunner,
fix AgentLoader import path, use SingleAgentLoader, bump Kotlin to
2.3.21 and KSP to 2.3.7, and update Android minSdk from 24 to 26.

* adding kotlin info to READMEs (#14)

* Reorganize Android sample agent and add READMEs (#31)

* Move Android sample agent

* Update repo README, add Android README, update sample agent README

* Minor edit to language support tags (#32)

* Remove blog post link (#33)

Will re-add after it's published

* Remove examples link (#34)

* Adding Kotlin snippets for Sessions docs (#26)

* initial kotlins snippets additions to sessions docs

* Updating memory docs with kotlin snippets

* Adding kotlin snippets to session state docs.

* update model to gemini-flash-latest

* sessions examples clean-up

* fixing sessions snippet markers

* adding kotlin session snippets to files to test

* adding callback to memory_example

* Fixing capital agent snippet  (#35)

Fixing file name
Updating adkTool > Tool
Updating GeminiModel > Gemini

* Adding kotlin snippets for tools docs (#36)

* adding function tool kotlin snippets

* adding function_tools snippets to files to test

* Adding kotlin snippets to observability docs (#37)

* initial kotlin observability updates

* adding observability snippets to file check (#38)

* Adding Kotlin snippets to Callbacks docs (#39)

*  kotlin callbacks snippets

* adding callbacks snippets to file check

* Align Kotlin and KSP versions with published 0.1.0 artifacts (#40)

* switch CLI entry points from InMemoryRunner to ReplRunner (#41)

* Switch CLI entry points from InMemoryRunner to ReplRunner

* Fix wording

* Update API reference docs for Kotlin, 2026-05-18 (#42)

* Remove ADK on Android note until published (#43)

* Update Kotlin code samples (#44)

* Rename GeminiModel to Gemini in Kotlin snippets and docs

* Remove broken SessionKey call and use sessionId directly in AgentTool snippet

* Rewrite Go hero snippet to use llmagent API

* Use isFinalResponse with safe access in CapitalAgent snippet

* Use Role.USER constant instead of raw string in SetupExample

* Use full semver v0.1.0 in Kotlin language support tags

* Remove Android setup steps, moving to new property (#45)

* Tutorial Kotlin agent (#46)

* Adding multi-tool-agent snippet and updating tutorial
* Fixing Go language order on tutorial page
* adding multi tool agent example to files to test

* Inline Kotlin get-started code sample

* Kotlin Multi agents snippets (#47)

* Multi-agent kotlin snippets

* Fixing docs tags in multiagent example

* Fix Kotlin language support tags, code samples, and google-gemini.md cleanup (#48)

* Add Kotlin v0.1.0 to language support tags across docs

* Fix MultiToolAgent.kt model string and argument style

* Update MultiAgentExample.kt to use gemini-flash-latest model string

* Fix google-gemini.md: add Kotlin sample, remove unsupported Java tabs

* Remove explicit apiKey from CallbackBasic.kt for consistency

* Standardize Gemini() constructor to use named args in all snippets

* Remove adk-samples directory (moved to google/adk-samples#1969)

* Remove adk-samples directory (moved to google/adk-samples#1969) (#49)

* Update API reference docs for ADK Kotlin 0.1.0 (#50)

* Remove adk-samples directory (moved to google/adk-samples#1969)

* Update API reference docs for ADK Kotlin 0.1.0

* Remove kotlin lycheeignore config (#51)

* Remove adk-samples directory (moved to google/adk-samples#1969)

* Remove Kotlin .lycheeignore config links

---------

Co-authored-by: Toni Klopfenstein <2359976+ToniCorinne@users.noreply.github.com>
Co-authored-by: Jolanda Verhoef <JolandaVerhoef@users.noreply.github.com>
2026-05-19 11:43:42 -05:00
prashantpatare-eng 83742996b5 add agent-identity integration page link (#1765)
* add agent-identity integration page link

* Refactor authentication documentation for clarity

Removed redundant information about OAuth tokens and streamlined the text regarding the Agent Identity Authentication Manager.

* test commit

* Enhance documentation with OAuth resource links

Added additional OAuth authentication resources for Google Cloud Agent Identity.

* remove extra new line

* Update authentication.md

---------

Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
2026-05-15 23:13:21 +00:00
Efe Baran Durmaz 00c045504c docs: clarify function tool defaults (#1731)
Co-authored-by: Kristopher Overholt <koverholt@google.com>
2026-05-06 13:51:24 -05:00
Kristopher Overholt aed33a42c5 Add links to Agent Identity Authentication Manager user guides (#1674) 2026-04-22 05:50:06 -07:00
Kristopher Overholt 1214ad915a Update product names in docs (#1673)
* Update names in docs

* Update names in docs

* Code formatting

* Format notebooks

* Update names in docs

* Update names in docs

* Update names in code samples

* Update names in docs

* Update names in docs

* Update names in docs

* Update names in docs

* Update names in docs

* Update names in docs

* Update names in docs

* Update names in docs

* Update icon

* Update names in docs

* Update names in docs
2026-04-22 05:10:38 -07:00
Toni Klopfenstein ae78cb4eed Adding confirmation Typescript snippets (#1669)
* Adding initial confirmation js snippets

* updating confirmation tools examples to output text response to user to improve test flow

* fixing boolean_confirmation failure to deny excessive requests

---------

Co-authored-by: Kristopher Overholt <koverholt@google.com>
2026-04-21 17:52:17 -07:00
Kristopher Overholt fb0c030110 Switch link checkers (#1646)
* Switch link checker CI job

* Update

* Updates

* Update config

* Switch images to MD image syntax

* Update timeout settings

* Fix tools links

* Update links

* Update index files in config

* Fix more links

* Fix link; add ignores

* Fix more links

* Fix more links
2026-04-17 13:05:08 -07:00
Joe Fernandez cd9fa20fa4 Update function-tools.md (#1621)
fix for b/417443399
2026-04-09 16:11:06 -07:00
Joe Fernandez f7ed80bbc6 docs: Update Gemini flash names (#1594)
* docs: home page

* updates based on feedback

* respond to review feedback

* docs: update gemini selector strings to "flash-latest"

* Update homepage.css
2026-04-09 16:14:27 -05:00
Joe Fernandez 23823af8c9 docs: update tools auth with additional recommendations (#1586)
* docs: update tools auth with additional recommendations

- auth manager services
- self-managed auth

* updates from self-review
2026-04-09 09:13:20 -07:00
Teresa Qin 24a9c9b5ea Update the image link in the doc. (#1567)
* Replace the Google Maps MCP Server example (created by Anthropic and violates to Google Maps Platform ToS) to Google Maps Grounding Lite MCP Server example.

* Update the image link

* Update image link

* Update bullet points format
2026-04-07 18:31:10 +09:00
Teresa Qin e9647d5a26 Replace the Google Maps MCP Server example (created by Anthropic and violates to Google Maps Platform ToS) to Google Maps Grounding Lite MCP Server example. (#1566) 2026-04-07 17:25:37 +09:00
Joe Fernandez 50559ddb7d docs: [auth] add recommendation for secrets manager service (#1556)
* docs: [auth] add recommendation for secrets manager service

* responding to review comments
2026-04-06 20:59:28 +00:00
Kristopher Overholt 58f3aaebca Replace documentation URLs and paths for adk.dev migration (#1536)
* 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
2026-04-01 12:48:27 -05:00
Toni Klopfenstein cc2fae290e Updating Go snippets on confirmation doc (#1510)
* updating confirmation for tools for Go

* updating go snippets on confirmation docs

* restoring acaccidental edits on confirmation doc

---------

Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
2026-03-30 20:12:23 +00:00
Guillaume Laforge fc83ab7cfe docs: update Java MCP examples to align with latest ADK implementation (#1496) 2026-03-26 14:35:23 -04:00
Furó Tamás-Márk 3e69d64845 Enhance MCP tools documentation with verification commands for Windows (#1481)
* Enhance MCP tools documentation with verification commands for Windows

Added installation verification commands for Windows and Unix.

* Update mcp-tools.md

---------

Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
2026-03-26 15:29:15 +00:00
Shahin Saadati 06f553cfe9 Added missing java snippets to function-tools.md (#1467)
* Added missing java snippets to function-tools.md

* Update function-tools.md

---------

Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
2026-03-24 08:44:55 -07:00
Shahin Saadati 15c189ea22 Added the missing java code snippets in tools-custom/confirmation.md (#1456)
Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
2026-03-24 08:37:06 -07:00
Shahin Saadati 5331a07f1b Added the missing java snippet to tools-custom/index.md (#1454) 2026-03-19 16:18:24 +00:00
Joe Fernandez 06a78591bd docs: MCP pages, add tip pointer to Tools and integrations (#1290)
* docs: MCP pages, add tip pointer to Tools and integrations

* adding Integration tips

- also removing incorrect Plugin / ADK Web incompatibility issue
2026-02-11 14:51:21 -08:00
Didier Durand 159e536aed doc: fixing typos in various files (#1140)
* doc: fixing typos in various files

* Update code-exec-agent-engine.md

---------

Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
2026-01-15 16:59:02 -08:00
Didier Durand 2b36865e64 doc: fixing typos in various files (#1107)
* doc: fixing typos in various files

* Update loop-agents.md

* Update agentops.md

* Update part1.md

* Update agent-team.md

---------

Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
2026-01-13 15:40:50 -08:00
Goodnight 93be6e3dd2 docs: fix typos and spacing across docs (#1079) 2025-12-16 18:36:18 -06:00
Joe Fernandez 4c80ffec14 docs: fix language ordering consistency issues (#1069)
* docs: ADK TS fixes

- remove duplicate Go tab
- TS tag for Types of Callbacks
- fix TS tab rendering and ordering problem

* docs: fix language ordering consistency issues
2025-12-15 14:49:17 -08:00
Joe Fernandez 4d4651cd7f docs: ADK TS fixes (#1067)
- remove duplicate Go tab
- TS tag for Types of Callbacks
- fix TS tab rendering and ordering problem
2025-12-15 14:24:40 -08:00
Shahin Saadati fd7c7a3dca feat: Merge all the typescript code samples and snippets into the main repo. (#1063)
* 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>
2025-12-15 12:53:24 -08:00
Kristopher Overholt 2bad58c487 Add autogeneration of llms.txt during mkdocs build; add docs page on using llms.txt (#1023)
* 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
2025-12-05 11:08:14 -06:00
Kristopher Overholt ee93084985 Update from deprecated MCPToolset to McpToolset class on MCP page and third-party tools pages (#999)
* Update McpToolset and imports on MCP page

* Update McpToolset and imports on all third-party tools pages

* Update McpToolset on Agent Config page

* Update imports from from google.adk.tools.mcp_tool.mcp_session_manager
2025-11-21 10:08:03 -06:00
Joe Fernandez 2517d253e9 docs: MOVING files to /tools-custom/ (#926)
* docs: A2A guides, clearer nav for Go and Python

* docs: minor fixes for ADK quickstarts

* revert extra changes

* docs: MOVING files to /tools-custom/

- move files, update links and navigation
- add redirects
2025-11-12 17:08:36 +00:00
Ivan Cheung 43e654c002 Added go reference (#894)
Co-authored-by: ivanmkc <ivanmkc@google.com>
2025-11-06 16:49:35 -05:00
Joe Fernandez 37fee2598d docs: Tools, update language order, part3 (#896) 2025-11-06 13:13:18 -08:00
Ivan Cheung 8834593806 [ADK Go] Merging all Go docs from the private repo (#885)
* docs: Add Go language quickstart

* updates based on review comments

* fix tab stops

* update based on review comments

* sync with main

* update to tested version

* Added google_search snippet

* Fix: Address Go style guide issues in google_search.go

* Migrated to new API

* Fixed tool info in md file

* Added partial check

* Added function-tools sample

* Migrated to new API

* Added partial check

* Ran linter

* feat: add go fmt check

* Run go fmt only on changed files

* Added google_search snippet

* Fix: Address Go style guide issues in google_search.go

* Migrated to new API

* Added partial check

* Added function-tools sample

* Migrated to new API

* Added partial check

* Ran linter

* feat: add go fmt check

* Run go fmt only on changed files

* Feat: Add Golang example for LLM agents

* Added schema agent

* Added session support

* Migrated to new API

* Added back OutputKey

* Added missing snippets

* Moved snipped to its own package

* Minor cleanup

* Reverted llm-agents.md

* Added back correct changes to llm-agents.md

* Updated to newest API

* Ran linter

* WIP

* WIP: Added the rest of the agents

* Added sequential agent

* Migrated agents to new API

* Fixed snippet tags

* Updated parallel and sequential with OutputKey

* Updated loop agent

* Cleanup

* Fixed and ran linter

* Removed comment

* Ran linter

* Added custom agent snippets

* Migrated to new API

* Fixed incorrect info about channels since run returns an Iterator, not Channel

* Cleanup and renaming

* Ran linter

* Fixed md

* Added multi-agent docs

* Updated to use AgentTool

* Split snippets

* Added missing file

* Ran linter and fixed API

* Added Models snippets

* Migrated to new API

* Embedded imports

* Ran linter

* Added long running tool

* Ran linter and fixed API

* Switched to two-turn style

* Ran linter

* Added callback snippets

* Added back imports

* Added types of callbacks snippets

* feat(go): align callback snippets with other languages

* Ran linter and updated API

* Added tool callbacks

* Added artifact snippets

* Use story.pdf instead of random bytes

* Fixed issue with artifact loading

* Cleanup unneeded fixes

* Added back inadvertently removed GCS section

* Addressed PR comments

* Ran linter

* feat: Added context snippets

* Fixed callback signature

* Fixed additional callbacks

* Added remaining snippets

* Added conceptual runner example

* Removed duplicate code

* Clean up tags and imports

* Updated API

* Twaked text

* Ran linter

* Fixed broken API issues

* Updated to latest Go ADK API

* Added func param info

* Interleaved Py and Go

* Revert mistakes

* Removed extra newline

* Added example cloud run code and update md with Go (#41)

* Added example cloud run code and update md with Go

* Added a2a_agent_url and fixed future tense

* Moved Go before Java

---------

Co-authored-by: ivanmkc <ivanmkc@google.com>

* adding go snippets to runconfig docs

* realigning runconfig go examples with current state of adk-go.

* adding language support tags to individual runtime config fields

* removing unsupported supportcfc go examples

* removing unsupported streamingmode.bidi go snippets

* Added AgentTool examples (#31)

* Added AgentTool example

* Ran formatter

---------

Co-authored-by: ivanmkc <ivanmkc@google.com>

* adding initial go sessions.sessions snippets

* updating go session docs + session examples

* update go session snippets

* updating DatabaseSessionService language support tag

* cleaning up go vertex ai comments

* removing go.mod for session_management_example

* docs: add language support tags for Go

* initial go runtime sample updates

* fixing runtime go snippet formatting

* formatting updates to runtime go snippets

* updating runtime go examples to streamline to newer go features

* adding go snippets for events

* updating go snippets for events

* adding artifactdelta snippet for go

* minor java fixes, cleaning up go event.content

* Custom tools: Merging again  (#44)

* Added missing custom-tools snippets

* Split user_preference runner code

* Split more files

* Tweaks

* Split session into 1 and 2 and added artifact saving

* Fixed conflict

---------

Co-authored-by: ivanmkc <ivanmkc@google.com>

* Fixed tab issue with cloud-run md (#45)

Co-authored-by: ivanmkc <ivanmkc@google.com>

* adding initial go snippets for memory services

* updating go memory sample, adding python formatting in docs to clarify current support.

* removing go replace for memory example

* removing go.sum from memory_example

* fixing go formatting for memory example

* fixing go memory snippets to streamline examples in docs

* removing unnecessary go.mod for memory_example.go and snippet cleanup

* adding go session state snippets."

* adding additional go state examples for state injection

* fixing go formatting

* fixing language ordering on session/state.md; removing unnecessary go.mod files

* reworking error functions in go session state samples

* fixing go formatting on session state samples

* initial go snippets for safety tools

* fixing go snippet formatting in safety/index.md

* temp storing safety example

* cleaning up go snippets in safety docs; deferring safety go full example

* cleaning up go safety snippets

* Added link to Go API docs (#47)

Co-authored-by: ivanmkc <ivanmkc@google.com>

* Added a2a_basic sample (#46)

* Added a2a_basic sample

* Removed dummy LLMs

* Added md

Fix inaccuracies in md

Ran formatter

* Cleaned up index

---------

Co-authored-by: ivanmkc <ivanmkc@google.com>

* Reverted to proper ToC and added missing links (#48)

Co-authored-by: ivanmkc <ivanmkc@google.com>

* Added missing get-started/go.md (#50)

Co-authored-by: ivanmkc <ivanmkc@google.com>

* Added missing JSON tags for Go structs (#51)

* Added json tags

* Added jsonschema and json tags

---------

Co-authored-by: ivanmkc <ivanmkc@google.com>

* Renamed Golang to Go (#52)

Co-authored-by: ivanmkc <ivanmkc@google.com>

---------

Co-authored-by: Joe Fernandez <joefernandez@google.com>
Co-authored-by: ivanmkc <ivanmkc@google.com>
Co-authored-by: Toni Klopfenstein <tklopfenstein@google.com>
2025-11-06 14:13:13 -05:00
Joe Fernandez f12068a4bb docs: add language support tags to pages (#850)
* 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
2025-11-03 16:07:35 -08:00