create_session is async; calling it without await at module scope
produces an un-awaited coroutine. Wrap with asyncio.run, matching the
pattern used in other built-in tool examples.
* fix: remove broken relative import in rag_engine example
The snippet imported from a non-existent .prompts module and used an
undefined return_instructions_root(). Replaced with a self-contained
instruction string so the knowledge-engine example runs standalone.
* Apply suggestion from @joefernandez
---------
Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
* fix: await create_session and add license header in agent_cli example
create_session is async; the un-awaited coroutine caused a RuntimeError
when session.id was accessed. Also added the missing Apache 2.0 header.
* Apply suggestion from @joefernandez
---------
Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
The BigQuery integration page still imports from google.adk.tools.bigquery,
which now raises a DeprecationWarning pointing at
google.adk.integrations.bigquery. Update all five auth snippets and the
included sample to the new path.
The sample also wrapped session_service.create_session() in asyncio.run(),
which blows up in Colab and other notebooks where a loop is already running.
Restructure it around an async main() that awaits create_session() and
iterates runner.run_async(), matching the pattern the other built-in tool
snippets already use.
Bug: b/559149787
Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
- Add pip install "google-adk[gcp]" step to Eventarc Prerequisites.
- Clarify datacontenttype inference defaults and specify application/json in snippet prompt.
- Update Runtime Lambda table entry to use ctx.session_id and note support for payload and Context.
- Update OMIT table entry to list all mandatory attributes (type, source, bus, id, specversion).
Addresses feedback in https://github.com/google/adk-docs/pull/2045#issuecomment-5184438669
Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
InMemorySessionService.create_session is async, so calls without await
return unawaited coroutines and the sessions are never created, causing
SessionNotFoundError on subsequent runner.run_async() calls.
Co-authored-by: Kristopher Overholt <koverholt@google.com>
* #1029 - 8 vector_store_similarity_search and SpannerVectorStoreSettings
Added vector_store_similarity_search to SpannerToolset. SpannerVectorStoreSettings is introduced to support this feature.
* Update spanner.md
* Update spanner.md
Applied feedback. Additionally, reviewed the phrasing in the intro for clarity and concision and did some minor formatting edits.
* Fix wrapping, missing import, trailing whitespace, formatting fixes
* Restructure Spanner page: add intro, section headings, reorder vector search
* Add experimental tags/notes to corresponding integration pages
---------
Co-authored-by: Kristopher Overholt <koverholt@google.com>
* Fix Go multi-tool tutorial snippet to include two tools
* Update model string in multi-tool snippets to gemini-flash-latest in Python, TS, Java
---------
Co-authored-by: Kristopher Overholt <koverholt@google.com>
The memory docs and the express-mode weather agent notebook referenced
`adk.tools.preload_memory_tool.PreloadMemoryTool()`, which raises
`AttributeError: module 'google.adk.tools' has no attribute
'preload_memory_tool'` because the submodule is not exposed via the
package's lazy `__getattr__`.
Use the documented public API `from google.adk.tools import preload_memory`
and pass the `preload_memory` instance directly, consistent with how the
sibling `load_memory` tool is shown in the same page.
Fixes#1771
Co-authored-by: Kristopher Overholt <koverholt@google.com>
* docs: update GOOGLE_GENAI_USE_VERTEXAI to GOOGLE_GENAI_USE_ENTERPRISE in configs and models
* docs: update GOOGLE_GENAI_USE_VERTEXAI in deployment and setup guides
* docs: update GOOGLE_GENAI_USE_VERTEXAI and Client parameter in integrations and streaming docs
* docs: update GOOGLE_GENAI_USE_VERTEXAI in tutorials and examples
---------
Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
* fix: working code for the new version
* fix: typos
* fix: lint
* Fix import paths, remove trailing underscore from prefix, and replace Runner with InMemoryRunner/run_debug for a self-contained runnable example.
---------
Co-authored-by: Kristopher Overholt <koverholt@google.com>
* Add ambient agents documentation
Document how to build event-driven ambient agents using ADK trigger
endpoints and the /run endpoint. Covers Pub/Sub, Eventarc (Standard
and Advanced), Cloud Scheduler, concurrency control, retry logic,
session lifecycle, and deployment to Cloud Run.
* Address reviewer feedback: clarify event processing flow
- Move "How events are processed" higher, right after trigger endpoints
intro, so the mental model comes before setup instructions
- Reword step 5: explicitly describe status code behavior (200 = ack,
500 = retry) instead of vague "determines whether to retry"
- Clarify that trigger endpoints auto-create sessions without needing
the --auto_create_session flag
- Restructure heading hierarchy under "Using trigger endpoints"
* Address reviewer feedback from koverholt
- Use named sections (--8<-- [start/end]) in code snippets to hide
license headers in doc embeds
- Change model to gemini-flash-latest alias
- Restructure: show example agent first, then enable instructions,
then "Try it locally" with step-by-step commands and curl test
- Fix port consistency (curl uses 8000 matching adk api_server default)
- Add curl example for /run endpoint
---------
Co-authored-by: Kristopher Overholt <koverholt@google.com>
* 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
While the check_and_transfer function is wrapped as a FunctionTool named as escalation_tool , this name is later on remains unused. This fix should clarify the example using the right name.
Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
Was wondering if BaseAgent was used in the code, since it's redundant, I thought of removing it.
Co-authored-by: Kristopher Overholt <koverholt@google.com>
* fix(docs): Update bigquery.py creds
I required this to make it work
application_default_credentials, _ = google.auth.default()
* Update examples/python/snippets/tools/built-in-tools/bigquery.py
---------
Co-authored-by: Kristopher Overholt <koverholt@google.com>
* doc: fixing typos in various files
* Update code-exec-agent-engine.md
---------
Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
* Add navigation sections to docs
* Move two pages
* Move more sections
* Update nav
* Fix whitespace, newlines
* Fix section headings
* Fix top level headings
* Move Technical Overview in nav
* Change Testing page to API Server page
* Reorder sub-pages in Components section
* Add Home as top level nav; remove redundant site title
* Update links to API server docs page
* Formatting
* Formatting
* Fix the code sample of using BigQuery with the application default credentails
* Update bigquery.py
---------
Co-authored-by: Kristopher Overholt <koverholt@google.com>
Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
* fix: updated the article and code to adk 1.17.0
fix: updated the article and code to adk 1.17.0
* fix: removing the outdated code from the index
fix: removing the outdated code from the index
* fix: removing 404 link
fix: removing 404 link