14 Commits

Author SHA1 Message Date
Ali Adnan 882165a8b2 Fix route key mismatch in conditional-routing.py workflow example (#1996)
* Update conditional-routing.py

* Update tools_and_agent.py

* Update tools_and_agent.py

* Update tools_and_agent.py

---------

Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
2026-07-30 22:48:11 +00:00
Shahin Saadati a7c2f5c5f3 Added a sample to show how the conditional routing works. (#1792)
Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
2026-05-28 20:59:58 +00:00
Aditya Mulik 10ba6551f3 docs: refactor parallel agent example - clean imports and test code (#1213)
* docs: refactor parallel agent example - clean imports and test code

* Update parallel agent; bump to Gemini 2.5 Flash

---------

Co-authored-by: Kristopher Overholt <koverholt@gmail.com>
Co-authored-by: Kristopher Overholt <koverholt@google.com>
2026-02-02 18:42:00 -06:00
Aditya Mulik b3146d7e60 docs: refactor loop agent example - clean imports and test code (#1212)
* docs: refactor loop agent example - clean imports and test code

* Update loop agent; bump to Gemini 2.5 Flash

---------

Co-authored-by: Kristopher Overholt <koverholt@gmail.com>
Co-authored-by: Kristopher Overholt <koverholt@google.com>
2026-02-02 18:26:10 -06:00
Aditya Mulik 0222117d34 docs: refactor sequential agent example - clean imports and test code (#1211)
* docs: refactor sequential agent example - clean imports and test code

* removed constants comment

* fix typo

* Add GEMINI_MODEL constant comment to sequential agent

* Update to Gemini 2.5 Flash

* Clean up sequential agent code sample

---------

Co-authored-by: Kristopher Overholt <koverholt@gmail.com>
Co-authored-by: Kristopher Overholt <koverholt@google.com>
2026-02-02 18:02:40 -06:00
Aditya Mulik 15fb0b5910 Removed BaseAgent as it was redundant (#1199)
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>
2026-01-29 11:48:49 -06:00
Sultan Fariz 613079f70f fix: infinite loop in LoopAgent exit tool example (#1105)
Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
2026-01-15 17:03:37 -08: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
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
Lavi Nigam 7e0f29a9e8 parallel-agent-code-fix (#138) 2025-04-21 10:45:57 +05:30
Sita Lakshmi Sangameswaran 89f02777ff fix(loop-agent): update max_iterations param (#106) 2025-04-16 20:01:05 -05:00
Polong Lin 2ccd53a3d9 fix: update gemini 2.0 flash to latest model id for Live API (#47)
* fix: update gemini 2.0 flash to latest model id for Live API

* fix: use -flash for most pages instead of the live api model

* fix: wording andformatting

* fix: resolve merge conflict
2025-04-13 11:50:57 +01:00
Kristopher Overholt d3cec829c9 Initial commit of Agent Development Kit 2025-04-09 08:49:23 -07:00