feat: add suport for running an app instead of an agent - #35
Open
AndyStan112 wants to merge 1 commit into
Open
Conversation
Author
Contributor
|
@Jimmy-CM-LIN Can you help to review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Added support for running an app instead of an agent as is the new way recommended by google.
Why
Because some features such as event compacting are placed at the app level, not the agent level. Besides that the maintainers of adk recommend using app when possible instead of agent. Quote from their documentation:
Developers should provide either an `app` instance or both `app_name` and `agent`. When `app` is provided, `app_name` can optionally override the app's name (useful for deployment scenarios like Agent Engine where the resource name differs from the app's identifier). However, `agent` should not be provided when `app` is provided. Providing `app` is the recommended way to create a runner.There is also an issue requesting this feature already:
#31
How
Since the abi is the same regardless of passing Agent or App we can get away with just placing a mutual exclusion on the 2 parameters and passing the one that isn't None as parameter for the Runner.
Tests
unittest)mypy)ruff)bandit)Security & Compliance
Checklist