Files
molecule-core/docs/tutorials/google-adk-runtime.md
core-devops 1b543d8582
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 12s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 4s
CI / Python Lint & Test (pull_request) Successful in 4s
CI / Detect changes (pull_request) Successful in 6s
E2E API Smoke Test / detect-changes (pull_request) Successful in 9s
E2E Chat / detect-changes (pull_request) Successful in 8s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 5s
CI / all-required (pull_request) Successful in 38s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 7s
Harness Replays / detect-changes (pull_request) Successful in 4s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 4s
Lint no tenant GITEA or GITHUB token write / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 3s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
verify-providers-gen / Regenerate providers artifact and fail on drift (pull_request) Successful in 43s
gate-check-v3 / gate-check (pull_request) Successful in 3s
qa-review / approved (pull_request) Successful in 4s
security-review / approved (pull_request) Successful in 4s
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request) Successful in 4s
sop-checklist / review-refire (pull_request) Has been skipped
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m7s
sop-tier-check / tier-check (pull_request) Successful in 6s
CI / Platform (Go) (pull_request) Successful in 4s
CI / Canvas (Next.js) (pull_request) Successful in 2s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2s
E2E Chat / E2E Chat (pull_request) Successful in 7s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 5s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2s
Harness Replays / Harness Replays (pull_request) Successful in 2s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
audit-force-merge / audit (pull_request) Successful in 6s
docs: correct fabricated google-adk + gemini-cli runtime tutorials
Both tutorials cited misattributed PRs and claimed shipped runtimes that
didn't exist (RFC internal#730 finding):
- google-adk-runtime.md: cited 'PR #550' (actually a MemoryTab test suite) +
  'already first-class'. Rewritten to the REAL implementation — ADK engine-only
  (google-adk[mcp]==2.1.0, no [a2a]), Vertex AI via ADC (keyless), a2a-1.x
  bridge — with correct PR refs (template PR #1, core #2003, ci #26) + a
  landing-status banner.
- gemini-cli-runtime.md: cited 'PR #379' (actually CI cleanup); no gemini-cli
  runtime exists in manifest/knownRuntimes. Added a correction banner pointing
  to the real google-adk runtime.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-28 23:07:13 -07:00

3.4 KiB

Running a Google ADK Workspace on Molecule AI

Status (2026-05-29): the google-adk runtime is landing, not yet on main. It's implemented in the template repo molecule-ai-workspace-template-google-adk (PR #1) with platform registration in molecule-core PR #2003 and the validator allowlist in molecule-ci PR #26. Design + approval: RFC internal#730. Remove this banner once those PRs merge.

Doc-accuracy note: a prior version of this page claimed ADK was "already first-class" and cited "PR #550" — that PR is unrelated (a MemoryTab test suite). No google-adk adapter existed at that time. This rewrite reflects the real implementation.

Google's Agent Development Kit (ADK) runs as a Molecule AI workspace runtime: ADK is the agent engine (LlmAgent + Runner), and the workspace participates in Molecule's A2A org like any other runtime.

How it actually works

  • ADK = engine only. The adapter builds an ADK LlmAgent from the workspace config (model + system prompt + tools) and drives its Runner. It installs google-adk[mcp]==2.1.0 and never the [a2a] extra — ADK's a2a layer pins a2a-sdk<0.4, which is incompatible with the platform's a2a-sdk>=1.0. (Verified: google-adk[mcp]==2.1.0 + a2a-sdk 1.0.3 coexist.)
  • A2A is provided by the platform's a2a-1.x server; a Molecule-authored executor bridges ADK's Runner event stream onto it, one ADK session per A2A context_id.
  • Tools reach the agent via ADK's native McpToolset pointed at the workspace's a2a_mcp_server — the same MCP surface the CLI runtimes use (delegate_task, commit_memory, list_peers, …). No LangChain.

Auth — Vertex AI via ADC (keyless), or an AI Studio key

The runtime supports both google-genai auth paths:

  • Vertex AI + Application Default Credentials (recommended; required if your org disallows API keys). Set model: vertex:gemini-2.5-pro and provide GOOGLE_CLOUD_PROJECT; the adapter sets GOOGLE_GENAI_USE_VERTEXAI=1 and google-genai authenticates via ADC — no API key. (Locally: gcloud auth application-default login.)
  • AI Studio API key (where your org permits API keys): set model: google_genai:gemini-2.5-pro and GOOGLE_API_KEY.

Create a workspace

# Vertex AI + ADC (keyless)
curl -s -X POST http://localhost:8080/workspaces \
  -H "Content-Type: application/json" \
  -d '{
    "name": "adk-agent",
    "role": "Google ADK inference worker",
    "runtime": "google-adk",
    "model": "vertex:gemini-2.5-pro",
    "runtime_config": {"required_env": ["GOOGLE_CLOUD_PROJECT"]}
  }'

Send it a task via the A2A proxy (POST /workspaces/:id/a2a, JSON-RPC message/send) and it replies through the ADK Runner. Verified end-to-end: a Gemini 2.5 round-trip on Vertex via ADC returns through the built image.