Skip to content

fix: resolve Google ADK agent Playground and production issues - #263

Merged
Pujarini Mohapatra (biswapm) merged 16 commits into
mainfrom
fix/google-adk-agent
Apr 6, 2026
Merged

fix: resolve Google ADK agent Playground and production issues#263
Pujarini Mohapatra (biswapm) merged 16 commits into
mainfrom
fix/google-adk-agent

Conversation

@biswapm

@biswapm Pujarini Mohapatra (biswapm) commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
  • Fix copyright headers in main.py, agent.py, and mcp_tool_registration_service.py to use standard # Copyright (c) Microsoft Corporation. / # Licensed under the MIT License. format
  • Remove unused load_configuration_from_env import from main.py
  • Fix host binding to use 0.0.0.0 for Azure (WEBSITE_SITE_NAME), GCP Cloud Run (K_SERVICE), or explicit ENVIRONMENT=production; defaults to localhost for local dev
  • Fix JWT exp parsing to use urlsafe_b64decode and only add padding when len(payload) % 4 != 0
  • Remove USE_AGENTIC_AUTH from .env.template (unused variable not referenced in code)

…241)

- Cap `requires-python` at <3.14 to prevent pydantic-core build failure
  (PyO3 v0.24.1 does not support Python 3.14)
- Add uv override to cap lancedb at <=0.30.0 on Windows; lancedb 0.30.1+
  only ships Linux/macOS wheels and has no win_amd64 distribution

Fixes #241
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Fix AUTH_HANDLER_NAME env-driven pattern — empty = anonymous/Playground, AGENTIC = production
- Fix expired BEARER_TOKEN detection via JWT exp claim to prevent OBO hang
- Skip MCP tool init when no token and no auth handler (avoids MCP session errors)
- Add 10s timeout on MCP tool initialization with graceful fallback to bare LLM
- Fix AgentAuthConfiguration construction (typed object not plain dict) for JWT middleware
- Read PORT from env for Azure/GCP compatibility (default 3978 for local dev)
- Read GEMINI_MODEL from env (default gemini-2.5-flash, replaces deprecated gemini-2.0-flash)
- Fix instruction dropped when rebuilding Agent with MCP tools
- Add getattr fallback for recipient.tenant_id/agentic_user_id (Playground sends minimal activity)
- Add typing indicator loop and immediate ack message in message handler
- Add .gitignore for A365 deploy artifacts and manifest folder
- Update .env.template with all keys, placeholders, port guidance and needDeployment notes
- Update README with local dev, Agents Playground, Azure/GCP deploy, publish lifecycle and troubleshooting
@biswapm
Pujarini Mohapatra (biswapm) requested a review from a team as a code owner April 1, 2026 10:53
Copilot AI review requested due to automatic review settings April 1, 2026 10:53
@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 24 package(s) with unknown licenses.
See the Details below.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA c4bef89.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

License Issues

nodejs/claude/sample-agent/package.json

PackageVersionLicenseIssue Type
@microsoft/agents-a365-notifications^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-observability^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-observability-hosting^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-runtime^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-tooling^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-tooling-extensions-claude^0.1.0-preview.125NullUnknown License

nodejs/langchain/sample-agent/package.json

PackageVersionLicenseIssue Type
@microsoft/agents-a365-notifications^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-observability^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-observability-hosting^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-runtime^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-tooling^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-tooling-extensions-langchain^0.1.0-preview.125NullUnknown License

nodejs/openai/sample-agent/package.json

PackageVersionLicenseIssue Type
@microsoft/agents-a365-notifications^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-observability^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-observability-extensions-openai^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-observability-hosting^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-runtime^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-tooling^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-tooling-extensions-openai^0.1.0-preview.125NullUnknown License

nodejs/vercel-sdk/sample-agent/package.json

PackageVersionLicenseIssue Type
@microsoft/agents-a365-notifications^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-observability^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-observability-hosting^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-runtime^0.1.0-preview.125NullUnknown License
@microsoft/agents-a365-tooling^0.1.0-preview.125NullUnknown License
Denied Licenses: GPL-3.0-only, AGPL-3.0-only

OpenSSF Scorecard

Scorecard details
PackageVersionScoreDetails
npm/@microsoft/agents-a365-notifications ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-observability ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-observability-hosting ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-runtime ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-tooling ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-tooling-extensions-claude ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-notifications ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-observability ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-observability-hosting ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-runtime ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-tooling ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-tooling-extensions-langchain ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-notifications ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-observability ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-observability-extensions-openai ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-observability-hosting ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-runtime ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-tooling ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-tooling-extensions-openai ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-notifications ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-observability ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-observability-hosting ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-runtime ^0.1.0-preview.125 UnknownUnknown
npm/@microsoft/agents-a365-tooling ^0.1.0-preview.125 UnknownUnknown

Scanned Files

  • nodejs/claude/sample-agent/package.json
  • nodejs/langchain/sample-agent/package.json
  • nodejs/openai/sample-agent/package.json
  • nodejs/vercel-sdk/sample-agent/package.json

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates multiple Agent 365 samples (primarily the Python Google ADK sample) to behave correctly in Agents Playground vs production, improve MCP/tool initialization robustness, and refresh documentation/config templates for local + cloud hosting.

Changes:

  • Fix Google ADK sample auth/tooling flow (env-driven auth handler selection, skip/timeout MCP init, BEARER_TOKEN expiry handling, preserve agent instructions when rebuilding with tools).
  • Improve runtime/config ergonomics (PORT/LOG_LEVEL/GEMINI_MODEL via env, typed JWT middleware configuration, recipient fallbacks, typing/ack UX).
  • Documentation & sample maintenance updates (expanded README/.env.template/.gitignore; Python version caps and Windows dependency caps; remove synthetic observability IDs in Node samples).

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
python/google-adk/sample-agent/README.md Major rewrite: local dev, Playground, deployment, config reference, troubleshooting.
python/google-adk/sample-agent/main.py Env-driven logging/observability, typed JWT config, PORT support.
python/google-adk/sample-agent/hosting.py AUTH_HANDLER_NAME-driven auth enforcement and message/notification handler wiring.
python/google-adk/sample-agent/agent.py GEMINI_MODEL env default, MCP init timeout/skip logic, recipient fallbacks, BEARER_TOKEN expiry check.
python/google-adk/sample-agent/mcp_tool_registration_service.py Preserve instruction when reconstructing ADK agent with MCP tools.
python/google-adk/sample-agent/.env.template Expanded template with placeholders, auth/tooling, server + observability settings.
python/google-adk/sample-agent/.gitignore Ignore deploy artifacts, venvs, and local secrets for this sample.
python/crewai/sample_agent/README.md Tighten documented supported Python versions.
python/crewai/sample_agent/pyproject.toml Constrain Python versions and cap lancedb on Windows (plus uv override).
nodejs/vercel-sdk/sample-agent/src/client.ts Remove synthetic response-id recording in observability scope.
nodejs/openai/sample-agent/src/client.ts Remove synthetic response-id recording in observability scope.
nodejs/openai/sample-agent/src/agent.ts Remove hardcoded synthetic correlationId.
nodejs/langchain/sample-agent/src/client.ts Remove synthetic response-id recording in observability scope.
nodejs/langchain/sample-agent/src/agent.ts Remove synthetic correlationId generation.
nodejs/claude/sample-agent/src/client.ts Remove synthetic response-id recording in observability scope.
nodejs/claude/sample-agent/src/agent.ts Remove hardcoded synthetic correlationId.
.gitignore Ignore A365 deploy artifacts repo-wide.

Comment thread python/google-adk/sample-agent/main.py Outdated
Comment thread python/google-adk/sample-agent/main.py
Comment thread python/google-adk/sample-agent/main.py
Comment thread python/google-adk/sample-agent/agent.py Outdated
Comment thread python/google-adk/sample-agent/agent.py
Comment thread python/google-adk/sample-agent/mcp_tool_registration_service.py
…ost binding, JWT parsing, env template

Agent-Logs-Url: https://github.com/microsoft/Agent365-Samples/sessions/a8694946-d298-4af8-b7a5-bbf06db84366

Co-authored-by: biswapm <29349597+biswapm@users.noreply.github.com>
biswapm added 2 commits April 6, 2026 10:52
…gent365-Samples into fix/google-adk-agent

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@biswapm
Pujarini Mohapatra (biswapm) merged commit 5d6112f into main Apr 6, 2026
34 of 36 checks passed
@biswapm
Pujarini Mohapatra (biswapm) deleted the fix/google-adk-agent branch April 6, 2026 18:15
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.

5 participants