Commit Graph

5 Commits

Author SHA1 Message Date
Rohit c4deb8e230 Add internal documentation link to "Output Key" section of LLM Agent docs (#357)
Updated the Markdown link to point directly to the relevant section (output_key) within the LLM Agent documentation, instead of linking to the top of the page.

Co-authored-by: Lavi Nigam <98014943+lavinigam-gcp@users.noreply.github.com>
2025-06-02 22:22:58 +05:30
Megan O'Keefe 0887973bed feat: Initializes Java documentation (#277) 2025-05-20 12:10:27 -04:00
Kavin Kumar B b959c99326 fix: redundant only's in sequential agent (#253) 2025-05-13 19:26:35 +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
Kristopher Overholt d3cec829c9 Initial commit of Agent Development Kit 2025-04-09 08:49:23 -07:00