Commit Graph

105 Commits

Author SHA1 Message Date
Mandy Chan 6afd0d37ba fix: Update agent.py (#611)
Fixes #176 

Use AgentTool for subagents
2025-08-14 18:49:53 -07:00
Terrence Ryan 43a58a2a05 fix: Prevent overwriting of function response (#607)
In the human-in-the-loop example, the long_running_function_response
variable could be overwritten with `None` by a subsequent event that
did not contain a function response. This would cause the logic that
depends on the response to fail.

Fixes #375

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
2025-08-14 11:01:19 -07:00
Mandy Chan 9bd2d1bd29 fix: add code example for skip_summarization (#595)
fix issue https://github.com/google/adk-docs/issues/531
2025-08-13 16:04:04 -04:00
Kaz Sato 98d2a5828b fix: updated adk version to 1.10.0 (#589)
* fix: updated adk version to 1.10.0

fix: updated adk version to 1.10.0, and confirmed the demos work properly.

* fix: add session resumption

fix: add session resumption

* fix: adding session resumption to the docs.

fix: adding session resumption to the docs.
2025-08-12 10:23:42 -07:00
ASHISH JOHNSON df4874441a fix: await not correctly applied to example code (#437)
* fix: applied `await` on the `session_service.create_session()` call

* added license to the code

---------

Co-authored-by: Sita Lakshmi Sangameswaran <sitalakshmi@google.com>
2025-08-09 14:35:28 -07:00
Kaz Sato 7bafd1eb2e fix: upgraded to adk 1.9.0 and removed unnecessary infinite loop (#554)
fix: upgraded to adk 1.9.0 and removed unnecessary infinite loop
2025-08-04 15:26:14 +09:00
shruti-mantri 66e6c937d3 fix: llm-agents capital_agent.py example failing due to missing awaits (#550)
* fix: llm-agents capital_agent.py example failing due to missing awaits

* add license header to the code
2025-08-01 11:47:25 +05:30
Sita Lakshmi Sangameswaran b40accd5cb fix(state): update state key references in instructions (#493)
* fix: update state key references

* update docs to include info on state injection in instructions

* update java snippet

* add docs on InstructionProvider

* add tooltip on direct state modification

---------

Co-authored-by: Lavi Nigam <98014943+lavinigam-gcp@users.noreply.github.com>
2025-07-11 09:42:18 -04:00
Shobhit Singh ae18ef6d13 docs: fix the usage of BuiltInCodeExecutor in code snippets (#503)
* docs: fix the usage of `BuiltInCodeExecutor` in code snippets

* revert stray spaces

---------

Co-authored-by: Lavi Nigam <98014943+lavinigam-gcp@users.noreply.github.com>
2025-07-11 18:07:07 +05:30
Anthony Z 8400336372 feat: Update express mode code sample (#494)
* Update quickstart.md

* Create express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update mkdocs.yml

* Update mkdocs.yml

* Update session.md

* Update mkdocs.yml

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update quickstart.md

* Update express-mode.md

* Add files via upload

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Delete examples/python/notebooks/express-mode-weather-agent.ipynb

* Add files via upload

* Delete examples/python/notebooks/express-mode-weather-agent.ipynb

* Add files via upload

* Update express-mode-weather-agent.ipynb

* Update quickstart.md

* Update express-mode.md

* Update express-mode.md

* Update mkdocs.yml

* Delete examples/python/notebooks/express-mode-weather-agent.ipynb

* Add files via upload

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update mkdocs.yml

* Update express-mode.md

---------

Co-authored-by: Lavi Nigam <98014943+lavinigam-gcp@users.noreply.github.com>
2025-07-11 14:51:52 +05:30
Anthony Z 19a026393e feat(docs): Add vertex express mode documentation for Agent Engine (#439)
* Update quickstart.md

* Create express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update mkdocs.yml

* Update mkdocs.yml

* Update session.md

* Update mkdocs.yml

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Update quickstart.md

* Update express-mode.md

* Add files via upload

* Update express-mode.md

* Update express-mode.md

* Update express-mode.md

* Delete examples/python/notebooks/express-mode-weather-agent.ipynb

* Add files via upload

* Delete examples/python/notebooks/express-mode-weather-agent.ipynb

* Add files via upload

* Update express-mode-weather-agent.ipynb

* Update quickstart.md

* Update express-mode.md

* Update express-mode.md

* Update mkdocs.yml

---------

Co-authored-by: Lavi Nigam <98014943+lavinigam-gcp@users.noreply.github.com>
2025-07-08 17:58:29 +05:30
Gururaj Deshpande ff454ac1c9 fix: change call_agent to call_agent_async (#450)
* fix: change call_agent to call_agent_async

* added await in storyflow where missing

* updated callbacks and storyflow with await and user comment

* fixed more

* added licencse header

---------

Co-authored-by: Lavi Nigam <98014943+lavinigam-gcp@users.noreply.github.com>
Co-authored-by: Lavi Nigam <lavinigam@google.com>
2025-06-28 00:10:12 +05:30
Kaz Sato ac0a572630 fix: add support for non-Vertex AI environment (#453)
- fix: add support for non-Vertex AI environment
- updated the model to gemini 2.5 flash
2025-06-27 20:24:22 +05:30
Shobhit Singh 36911713e9 docs: document built-in BigQuery tools (#449)
* Mention BigQuery tools among built-in tools

* Create bigquery.py

* Update bigquery snippet with working code
2025-06-25 13:06:51 -07:00
Kaz Sato a687c301b6 fix: update the notebook for 1.4.2 (#435)
fix: update the notebook for 1.4.2

Co-authored-by: Kristopher Overholt <koverholt@gmail.com>
2025-06-23 11:18:18 -05:00
George Li e6ce373edc docs: adk tutorial readme link fix (#387)
Co-authored-by: Kristopher Overholt <koverholt@gmail.com>
2025-06-10 05:50:03 -05:00
Kaz Sato 290238b0bb fix: upgraded to 1.2.1, and added a troubleshooting tip (#392)
fix: upgraded to 1.2.1, and added a troubleshooting tip
2025-06-10 15:37:30 +09:00
Lavi Nigam 33b60275d3 fix(tools): Correct async handling in LRO and HTIL sessions (#374)
The LRO (Long-Running Operation) and HTIL (Human-in-the-Loop) tools were failing to execute properly due to an unhandled promise.

The `session_service.create_session` method is asynchronous but was not being awaited, causing race conditions. This change adds the required `await` to ensure proper execution flow.

Additionally, the related documentation has been updated to reflect the corrected code.
2025-06-06 18:21:10 +09:00
Kaz Sato 31d79515f9 fix: added audio output buffering (#371)
fix: added audio output buffering. This reduces CPU usage at the browser significantly.

Co-authored-by: Lavi Nigam <98014943+lavinigam-gcp@users.noreply.github.com>
2025-06-06 11:27:44 +05:30
Yunus Durmus 5f1461834e fix: stop the audio play whenever an interrupt message arrives (#362) 2025-06-02 18:12:39 +09:00
hsuyuming baaa3394c4 fix: add missing asyncio package (#191)
* fix: add missing asyncio package

* move import statement to line 222

---------

Co-authored-by: Lavi Nigam <98014943+lavinigam-gcp@users.noreply.github.com>
2025-05-30 14:10:21 +05:30
Yagnesh M. Bhadiyadra 66e92420c9 fix (docs): Add import statements for loop agents example. (#264)
The loop agents example snippet did not have imports, which could break the code when copied directly and executed.

Co-authored-by: Lavi Nigam <98014943+lavinigam-gcp@users.noreply.github.com>
2025-05-30 12:25:29 +05:30
Kaz Sato 3491df6790 fix: suppress pydantic warnings (#338)
fix: suppress pydantic warnings

Co-authored-by: Lavi Nigam <98014943+lavinigam-gcp@users.noreply.github.com>
2025-05-30 11:57:58 +05:30
Lavi Nigam 5a690cf74a Pjchender/main - added license header (#339)
* doc: update openapi tool for v1.0.0

* added license header

---------

Co-authored-by: pjchender <pjchender@gmail.com>
2025-05-30 11:55:13 +05:30
Aaron Chen 79c0f65f5f doc: update openapi tool for v1.0.0 (#311)
Co-authored-by: Lavi Nigam <98014943+lavinigam-gcp@users.noreply.github.com>
2025-05-30 11:54:27 +05:30
Keith Rozario 4ff725f845 fix: after tool callback example (#289)
* fix: after tool callback example

* added license header and update code with async functions

---------

Co-authored-by: Keith Rozario <krozario@google.com>
Co-authored-by: Lavi Nigam <98014943+lavinigam-gcp@users.noreply.github.com>
Co-authored-by: Lavi Nigam <lavinigam@google.com>
2025-05-30 11:33:18 +05:30
Kaz Sato 1131778ade fix: Added SSL CERT setting and code snippets (#336)
* fix: Added SSL CERT setting and code snippets

fix: Added SSL CERT setting and code snippets

* fix: update the model name to -exp

fix: update the model name to -exp

* fix: changed model names on the troubleshooting tips

fix: changed model names on the troubleshooting tips
2025-05-30 08:13:12 +05:30
Lavi Nigam ce11a0ffc0 fix(tutorial): Fixing multiple reported issues (#334)
* fix(tutorial): Correct say_hello tool logic, update LLM models, and ensure async session creation

This commit addresses several issues and updates within the ADK agent team tutorial (adk_tutorial.ipynb) and its corresponding documentation (agent-team.md).

Notebook Updates (adk-tutorial.ipynb):
- Ensured all `SessionService.create_session` calls are `await`ed for proper asynchronous operation throughout the notebook.
- Updated Anthropic model to `claude-sonnet-4-20250514` and OpenAI model to `gpt-4.1`, with commented alternatives for flexibility.
- Added LiteLLM documentation links for model references.
- Resolved the 'Hello None' issue in Step 3 by modifying the `say_hello` tool to correctly handle optional name arguments and prevent the `Default value is not supported` warning with Gemini models.
- Tested and confirmed notebook compatibility with `google-adk==1.0.0`.

Page Update (agent-team.md):
- Synchronized `agent-team.md` with all notebook changes to ensure documentation accuracy and reflect the latest updates.

* fix(tutorial): Refine CLI/Web UI agent team tutorial and update content

This commit introduces several fixes and improvements to the Python file-based version of the ADK agent team tutorial, aligning it for use with `adk web`, `adk run`, and `adk api_server`.

Key changes to the `adk-tutorial` Python files:
- Validated and ensured all tutorial steps are compatible with `google-adk==1.0.0`.
- Synchronized Python file content with the latest changes from the main Colab notebook version.
- Corrected `step2_anthropic.py`: agent name, description, and instruction strings now accurately reflect Anthropic context (previously used GPT-related strings).
- Updated model identifiers: `anthropic/claude-sonnet-4-20250514` in `step2_anthropic.py` and `openai/gpt-4.1` in `step2_gpt4.py`.
- Performed general cleanup and refactoring in `step3_agent_team.py`.
- Added example queries directly within the agent Python files for Steps 1, 2, 3, 5, and 6 to facilitate easier testing by users.
- Removed `step4_state_personalization.py` as its demonstration of session state manipulation (especially direct InMemorySessionService updates) is better suited for an interactive notebook environment.

README.md Updates:
- Added a note explaining the removal of Step 4 and directing users to the interactive notebook version for that specific content.
- Included references to the newly added sample queries in the agent Python files, guiding users on how to test the agent's functionalities.
2025-05-29 21:03:20 +05:30
Kaz Sato c638834aeb fix: add SSE Streaming sample (#332)
add SSE Streaming sample
2025-05-29 17:44:46 +09:00
Kaz Sato b721bceef3 fix: to support adk 1.0.0 (#324)
to support adk 1.0.0
2025-05-28 18:07:30 +09:00
Megan O'Keefe 0887973bed feat: Initializes Java documentation (#277) 2025-05-20 12:10:27 -04:00
Kaz Sato 77e55137b5 feat: Add e-commerce recommendation notebook intro (#258)
* feat: Add e-commerce recommendation notebook intro

Add e-commerce recommendation notebook intro

* fix: added a video link

---------

Co-authored-by: Kristopher Overholt <koverholt@gmail.com>
2025-05-16 22:44:24 -05:00
Zike Yang 51dfbb6f57 fix: fix hunman_in_the_loop example (#240)
Co-authored-by: Kristopher Overholt <koverholt@gmail.com>
2025-05-12 10:21:11 -05:00
刘泽森 95727a5324 docs(examples): update commands and links in ADK tutorial README (#239)
Correct `adk run` and `adk api_server` commands by removing script-specific references. Adjust documentation link titles and URLs to point to updated sections for clarity and accuracy.

Co-authored-by: Kristopher Overholt <koverholt@gmail.com>
2025-05-12 10:19:06 -05:00
Zack Akil 7727dacc5b added interactive conversation within notebook (#241)
Co-authored-by: Kristopher Overholt <koverholt@gmail.com>
2025-05-12 10:12:02 -05:00
Kaz Sato 6d8d499479 feat: add audio Streaming sample (#244)
* feat: add audio Streaming sample

add audio Streaming sample

* fix: added license headers

added license headers
2025-05-12 10:09:30 -05:00
Kaz Sato 99e3903391 feat: Add shop agent notebook (#236)
* feat: Add shop agent notebook

This is a supplemental notebook sample for upcoming video created with Sita.

* fix: add mermaid code for the diagram

add mermaid code for the diagram

---------

Co-authored-by: Sita Lakshmi Sangameswaran <sitalakshmi@google.com>
2025-05-12 12:47:34 +09:00
seanzhou1023 e62f7565d2 fix: fix long running tool docs (#229)
Co-authored-by: Sean Zhou <seanzhougoogle@google.com>
2025-05-07 13:37:03 -05:00
Jinyong Shin 8ebdcf4876 feat: Docs improvement: FunctionTool (#212)
* fix: improvement docs according to issue #210

* fix: remove duplicated(?) comments

---------

Co-authored-by: Kristopher Overholt <koverholt@gmail.com>
2025-05-06 09:10:42 -05:00
Kavin Kumar B beec37aefc fix: missing tool context import (#196)
* fixed the missing import

* fix: missing tool context import

---------

Co-authored-by: Kristopher Overholt <koverholt@gmail.com>
2025-04-30 02:00:43 -05:00
nikkie 46b774fd36 fix: typo in youtube-shorts-assistant scriptwriter instruction (#175)
Co-authored-by: Sita Lakshmi Sangameswaran <sitalakshmi@google.com>
2025-04-25 16:00:04 -04:00
Lavi Nigam 79546252bf feat: Improve workflow agent examples (Loop, Parallel, Sequence) (#157)
* feat: Improve workflow agent examples (Loop, Parallel, Sequence)

This commit enhances the examples for LoopAgent, ParallelAgent, and SequenceAgent to provide clearer usage patterns, demonstrate key features, and improve developer experience.

Agent-Specific Fixes & Enhancements:

LoopAgent:

Adds an example demonstrating CheckCondition usage, showing both max_iterations and custom condition-based termination.
Fixes google/adk-docs#67, google/adk-docs#148, google/adk-python#315

ParallelAgent:

Adds an example showing how to merge outputs from parallel branches using a subsequent SequentialAgent and agent states.
Demonstrates state/output control after parallel execution.
Fixes google/adk-docs#142

SequenceAgent:

Clarifies the example to show explicit use of agent states within instructions for passing outputs between sequential steps.
Fixes google/adk-docs#150

General Example Improvements (Applied across all three):

Updated examples to use InMemoryRunner.
Adopted new, clearer instruction prompt templates.
Included runner.run_async calls in standalone .py files to demonstrate programmatic execution outside adk web.
Enhanced InMemoryRunner print output for better visibility of individual agent outputs during execution.
Added commented-out asyncio.run() calls in .py files for environments requiring explicit async loop management.
Included multiple example queries in .py files for testing.
Added "Part of agent.py -->" comment for easy copy-pasting into agent.py for use with adk web.
Added copyright and license headers for each file.

* fix: instructions for LoopAgent is cleaned up and removed backticks. Changed the init to include initial state in the ---8<

* feat(LoopAgent): add exit_loop tool for controlled exit

Introduces the `exit_loop` tool, enabling the agent to programmatically trigger an exit from its processing loop based on internal logic or tool usage.

fix(LoopAgent): correct state f-string formatting

Resolves runtime errors caused by incorrect f-string formatting when state variables were used within the agent's execution flow.

chore: Temporarily comment out session/runner setup

Comments out initialization code related to session, runner, and agent interaction for debugging/refactoring purposes. This section should be revisited.
2025-04-25 17:46:02 +05:30
Alok Pattani d4452bf1ef Update small temp error in sample agent.py (#162) 2025-04-24 15:42:13 -05:00
Lavi Nigam a4057576ea fix: tutorial section overhaul and bug fixes (#143)
* fix: tutorial section overhaul and bug fixes
- Tutorial section is moved out of getting started and is a seperate section
- Fixed a sentence in getting-started page that still showed “google search”
- Given we will have more tutorials as part of docs, now we have sub-sections with the tutorial name
- For weather agent team - fixed issues pointed out in #118 #135
    - It now includes code for asynio in the notebook
    - It also now has .py file to run it through adk web
    - Step 2 is now optional and not connected to other steps. So user can follow other steps if they choose to
    - There is disclaimer at the top - for different method to run the code
    - The text on the page is now synced with notebook
    - Collab and social link are updated with new changes in folder.

* added a redirect in the redirect_maps

* adding license headers in the code for tutorial for .py files
2025-04-23 09:43:32 +05:30
Sita Lakshmi Sangameswaran 5ce661de6c samples: add a sample getting started agent (#108)
* samples: add a sample getting started agent

* format acc to review comments

* add copyright headers

---------

Co-authored-by: Sampath Kumar <sam1990kumar@gmail.com>
2025-04-22 10:40:52 -04:00
Lavi Nigam 7e0f29a9e8 parallel-agent-code-fix (#138) 2025-04-21 10:45:57 +05:30
Lavi Nigam d213440d30 callback-docs-fix (#132) 2025-04-20 08:40:21 +05:30
Sita Lakshmi Sangameswaran 89f02777ff fix(loop-agent): update max_iterations param (#106) 2025-04-16 20:01:05 -05:00
Rebenkov Aleksey 496fcf3dec Fixed instruction for root agent to avoid summarization before passing text to summary agent (#98)
Co-authored-by: Rebenkov Aleksey <aleksey.rebenkov@hindsiteinc.com>
2025-04-16 03:04:26 -05:00
adars124 0a66987547 docs: fix agent tool example doc (#93)
Add  instead of  in the Runner
2025-04-15 22:02:27 -05:00