Skip to content

feat: add suport for running an app instead of an agent - #35

Open
AndyStan112 wants to merge 1 commit into
trendmicro:mainfrom
AndyStan112:Feat/support_app
Open

feat: add suport for running an app instead of an agent#35
AndyStan112 wants to merge 1 commit into
trendmicro:mainfrom
AndyStan112:Feat/support_app

Conversation

@AndyStan112

Copy link
Copy Markdown

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

  • [ x] Unit tests added/updated
  • [ x] All tests pass locally (unittest)
  • [ x] Type checks pass (mypy)
  • [ x] Lint passes (ruff)
  • [ x] Security scan passes (bandit)

Security & Compliance

  • [ x] No secrets or credentials added
  • [ x] Dependencies reviewed (or covered by Dependabot)
  • [ x] Docs updated (README/SECURITY/CHANGELOG as applicable)

Checklist

  • [ x] Linked issue (if any)
  • Self-reviewed and addressed comments
  • Ready for review

@AndyStan112

Copy link
Copy Markdown
Author

@DennySORA

Copy link
Copy Markdown
Contributor

@Jimmy-CM-LIN Can you help to review.
I've moved on from my role, so someone else will be taking over the maintenance, Thank.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants