Back Home

代理框架

Google ADK Go 2.3 Brings Context Compaction to the Service Layer and Tightens A2A and Tool-Confirmation Boundaries

The new release can compact agent history after a call completes or during an individual call, recording compaction details as session events. The update also fixes trust boundaries around cross-agent transfers and human tool confirmation; teams upgrading should retest continuation semantics for long-running tasks.

Asoundd · CC BY-SA 4.0 · Image source
zh-Hant

Google released Agent Development Kit for Go 2.3.0 on August 31. The main change is not another agent abstraction, but the integration of context compaction for long-running sessions across all service entry points. The runtime can now summarize older events after a call completes or compact them when an in-progress call exceeds a threshold. Summaries are stored as session events, while content marked as persistent facts is retained during subsequent summarization.

This design gives REST, A2A, and other launch interfaces a shared set of compaction semantics, avoiding a situation in which context length can be controlled only by specific front ends. For long-running coding agents or multi-tool workflows, it can reduce the tokens and latency associated with resending the full history, as well as the risk of exceeding the model’s context window. However, summarization remains a lossy transformation: if file versions, outstanding commitments, tool-call IDs, or negative constraints are not preserved, the agent may take incorrect actions when execution resumes. Existing ADK documentation describes token thresholds, event-retention counts, and two sliding-window strategies, but the supported-versions table does not yet list Go. Deployers should therefore rely on the 2.3.0 APIs and their own tests.

The security-related fixes are equally noteworthy. The new release rejects attempts to restore tool confirmation from non-agent events and blocks conflicting confirmation requests. A2A remote agents can no longer arbitrarily alter control flow through peer-supplied `transferToAgent` metadata, and agent-card sources are now restricted to HTTP(S) URLs or local paths. After upgrading, engineering teams should replay existing pause-and-resume traces, verify that tool results, human approvals, and branch state remain consistent before and after compaction, and monitor the additional cost and distortion rate introduced by summarization calls.

Sources

  1. ADK Go v2.3.0 release notes
  2. Context compression documentation
  3. ADK Go context-compaction roadmap discussion