Skip to content

AG2 1.2.2 adds tool timeouts, deprecates OpenAIConfig

Updated AG2

Summary

AG2 1.2.2 (October 27, 2026) adds per-call tool timeouts and Anthropic SDK 2.x support, and deprecates OpenAIConfig before it moves to Responses in 1.4.

Tool
AG2
Category
Frameworks
Date
Open source
Yes
Pricing
Not stated in the sources we cited.

AG2 1.2.2 was released on October 27, 2026 and uploaded to PyPI the same day (UTC), six days after 1.2.1. The headline feature is timeouts for code that can hang, but the line to act on is in the upgrade notes: OpenAIConfig is deprecated now and will mean the Responses API from 1.4.0.

Release facts

FactDetail
ProductAG2, formerly AutoGen
Version1.2.2
Release dateOctober 27, 2026 (GitHub release and PyPI upload)
Previous release1.2.1, October 21, 2026
LicenseApache-2.0, per the GitHub API
Python3.10 or later, per PyPI
Installpip install -U "ag2[openai]==1.2.2" (swap the extra for your provider)

What's new

  • Tool timeouts. @tool(timeout=...) caps each function tool call. A timed-out tool returns a TimeoutError to the model, which can carry on instead of the whole run hanging (PR 3514).
  • Callback timeouts. The same timeout= argument works on stream subscribers, @observer, BaseObserver, LoopDetector and TokenMonitor.
  • Anthropic SDK 2.x is supported (PR 3513). AnthropicConfig gains a typed speed option and an open_telemetry option to configure or switch off the SDK's own spans.
  • OpenAIDecisionsConfig accepts question_instructions, appended to the agent prompt.
  • A2UI v1.0 follows the current spec, including callAgentFunction and agentFunctionResponse.
  • Token counts are more complete: Anthropic continuation tokens, Gemini thinking tokens and xAI reasoning tokens now count, and OpenAI cache_write_tokens maps to cache_creation_input_tokens.

Upgrade notes

ChangeWhat to do
OpenAIConfig is deprecated; in 1.4.0 it becomes the Responses APIUse OpenAICompletionsConfig to keep Chat Completions, or OpenAIResponsesConfig to move now. The old name still works but warns on create()
temperature, top_p, top_k on AnthropicConfig are deprecatedWith anthropic 2.x they warn and are dropped; with 1.x they warn and are still sent
New dependency floorsThe Anthropic extra needs anthropic>=1.15.0,<3; OpenAI needs openai>=3.37.0,<4

The release notes warn that renaming the config class does not translate API-specific options, so check any Chat Completions-only parameters before switching to OpenAIResponsesConfig (PR 3517).

What's fixed

  • Mistral streaming keeps completion choices separate.
  • A2A keeps the type of empty text artifacts.
  • SKILL.md files that start with a UTF-8 byte order mark load.
  • update_file rejects an empty old_content on a non-empty file instead of editing it.
  • Evals reject non-string dataset tags and check the final response when attributing failures.

Questions

Does this affect code that still uses import autogen? No. This release is the ag2 package, imported as ag2. The classic autogen namespace lives in AG2 Classic; see the AG2 hub.

Is it safe to upgrade? Yes for most projects. Nothing is removed, but expect deprecation warnings if you use OpenAIConfig or sampling parameters on Anthropic models, and check the new openai and anthropic version floors against your lockfile.

Other Python agent frameworks in the frameworks category: CrewAI, LangGraph and the OpenAI Agents SDK.

Alternatives

AG2 compared with its alternatives
ToolLicensePricing note
AG2This launchAG2 (formerly AutoGen) is an Apache-2.0 Python framework for AI agents and multi-agent networks, installed from PyPI as ag2 and imported as ag2.
Apache-2.0AG2 is Apache-2.0 and free to install from PyPI. You pay your model provider for tokens.
CrewAICrewAI is a framework for orchestrating role-playing, autonomous AI agents that work together.
MITNot stated
LangGraphLangGraph is an open-source orchestration runtime for building stateful, resilient agents.
MITNot stated
OpenAI AgentsOpenAI's agent harness, shipped as a Python SDK update in April 2026 and as the hosted Agents API in September 2026.
Open sourceSDK and Agents API use standard token and tool pricing. The Agents API has no additional fee.

More from AG2

View all

Questions

What is AG2?

AG2 is the open-source agent framework that grew out of AutoGen. Its README calls it an open-source AgentOS for building AI agents and getting several agents to cooperate on tasks. It is maintained by volunteers from several organizations.

Is AG2 the same as AutoGen?

It started as AutoGen. Since AG2 v1.0 the package imports as ag2 with an Agent class and Network for multi-agent work. The older autogen namespace, with ConversableAgent and GroupChat, moved to AG2 Classic (ag2ai/ag2-classic, pip install ag2-classic), which is still maintained.

How do I install AG2?

pip install ag2 with the extra for your provider, such as ag2[openai], ag2[anthropic], ag2[gemini] or ag2[ollama]. AG2 1.3.0 requires Python 3.11 or newer, matching the release notes and the package's requires_python field on PyPI.

Is AG2 open source?

Yes. The GitHub API reports Apache-2.0 for ag2ai/ag2.

What is the latest launch covered here?

AG2 1.3.0, published November 4, 2026. It requires Python 3.11, adds observers for a whole delegation tree and scoped variables, and deprecates several 1.0 entry points ahead of removal in 1.4.0.

Filed on Agent Radar. Claims in this note are limited to the sources above.