Back Home

代理框架

AG2 1.0.4 Adds ACP Session Recovery, Tool Argument Validation, and Concurrency Limits

AG2 1.0.4 adds ACP `session/load`, MCP tool namespaces, and configurable subagent fan-out limits, making long-running agents easier to resume while keeping resource usage under control. The release also brings tool blocklists, argument validation, and structured tool results into governance and tracing paths, although session state may still be distributed across external agent processes.

Marco Müller · CC BY-SA 3.0 · Image source
zh-Hant

AG2 released version 1.0.4 on September 7, focusing on moving agent interoperability from merely “able to connect” toward a more operationally manageable state. AG2 agents exposed through the Agent Client Protocol (ACP) now support `session/load`, allowing clients to load previous sessions instead of starting every connection with a blank conversation. This adds a critical lifecycle operation for long-running tasks, IDE reconnections, and process restarts. However, it restores the session managed by AG2; if a stateful ACP backend such as Claude Code persists conversations independently, the actual state may still reside outside the framework boundary.

The tool layer also includes several changes that affect production deployments. The MCP toolkit can now add namespaces to tools, reducing collisions when tools with identical names are imported from multiple servers. Concurrent fan-out for automatic delegation to subagents can be capped, preventing a single plan from scaling model requests, tool load, and costs without limit. The TealTiger governance middleware adds `tool_blocklist` and `arg_validation`, which respectively reject specified tools by pattern and validate arguments before execution. These are deterministic pre-call controls whose value lies in removing the need to rely on the model to follow textual rules on its own. Their security, however, still depends on rule coverage and whether serialized arguments retain enough semantic information.

On the observability side, tool spans now preserve structured, multipart results; trace conversion functions are now public APIs; and evaluation tasks that produce no trace no longer disappear from the total count. Streaming retries now stop after a chunk has been emitted, preventing callers from receiving duplicate content. The release also updates compatibility with Anthropic Python SDK 1.x and OpenAI SDK 3.x, including hosted shell and MCP events. Projects that pin vendor SDK versions should review their dependency ranges first. Areas worth watching next include consistency testing for session recovery, governance-rule bypass cases, and whether fan-out limits remain hard caps across cancellation, failure, and retry paths.

Sources

  1. Release v1.0.4 · ag2ai/ag2
  2. AG2 v1.0.4 release mirror and notes
  3. AG2 technical reference