Repository navigation
feat(agentregistry): add ADK and Agent Engine samples with CI scaffolding - #15002
Conversation
|
Here is the summary of changes. You are about to add 5 region tags.
This comment is generated by snippet-bot.
|
There was a problem hiding this comment.
Code Review
This pull request introduces Python samples for the Google Cloud Agent Registry using the Agent Development Kit (ADK) and Vertex AI Agent Engine, including sample scripts, tests, and configuration files. The review feedback highlights several improvement opportunities: replacing httpx.AsyncClient with synchronous httpx.Client inside a with statement in synchronous functions, utilizing self.creds.before_request for robust credential application, and updating the Python test configuration in noxfile_config.py to align with the minimum supported Python versions of the project's dependencies.
evelyn-goo
left a comment
There was a problem hiding this comment.
Thanks so much for setting up the scaffolding and migrating these samples, Beth!
evelyn-goo
left a comment
There was a problem hiding this comment.
Thanks, Beth! Looks great, just adding a comment flagged by Jetski
NimJay
left a comment
There was a problem hiding this comment.
Overall, looks good to me.
I left a few comments (some optional): but you can address those in a follow-up PR.
| # ("projects/{project_id}/locations/{location}/agents/AGENT_ID") format. | ||
| def clone_remote_agent( | ||
| agent_name: str = "projects/PROJECT_ID/locations/LOCATION/agents/AGENT_ID", | ||
| model: str = "gemini-2.5-flash", |
There was a problem hiding this comment.
Suggestion: 2.5 flash is reaching end-of-life tomorrow: https://aistudio-preprod.corp.google.com/docs/deprecations#gemini-2.5-flash-models
We may want to update this to 3+.
| filter_str: str = 'skills.tags:"translation"', | ||
| ) -> tuple[dict[str, Any], RemoteA2aAgent, McpToolset]: | ||
| """Discovers agents by skill tag and fetches a remote agent and MCP toolset.""" | ||
| project_id = os.environ.get("GOOGLE_CLOUD_PROJECT") |
There was a problem hiding this comment.
Nit (feel free to ignore): Ideally the Google Cloud Project ID would be part of the sample function's params. See https://googlecloudsamples.github.io/catalog/docs/effective-samples/author-samples/#minimal-arguments
Description
Adds CI scaffolding, README, and core ADK / Vertex AI Agent Engine samples for Agent Registry under
agentregistry/adk/(PR A of migrating inline Agent Registry documentation snippets to GitHub; internal tracking:b/581932768).Files added / updated
agentregistry/README.md: Quickstart, sample index, and test environment variable documentation.agentregistry/adk/requirements.txt&requirements-test.txtagentregistry/adk/noxfile_config.py&conftest.pyagentregistry/adk/compose_multi_agent.py+compose_multi_agent_test.py(agentregistry_adk_initialize_client,agentregistry_adk_compose_multi_agent)agentregistry/adk/clone_remote_agent.py+clone_remote_agent_test.py(agentregistry_adk_clone_remote_agent)agentregistry/adk/discover_agents_and_toolsets.py+discover_agents_and_toolsets_test.py(agentregistry_adk_discover_agents_and_toolsets)agentregistry/adk/deploy_agent_runtime.py+deploy_agent_runtime_test.py(agentregistry_deploy_agent_runtime)API & Test Infrastructure Request
To run the integration tests in CI on the shared test projects (
python-docs-samples-tests-310throughpython-docs-samples-tests-314, specificallypython-docs-samples-tests-314), please:agentregistry.googleapis.com(and verifyaiplatform.googleapis.comis enabled).AGENTREGISTRY_TEST_AGENT_IDAGENTREGISTRY_TEST_MCP_SERVER_IDAGENTREGISTRY_TEST_STAGING_BUCKETfordeploy_agent_runtime_test.py(Tests skip cleanly when these fixture environment variables are not yet set.)
Checklist
Testing
agentregistry.googleapis.comenablement and fixture setup in the shared test project.)Compliance & Style
Post-Approval Actions