- prompt_tokens is the whole input, including cache reads and writes;
- cache_read_input_tokens and cache_creation_input_tokens are parts of it, never additions;
- total_tokens >= prompt_tokens + completion_tokens.
- Messages stay separate. Before, every message chunk of a turn was joined into one string, so two messages ran together ("Let me check.Done.").
- More content survives. Text and blob resources, resource links, and the structure of tool results are no longer dropped.
- Sessions close cleanly. A session left open when the event loop shuts down no longer fails with asynchronous generator is already running, so ClaudeCodeConfig and the other client configs work…
AG2
A community-driven continuation of the original AutoGen codebase, maintained as an open-source multi-agent framework.
Use it in: API / SDK Works with: MCP Local models Multi-agent
On this page
Usage data: latest readings Nov 17 to Nov 19, 2026, last checked Nov 19, 06:26 UTC. Date of each number
What AG2 does
AG2 is a multi-agent framework from AG2, first released in November 2024. You use it through a Python library. Its documentation covers MCP servers, subagents or parallel agents and local models. It can run models from OpenAI, Anthropic and Google. It is used from Python. It is free and open source (Apache-2.0); you pay only for the models it calls.
Key facts
| Maker | AG2 |
|---|---|
| Type | Multi-agent framework |
| First released | November 2024 |
| License | Apache-2.0 |
| Interfaces | Python library |
| Main language | Python |
| Open issues and PRs | 85 |
Pricing
AG2 is open source and free to use; you pay only for the models and infrastructure it runs on.
Checked Nov 4, 2026. Prices change often; confirm before you buy.
Quick answers
- Free to start?Yes
- Open source?Yes (Apache-2.0)
- Where you use itPython library
- Supports MCP?Yes
- Model providersopenai, anthropic, google, local
- Subagents / multi-agent?Yes
- Feature comparisonAll agents
- Closest alternativeLangChain · all alternatives
What's new in AG2: November 2026 so far
November brought sandbox backend options, improved token tracking and message handling, and better support for browser-based MCP hosts. The release focused on reliability, correctness, and expanded deployment flexibility.
- New sandbox backends: E2B cloud sandboxes and boxd Linux microVMs now available for SandboxShellTool and SandboxCodeTool.
- Token accounting fixed: cache reads and writes are now tracked separately and correctly counted within prompt tokens.
- Message integrity restored: message chunks no longer run together, and more content survives including text, blobs, and tool result structure.
- MCP Apps work with browser hosts: removed POST redirects and added CORS support with documentation.
3 releases this month · summarised from the official release notes · all months
AgentGid articles about AG2
Get started with AG2
| PyPI | pip install ag2 |
|---|
These commands use the packages tracked on this page. The vendor may recommend a different installer; see the official documentation.
Add-ons for AG2: save tokens, add memory and tools
LiteLLM
One gateway for 100+ models with spend tracking, budgets, rate limits and fallbacks.
Langfuse
Traces every model and tool call with its cost and latency, and runs evaluations.
Firecrawl
Turns websites into clean Markdown or structured data the agent can read.
E2B
Runs agent-written code in isolated cloud sandboxes instead of on your machine.
Composio
Connects the agent to 1,000+ apps and APIs with managed sign-in.
Mem0
Adds long-term memory, so the agent remembers users and past work across sessions.
Listed because each tool documents support for AG2 or for agent frameworks in general. Savings and results depend on your workload.
AG2 alternatives
Best AG2 alternatives compared · All agent frameworks and SDKs
| # | Agent | Gid Score | Downloads 7d | 7d | 30d | Stars | Latest release | Price | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 |
LangChainLangChain |
79 | 41.1M | up 5.7% | down 2.7% | 150K+76/day | 1.5.22d ago | Free (OSS) | |||
| 2 |
LangGraphLangChain |
75 | 20.1M | up 5.5% | up 29.2% | 45.1K+48/day | 1.2.23yesterday | Free (OSS) | |||
| 3 |
AI SDKVercel |
68 | 47.2M | up 3.9% | up 38.4% | 28.1K+30/day | 7.0.1772d ago | Free (OSS) | |||
| 4 |
Claude Agent SDKAnthropic |
64 | 29.3M | up 5.9% | up 37.6% | 8,588+9/day | 0.2.185yesterday | Free (OSS) | |||
| 5 |
MastraMastra |
63 | 3.7M | up 14.9% | up 49.9% | 29.6K+23/day | 1.84.02d ago | Free (OSS) | |||
| 6 |
OpenAI Agents SDKOpenAI |
62 | 7.2M | up 4.8% | up 38.9% | 30.8K+21/day | 0.25.02d ago | Free (OSS) | |||
Tools used with AG2
What 39 public GitHub projects that depend on AG2 use with it, from their dependency files.
- OpenAI Python Library76.9%
- python-dotenv71.8%
- Pydantic69.2%
- NumPy66.7%
- Pillow66.7%
- FastAPI66.7%
- aiohttp64.1%
- LangChain61.5%
- pandas61.5%
- Requests59.0%
Used far more often here than in AI-built projects overall: what sets AG2 projects apart.
- Asyncer48.7% · 3046.8×
- jsonref53.8% · 1122.5×
- DiskCache53.8% · 336.8×
- mpmath51.3% · 229.1×
- FlatBuffers46.2% · 222.0×
- docstring-parser43.6% · 209.7×
- Docker Python53.8% · 177.2×
- IPython46.2% · 169.8×
Ratings from people who use AG2
No ratings yet. Used AG2? Rate it and say what it is good and bad at.
AG2 news
-
AG2 1.3.2 released
prompt_tokens is the whole input, including cache reads and writes;; cache_read_input_tokens and cache_creation_input_tokens are parts of it, never additions;; total_tokens >= prompt_tokens + completion_tokens.
-
AG2 1.3.1 released
New sandbox backends for SandboxShellTool and SandboxCodeTool: E2BEnvironment (ag2.extensions.e2b) runs them in E2B cloud sandboxes, and ag2.extensions.boxd runs them on boxd Linux microVMs.; MCP Apps work with browser-based hosts: /mcp no longer redirects…
What changed: recent AG2 releases
13 stable releases in the last 90 days · Monthly summary · Full changelog
- New sandbox backends for SandboxShellTool and SandboxCodeTool: E2BEnvironment (ag2.extensions.e2b) runs them in E2B cloud sandboxes, and ag2.extensions.boxd runs them on boxd Linux microVMs.
- MCP Apps work with browser-based hosts: /mcp no longer redirects POST and the CORS preflight, and the docs include a CORS recipe.
- Extended prompt-cache writes are reported separately: Usage.cache_creation_extended_input_tokens counts OpenAI 12h and Anthropic 1h writes, which are priced differently.
- XAIConfig accepts safety_identifier and guidelines.
- Fixes for the AG-UI final reply after ToolResult(..., final=True), OpenAI-compatible streamed tool calls without an index, Gemini 3 thought_signature errors, recursive find_files patterns on…
- ag2.eval, ag2/agent.py, ag2/extensions and most core modules are now checked with strict mypy.
Earlier releases
- Mistral realtime TTS sends a reply's text over one connection per reply. Documentation.
- Gemini's automatic_continuation controls resumption of responses that reach the per-request token limit. Documentation.
- MCP's max_sse_event_size configures the maximum accepted event size for tool results. Documentation.
- TrackingConfig captures the complete ordered model input for each call. Documentation.
- A2A reconnect recovery, artifact reconciliation, and cancellation racing completion. Client guide.
- Local command cleanup now stops child processes on cancellation, timeout, and close. Local Shell.
- Timeouts for code that can hang: @tool(timeout=...) limits each function tool call, and timeout= on stream subscribers, @observer, BaseObserver, LoopDetector and TokenMonitor limits each callback.
- Anthropic SDK 2.x support, plus new AnthropicConfig options: a typed speed and open_telemetry to configure or disable the SDK's own OpenTelemetry spans.
- OpenAIDecisionsConfig accepts question_instructions (strings, ag2 inputs or SDK parts), appended to the agent prompt.
- A2UI v1.0 updated to the current spec, including callAgentFunction / agentFunctionResponse and renderer capabilities.
- New Glasser paid-data toolkit extension.
- More accurate token usage: Anthropic continuation tokens, Gemini thinking tokens and xAI reasoning tokens are now counted, and OpenAI cache_write_tokens maps to cache_creation_input_tokens.
- Mistral voice for ag2.live: offline and realtime speech-to-text (MistralTranscriber, MistralRealtimeTranscriber) and text-to-speech (MistralTTSConfig, MistralStreamingTTSConfig), on top of…
- OpenAIResponsesConfig accepts a reasoning option for effort and summaries.
- New search toolkits: FirecrawlToolkit and KeenableSearchToolkit.
- New compaction_verifier extension: measures whether a CompactStrategy makes the agent's next actions worse, not just how many tokens it saves.
- TypeSafe can locate objects in images: ResponseSchema(BoundingBox) sends a Box question.
- ACP and the network layer keep multimodal input parts instead of flattening them to text.
- OpenAI Decisions API support with OpenAIDecisionsConfig and shared decision schemas using the Question marker.
- A2A servers can run on multiple replicas, with cacheable agent cards, opt-in input media type validation, and configurable push notification URL validation.
- Anthropic cache diagnostics and explicit API keys for OpenAI voice configs.
- Ollama API keys, custom HTTP clients, tool names, and fixes for duplicate streaming tool-call IDs.
- Fixes for MCP discovery, knowledge stores, evaluation suite loading, skills, A2UI, and network graph loading.
- docs(ag-ui): update CopilotKit quickstart for the AG-UI 1.0 sample
AG2 prices over time
AG2 popularity and usage data
AG2 was downloaded 56.2K times from PyPI in the week ending Nov 17, 2026, down 4.6% on the week before and up 38.0% over the last 30 days compared with the 30 before. The GitHub repository has 5,076 stars, 83 of them added in the last 30 days. The latest stable release is 1.3.2, published Nov 15, 2026; there were 5 stable releases in the past 30 days.
Download the raw daily series: ag2.csv
Gid Score breakdown
Gid Score shows public popularity and activity (usage, GitHub stars, mentions, growth), not the quality of the product. Each component is scored 0 to 100 from public signals; a dash means no data for it. How the Gid Score works.
How fresh these numbers are
| Number | Latest reading | Last checked |
|---|---|---|
| Package downloads | Nov 17, 2026 | Nov 19, 06:24 UTC |
| GitHub stars | Nov 19, 2026 | Nov 19, 06:26 UTC |
We fetch every source once a day. Registries publish downloads and page views a day or two late, so their latest reading trails the check. A reading more than 4 days old is marked out of date; the Gid Score still uses it until a newer one arrives.
AG2 FAQ
How much does AG2 cost?
AG2 is open source and free to use; you pay only for the models and infrastructure it runs on.
Is AG2 open source?
Yes. AG2 is open source, released under the Apache-2.0 license.
How popular is AG2?
AG2 was downloaded 56.2K times from PyPI in the week ending Nov 17, 2026, down 4.6% on the week before and up 38.0% over the last 30 days compared with the 30 before. The GitHub repository has 5,076 stars, 83 of them added in the last 30 days. The latest stable release is 1.3.2, published Nov 15, 2026; there were 5 stable releases in the past 30 days.
What is the latest version of AG2?
The latest stable release we track is 1.3.2, published on Nov 15, 2026.
What are the alternatives to AG2?
The closest alternatives in the same category by Gid Score are LangChain, LangGraph, AI SDK, Claude Agent SDK.
For the makers of AG2 badges, corrections
Add a live badge to your README or site:
[](https://agentgid.com/agents/ag2/)
[](https://agentgid.com/agents/ag2/)
[](https://agentgid.com/agents/ag2/)
Something wrong or outdated on this page? Send a correction with a link to the official source. More for makers.
Where these numbers come from
PyPI: ag2. GitHub: ag2ai/ag2. See data sources for how each one is collected.