Repository navigation
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Please take a look at the failed github workflows and address the issues. I will review your PR after. |
happyhuman
left a comment
There was a problem hiding this comment.
Please fix the formatting issues first.
|
This pull request has had no activity for 60 days, so it has been labelled If it is still wanted, a comment or a push is enough to reset the clock. Otherwise it will be closed automatically in 30 days. Nothing about this is final — a closed pull request reopens with one click, and your commits are untouched on your own branch. Maintainers: apply |
|
This pull request isn't ready for review yet. I removed the review request for Failing checks (4)
Fix the failing checks. Once everything is green I will re-request the review automatically, so there is no need to ping anyone. This is re-checked every 15 minutes. Applied by the review gate ( |
| import importlib | ||
| import os | ||
|
|
||
| os.environ.setdefault("E2A_API_KEY", "synthetic-agent-scoped-key") |
There was a problem hiding this comment.
[MINOR] env read carries a hardcoded default (second argument is a hardcoded default); 6 occurrence(s) across 2 file(s). Defaults belong in .env.example, not in the code (contrib/python/authenticated-email-agent/tests/test_runnability.py:19; and 5 more)
| GOOGLE_API_KEY=<your-google-api-key> | ||
|
|
||
| # ADK model configuration. | ||
| MODEL_NAME=gemini-3.5-flash |
There was a problem hiding this comment.
[MINOR] Perhaps this should be gemini-3.7-flash? AGENTS.md:40 lists that as the current default, and gemini-3.5-flash appears across three places in this recipe.
| @@ -0,0 +1,8 @@ | |||
| # Agent-scoped credential for one e2a inbox. | |||
| E2A_API_KEY=<your-agent-scoped-e2a-api-key> | |||
There was a problem hiding this comment.
[MINOR] Can we use <TODO: update-this-value> for this placeholder?
| E2A_API_KEY=<your-agent-scoped-e2a-api-key> | ||
|
|
||
| # Google AI Studio credential used by ADK. | ||
| GOOGLE_API_KEY=<your-google-api-key> |
There was a problem hiding this comment.
[MINOR] same issue as above
| connection_params=StreamableHTTPConnectionParams( | ||
| url=E2A_MCP_URL, | ||
| headers=_authorization_headers(), | ||
| timeout=30, |
There was a problem hiding this comment.
[MINOR] Is there a reason 30 is hardcoded inline here instead of being defined as a named constant?
| toolset = agent.root_agent.tools[0] | ||
| assert toolset.tool_filter == list(agent.E2A_TOOL_FILTER) | ||
| assert agent._authorization_headers() == { | ||
| "Authorization": "Bearer synthetic-agent-scoped-key" |
There was a problem hiding this comment.
[MINOR] Perhaps this should use os.environ["E2A_API_KEY"] instead of hardcoding the synthetic key string?
| "credential scope is `agent`", | ||
| "explicit instruction", | ||
| "verify a domain, not a person", | ||
| "list_messages", |
There was a problem hiding this comment.
[MINOR] duplicate tool names from agent.E2A_TOOL_FILTER
|
Thank you for the contribution jjashouz, but the repo is moving to be more feature oriented than use case oriented. We are moving away from holding numerous use case samples that use the same core features and use a larger range of ADK and GCP features and tools. |
Summary
Adds a runnable Python recipe that connects a Google ADK agent to one
authenticated e2a email inbox through the hosted Streamable HTTP MCP endpoint.
The recipe demonstrates:
pending_reviewas a held outcome that must not beresent.
Recipe
contrib/python/authenticated-email-agentValidation
uv run validate all contrib/python/authenticated-email-agentuvx ruff check app testsuvx ruff format --check app testsuv run pytest --ignore=tests/integration --ignore-glob="**/test_integration.py"All checks pass locally (4 tests). The test suite is offline and does not use
live Gemini or e2a credentials.
Contributor
Human contributor and recipe owner: Josh Zhang (
@jiashuoz), Token Canopy.The Google Contributor License Agreement may still need confirmation before
this draft is marked ready for review.