github google/adk-python v2.7.0

4 hours ago

2.7.0 (2026-08-13)

Highlights

A correctness release: most of the work went into what an agent sends to the model and what it gets back, alongside a long tail of fixes across tools, sessions, evaluation and the CLI.

  • Models declare their own capabilities: an agent pairs an output schema with tools when the model actually supports it, instead of ADK inferring support from the model id. (2aff82c, dc5dbfa)
  • Tools can return media: a tool's function response carries images and other media straight back to the model, on Gemini and on Anthropic, LiteLLM, Apigee and OCI alike. (df9d6de, 703cf43)
  • Conversation history keeps what Gemini needs: thought signatures, server-side tool call parts, and every result of a parallel function call survive the round trip. (d4ed347, e908137, 93dff41)
  • Jinja2 instruction templates: pass use_jinja2=True to inject_session_state and an instruction can use conditionals and loops over session state, with artifacts loaded through a {{ artifact("name") }} helper. Jinja2 stays an optional dependency and the regex engine remains the default. (4a00a34)
  • Faster startup and hot paths: import google.adk does less work, and the request path avoids Pydantic round-trips and quadratic streaming accumulation in the LiteLLM adapter. (8806dc2, 9e1adde, 36fd2c8)

Breaking changes

  • pyarrow left the gcp extra: it lives in the new bigquery-analytics extra, which takes roughly 50 MB off pip install google-adk[gcp]. If you use BigQueryAgentAnalyticsPlugin, install google-adk[bigquery-analytics]. (ac71709)

⚠ BREAKING CHANGES

  • deps: move pyarrow out of the gcp extra
All 212 changes

Features

  • accept a pre-configured client on the labs OpenAI model (461205c), closes #4180
  • add express mode telemetry logging for ADK CLI onboarding (4ccc6be)
  • add gen_ai.agent.name attribute to execute_tool spans (1a80962)
  • add Jinja2 templating with use_jinja2 flag (4a00a34), closes #2942
  • add option to save eval results to CSV (3bbc8ed), closes #2652
  • add parent terminal grouping and TTL pruning to ADK CLI telemetry (2c6a7ff)
  • agent: add native task mode support to root LlmAgent (dd0de52)
  • Allow clients using the load_artifacts_tool to customize how attachment data is fed to the LLM (b66cba2)
  • capture TTY connectivity in CLI environment telemetry (c12a025)
  • cli: auto-discover test_config.json for single eval file in adk eval (0477e57), closes #4410
  • enforce unit guide requirement for new Python files (942b38d)
  • environment: Add support for executing skill scripts within an Environment (fa31b6c)
  • evaluation: add optional eval set result persistence to AgentEvaluator (76027dd)
  • eventarc: Support Context callables and correct OMIT behavior (a3bd111)
  • Extend HTTP trace debugging to MCP Toolset operations (6d8045c)
  • honor model-declared capabilities when pairing an output schema with tools (dc5dbfa)
  • honor return_direct on Langchain tools wrapped by LangchainTool (c2249f3), closes #2157
  • Introduce a capability reporting system for LLM models (2aff82c)
  • labs/antigravity: allow mode='single_turn' AntigravityAgents to be sub-agents (6ed484d)
  • let McpToolset reuse the MCP server's tool list (9cd5975)
  • let tools return media in the function response (df9d6de)
  • live: forward safety_settings from generate_content_config to the Live API (0a6d05d)
  • plugins: add BigQuery Agent Analytics delivery and termination observability (04b8b72)
  • Promote Data Agent tools to stable (fd33158)
  • record implicit vs explicit context cache type in analytics (5072828)
  • skills: support non-blocking skill loading in async runtimes (61ddc5f), closes #6057
  • Stop using the obsolete Gemini 1.x / Gemini 2+ model-id check in ADK (745de0a)
  • Stop using the obsolete Gemini 1.x / Gemini 2+ model-id check in ADK url context tool (eaab262)
  • support audio_stream_end for realtime input (0f738a5)
  • Support elicitation_callback in McpToolset (4824619)
  • telemetry: add feature gate for experimental telemetry (75fb254)
  • telemetry: Expand load_skill telemetry (bddbb3d)
  • update skill model to include its origin (08bd589)
  • warn when agent transfer runs without a context cache config (0cf10a5)

Bug Fixes

  • a2a: adopt a directly supplied agent card's description (4f58306)
  • a2a: flatten human-input responses on resume to avoid mixing them with text (aec7aa3)
  • add .adk/ to the .gitignore generated by adk create (374aab3), closes #6647
  • add 20MB file size validation to SaveFilesAsArtifactsPlugin (9827790), closes #3751
  • Add regional and MREP endpoint routing for DataAgentToolset (20842eb)
  • adk: share a single component-owner map between the triaging agents (1ad0543)
  • allow injecting credentials into VertexAiMemoryBankService (18903ca)
  • artifacts: list artifacts nested under another artifact from disk (a5864a0)
  • artifacts: reject rooted, drive-qualified and traversing artifact paths (2716ad5)
  • artifacts: sort and guard GCS artifact version listing (1f354b8)
  • artifacts: stop conflating an artifact with the artifacts nested under it (08d21cc)
  • attribute a compaction summary to the agent reading it (c20ccef)
  • auth: set a request timeout on OAuth2 token exchange and refresh (3f3c8f5)
  • block the whole standard library in agent-config code references (a16f6da)
  • bound Apigee completions HTTP client timeout and redirects (f57a67d)
  • bound the entries and bytes read from a skill zip archive (fa136c4)
  • bqaa: skip synchronous log flush to prevent blocking responses (6fd7eaf)
  • call build_planning_instruction on custom planners (2bdf4de)
  • ci: run the update-constraints hook in check mode (74e7167)
  • ci: stop CI resolving against half-published PyPI releases (f4b432d)
  • cli: implement early telemetry recording for long-running web servers and log successful exit code upon routine teardown (77726c5)
  • cli: normalize trigger user ids for sessions (e03dbab)
  • cli: stream_reasoning_engine raises StopIteration RuntimeError on sync generators (aa9c187)
  • cli: track full server duration and log routine Ctrl+C termination as success (0fcfe99)
  • cli: update gcloud command to use beta flag (9630559)
  • coerce non-string enum values to strings on string-typed Gemini schemas (30f32e3), closes #3401
  • collect eval state from workflow nodes (568b4f6)
  • constrain the RPC targets of a network-fetched A2A agent card (16cbb7d)
  • core: stop the Cloud Run sandbox executor waiting forever (a39e71a)
  • declare the redis extra that RedisSessionService asks for (957dc2b)
  • deps: exclude LangGraph releases with unsafe checkpoint loading (1b12ee3)
  • deps: exclude nltk 3.10.1, which breaks venvs living inside the working directory (1a0c3bd)
  • deps: stop the published constraints from pinning google-adk itself (c44c543)
  • disable dev endpoints for production deployment both AE and Cloud Run (b795a9b)
  • emit additional_properties with value type schema in dict branch (93f57f4), closes #4868
  • eval: fail the eval when an agent crashes before any metric runs (efeec70)
  • eval: grade judge metrics against the criterion's threshold (bcce415)
  • eval: grade rouge metric against its criterion threshold (83f7912)
  • evaluation: validate path segments in GCS eval set/result managers (a56f6e1)
  • fix inconsistencies in sample paper content and naming (423434a), closes #6651
  • Fix permissions for release cherry pick workflow (07a37da)
  • flows: count compositional function calling against max_llm_calls (bb9709d)
  • flows: inject transfer_to_agent tool for HITL confirmation resume (0897bee), closes #5633
  • gate --sandbox-launcher behind gcloud beta run deploy (547f1eb), closes #6511
  • guard reads in the local API server against DNS rebinding (2cf4fd1)
  • handle non-numeric OpenAPI response keys in return-doc generation (b5be64c)
  • handle optional and union pydantic models with string annotations (94d08cd)
  • honor Apigee request timeouts (2547db6)
  • honor num_recent_events=0 in VertexAiSessionService.get_session (923dee7)
  • ignore unsafe A2A peer-supplied event actions metadata (0ba7d3c)
  • import jinja2 lazily so it is not a required dependency (f828667)
  • install every optional runtime dependency with the all extra (f5c09dc)
  • isolate per-toolset failures in additional-tools resolution (cdf895f)
  • keep agent instructions out of the published A2A agent card (efdecf4)
  • keep preloaded context turn-scoped (be103fb)
  • keep regular-tool FRs on mixed task turns (4cab3ac), closes #6581
  • keep server-side tool call parts in conversation history (e908137)
  • keep subpackages reachable as attributes of a lazy package (ae5118d)
  • keep thought signature parts in conversation history (d4ed347)
  • keep thought signatures when merging streamed text (fae470f)
  • Key directory-loaded skill resources with forward slashes (bc2c97c)
  • key in-memory memory store by app_name and user_id tuple (fd8f7eb)
  • kill runaway code on timeout in container and local executors (27548e3)
  • labs/antigravity: report node input and output from AntigravityAgent (fd7df0e)
  • lift file references and nested parts out of tool results (22f5546), closes #2577
  • litellm: convert http_options.timeout from milliseconds to seconds (e74917e)
  • live: end the Live agent when task_completed is called in parallel (cebfd74)
  • live: transfer to the target agent regardless of function response order (c198695)
  • lower oneOf to anyOf so a union schema reaches Gemini intact (4da8dd7)
  • make advertised tool names match the names tools are registered under (b26d4f6)
  • make parallel worker failure propagation test deterministic (308c818)
  • mark the session type decorators as safe for statement caching (e182146)
  • mcp: bound the wait for an MCP session to become ready (de200b5)
  • mcp: reject stdio MCP servers declared in agent configs by default (a61d8ec)
  • memory: scope Vertex RAG retrieval to the requesting app and user (fbeab00)
  • models: honor an LLM registered after that name was resolved (03f44c8)
  • models: keep streamed usage metadata when a later chunk reports none (aebb2a1)
  • models: report a missing Anthropic credential when the client is built (42f220a)
  • models: report Anthropic thinking tokens without double counting output (a95b008)
  • models: use the reported total token count for interactions usage (955325d)
  • models: wrap Anthropic rate limit errors (cde301b)
  • narrow broad except in OAuth2 credential refresher (7d16478)
  • omit HTTP options from Gemini debug logs (d63a255)
  • order database sessions deterministically (8455cf8), closes #6272
  • order list_sessions results by last update time (53e1afb), closes #6272 #6431
  • prefer application/json for OpenAPI return type docs (9b4b2c5)
  • preserve all tool results for parallel function calls (93dff41), closes #6589
  • preserve function-tool preflight in thread pool (0156bc5)
  • preserve per-part media fields across A2A conversion (1a9d003)
  • preserve required body properties (9b31268), closes #6503
  • preserve turns when stale compaction loses (40ccbee)
  • prevent update_constraints.sh from rewriting files when dependencies are unchanged (470d59e)
  • propagate context cache config to the AgentTool sub-runner (5835f5a)
  • propagate context cache config to the AgentTool sub-runner (9488408)
  • prune orphaned function responses instead of failing the request (73e8625)
  • read and write eval data files as utf-8 (2e878ed)
  • redact credential values from auto-tracing span attributes (fd44a63)
  • redact database password from session service errors and logs (4ad3ecc)
  • redact secret credentials from AuthCredential repr and error messages (beb66ee)
  • refuse MCP tools that take a reserved ADK tool name (77d4647)
  • Reject reserved ADK tool names in McpTool initialization (2785aa9)
  • remove invalid event from 10_burgers sample test trace (6930be4)
  • resolve Claude 5 model names to the Claude LLM class (e300ae7)
  • resolve GitHub Actions CI collection and flakiness issues (4e65350)
  • resolve shared-state concurrency contention in GCP auth provider using thread-local REST client caching (b1c6f44)
  • resolve zizmor security findings in GitHub Actions workflows (0075954)
  • restrict builder YAML code references to the app being edited (8995005), closes #5292
  • return schema validation feedback to models (b5b27cb)
  • revert runtime behavior changed by the strict-typing pass (3eae315)
  • rollback reject reserved ADK tool names in McpTool initialization (53b8a4d)
  • route apigee, o-series and unlisted LiteLLM provider models (d58caa6)
  • run synchronous OAuth2 token calls off the event loop (b0f52f0)
  • samples: fail the maintenance run when issue discovery dies mid-page (cf42e86)
  • samples: make the human-in-the-loop sample respect the human's decision (d92bb42)
  • samples: make the MCP auth sample actually enforce auth, move MCP samples off the deprecated toolset name, and correct code execution claims (c840dbe)
  • samples: repair integrations samples that no longer run against the current API (64dddf2)
  • samples: repair the adk_team samples against the current API (41ec592)
  • samples: repair the core, tools, plugins and skills samples (c620a73)
  • samples: repair the session database migration recipe (161f2b3)
  • samples: repair the workflow samples that produce the wrong output (a308848)
  • samples: report failed stale agent audits and exit non-zero (5418b73), closes #6520
  • samples: separate skipped from failed issues in the monitoring agent (d8d8a6e)
  • scope custom metrics per registry and trust only the config path (5d2aca0)
  • scope file artifact reads and deletes to the requesting app (c27d868)
  • scope LangGraph checkpointer thread id to app and user (19e2a72)
  • scope skip_summarization text-append to AgentTool (84c7711), closes #6230
  • Secure and harden FileArtifactService against tampered metadata and partial writes (c567203)
  • select the mTLS endpoint only when a client certificate exists (f324d1b)
  • send media attached to a tool response to non-Gemini models (703cf43)
  • serialize merged tool calls instead of recording a placeholder (6ec23cc)
  • sessions: make event reads deterministic and timezone-correct (4ca975e)
  • sessions: store and filter event timestamps in UTC (1b8ed3d)
  • skills: load binary references and assets as bytes instead of skipping them (3f21e89)
  • stop live tool execution from bypassing run_async (8b9d222)
  • stop LlmAgent resume path from ending parent on pause (3bb1011), closes #6017
  • stop logging the full live LlmRequest in base_llm_flow (6fb5e04)
  • stop marking defaulted output_schema fields as required (d4ec2fc)
  • stop per-run HTTP options and labels leaking onto the agent (8160d47)
  • Stop re-validating already-consumed tool confirmations (76d5723)
  • stop request assembly writing into the agent's own config (0730d73)
  • strip markdown and typographic decoration from rubric text (bf8388a), closes #6072
  • support fallback OAuth token and prefixless credential lookups (f4e7233), closes #4712
  • Support multi-content responses from agents within AgentTool (e805872)
  • Support multi-content responses from agents within AgentTool (544831c)
  • telemetry: mark failed tool spans as errors and fix provider naming (6396ce6)
  • telemetry: summarize inline binary data instead of writing it to a span (fbf5bd5)
  • test: tolerate both click exit codes when a group is invoked without a subcommand (bb9465b)
  • tools: recognize Context | None as the context parameter (c457556)
  • tools: stop gcs clients being shared across credentials (3d29750)
  • Update CI workflow to use uv and adjust codespell configuration (566fca3)
  • use _GCLOUD_CMD for gcloud calls in GKE deploy on Windows (f0b3ca6)
  • Use official SDK for credential finalization in GCP auth sample (6ccb837)
  • use typing.Optional in cleanup_unused_files to fix parse error (cbedafd)
  • validate audio sample rates (d24c84c)
  • validate skill name before building Agent Registry skill URL (11101ac)
  • validate urls before computer use navigate opens them (b0fff3f)
  • wire App plugins through eval paths (73ecb5b), closes #5503
  • workflow: keep jittered retry delay within max_delay (b333c85)

Performance Improvements

  • avoid Pydantic deep-copy / dump-validate round-trips and precompile regex (9e1adde)
  • avoid quadratic streaming accumulation in the LiteLLM adapter (36fd2c8)
  • drop use_attribute_docstrings from LlmCapabilities (d42e222)
  • improve adk import loading (8806dc2)
  • memoize the model adapter resolved from LlmAgent.model (490946b)
  • reuse one execute_sql function object across BigQuery toolsets (bfe33b1)

Documentation

  • add a test-file placement rule to the testing style guide (d64f1af)
  • add App unit guide (d24ec83)
  • add artifact service unit guide (b8c099d)
  • add memory service unit guide (aac410a)
  • add model registry unit guide (2353dde)
  • add session State unit guide (5a2a59b)
  • add Session unit guide (3df5a65)
  • add tool authentication unit guide (78a4ee2)
  • correct the list of built-in agent skills (4cad8cc)
  • fix broken README links and publish the constraints files (06111f1)
  • fix mcp sample link (5647699), closes #6490
  • note the adk web/api servers are unauthenticated and local-only (76c64ef)

Miscellaneous Chores

  • deps: move pyarrow out of the gcp extra (ac71709)
  • release this candidate as 2.7.0 (e22b75a)

Don't miss a new adk-python release

NewReleases is sending notifications on new releases.