AG2
Also known as: AG2 AgentOS
AG2 is an open source Python framework for building agents and coordinating them in networks. A hub registers agents, routes channel messages and applies the rules for each exchange. Tool middleware can pause an action for approval, and the harness supports persistent working memory and delegated tasks. Developers choose the model and where the runtime runs. Native telemetry and evaluation tools track what agents did and score their outputs against test cases.
AG2 is an open source Python framework from AG2AI, Inc., the creators of AutoGen, for building agents and coordinating their work across a network. An agent combines a model configuration, instructions and tools. It may run independently, act as a tool for another agent or join a network that routes work between named participants. The hub registers agent identities and capabilities. Channels set who participates, which events they may send and how a conversation or workflow ends. A developer may run the hub and agents in one process or connect agents across processes over WebSocket.
The framework exposes a Python function or a connected MCP tool to the model. Its own agents can also be exposed over MCP to outside clients. Middleware handles work such as testing policy around tool calls, collecting approval and emitting traces. A human approval gate stops a selected tool call until the person refuses it or grants permission. The harness can send a task to a worker agent with its own tools, trim older conversation context and persist working summaries in a disk store. OpenTelemetry spans cover agent turns, model calls, tools and approval events, with linkages from the network's dispatch record to individual agent work.
AG2 is available under the Apache 2.0 license, and its repository has 5.1k GitHub stars. The buyer supplies a Python runtime, model credentials and any external tool accounts. AG2 supports configuration for OpenAI, Anthropic, Gemini, Ollama and other inference endpoints, including OpenAI compatible models running in the buyer's environment. The agent evaluation package accepts cases with inputs and expected results, runs one or more scorers and returns results across the suite. Developers may also apply the scorers to traces from a previous run or compare outcomes across changes to the agent.
The current package, AG2 v1.0, uses a new agent interface and network design and is not a drop in replacement for the earlier AutoGen derived framework, which remains available as AG2 Classic in its own repository. Boundless used that earlier framework for immigration case preparation, and Cegid built business agent workflows for Pulse OS with it.
Google, NVIDIA, Walmart, AT&T, HSBC, Johnson & Johnson, Flipkart, MediaTek and Novo Nordisk appear among the enterprises AG2 names, beside MIT, Princeton and UC Berkeley. AgentOS, offered by access request, is a runtime that lets agents built on AG2, Google ADK, OpenAI or LangChain work as one team over A2A and MCP with shared state. AG2 Space is a separately branded macOS app that brings people and their AI teammates, including Claude Code or Codex, into shared rooms.
Vendor details
Canonical URL
https://www.ag2.ai/
Category
Multi-agent platform
Subcategory
Open source Python framework for agent networks
Company status
independent
Use cases & customers
Primary use cases
Target customers
Deployment options
Integrations
AG2 runs MCP tools, supports A2A and AG UI, and has model adapters for OpenAI, Anthropic, Gemini, Bedrock and Ollama.
In practice
A research agent uses its available tools to gather data and delegates part of the question to a specialist with a separate prompt and tool set.
An operations developer requires human approval on a tool that changes a record, with decision and execution spans exported alongside the rest of the run.
An engineering team runs an evaluation suite before changing an agent's default model and compares the tools called and answers returned against prior results.
Sources & related URLs
Research sources
Agentic Index coverage score
11.5 / 14 capabilities · 82%
| Integrations & Tool Calling | Full |
|---|---|
|
An AG2 agent calls typed Python functions registered as tools and can load an outside server's tools through an MCP toolkit. A connection can use credentials scoped to the conversation through runtime variables. The tool call is part of the agent turn and returns a result that feeds the next decision. A standalone agent and a worker in a network use the same tool framework. Sourcedocs.ag2.ai/docs/user-guide/tools/mcp_serversread 2026-11-21 |
|
| Workflow Orchestration | Full |
|
A network hub tracks named agents and routes messages for bounded exchanges. Consulting, discussion and workflow channels apply different turn and termination rules. A workflow channel follows a transition graph, and an agent can delegate a piece of work to a subtask with a separate tool set. Local and distributed network links keep the same hub and agent interface. Sourcedocs.ag2.ai/docs/user-guide/network/overviewread 2026-11-21 |
|
| Knowledge Grounding & RAG | Partial |
|
Context assembly policies select conversation events and relevant context before a model call and keep it within a configured window. Connected tools bring external records into that run as the model requests them. The harness also has its own store for working notes and event summaries. Serving a searchable index over a customer's broader knowledge requires a separate connector or index. Sourcedocs.ag2.ai/docs/user-guide/agent_harnessread 2026-11-21 |
|
| Human Oversight & Guardrails | Full |
|
Tool approval middleware holds an individual call before it executes and asks for a decision through the human input hook. A refusal blocks the tool and returns the refusal to the agent, and an approval lets the tool proceed. The owner can allow approval to persist for that same tool during a conversation. The default path stops a gated call if there is no person to ask. Sourcedocs.ag2.ai/docs/user-guide/tools/approval_requiredread 2026-11-21 |
|
| Security, Identity & Governance | Partial |
|
Network registration gives agents a stable identity and an owner. Hub rules set access lists, channel permissions, rates and inbox limits per agent. These controls apply inside the runtime the operator deploys, where the operator handles credentials and network access. AG2's commercial service security policy covers staff controls, but the installable framework has no independent compliance attestation of its own. Sourcedocs.ag2.ai/docs/user-guide/network/overviewread 2026-11-21 |
|
| Observability & Auditability | Full |
|
Telemetry middleware emits spans for individual turns, model calls, tool execution and requests for human approval. A model span includes the configured provider and model, and the trace links an agent invocation to the network dispatch envelope that triggered it. The operator routes these traces to a compatible backend such as Grafana Tempo, Honeycomb or Langfuse to inspect the sequence of events. Sourcedocs.ag2.ai/docs/user-guide/telemetry/agentread 2026-11-21 |
|
| Memory & State Persistence | Full |
|
The harness attaches a dedicated memory store to an agent. The disk store persists records at a customer chosen path, and the agent can write and delete entries independently from other application data. Aggregation writes summaries at a configured cadence. A working memory policy inserts those summaries into later context, with the store owner controlling which entries survive and how long the store is kept. Sourcedocs.ag2.ai/docs/user-guide/agent_harnessread 2026-11-21 |
|
| Deployment & Data Residency | Full |
|
The Python package runs in a customer controlled environment and uses credentials for the selected inference endpoints. A hub and its agents can run in the same process or operate as separate processes over WebSocket, including on separate hosts. The operator chooses where the runtime and stores sit. Inference data leaves that environment only when routed to an external model or tool. Sourcepypi.org/project/ag2read 2026-11-21 |
|
| Prebuilt Agents / Templates / Packs | Partial |
|
Travel Planner shows a conversation that continues through successive requests. Research Squad demonstrates delegation to multiple workers, and other short examples cover the agent and tool interfaces. Each example starts with source code and a model configuration, then runs in the buyer's Python environment. Packaged workflow installation remains a job for the application that uses the framework. Sourcedocs.ag2.ai/docs/user-guide/code_examples/code_examplesread 2026-11-21 |
|
| Triggers & Channel Coverage | Partial |
|
Requests reach an agent from a Python caller or from a remote client when the agent is served through an interoperability protocol. Within a network, the hub sends typed messages and notifications to agent handlers as work moves through a channel. The runtime responds to those requests and exchanges. A periodic job or an external queue trigger is supplied by the surrounding application. Sourcedocs.ag2.ai/docs/user-guide/network/overviewread 2026-11-21 |
|
| Model Flexibility & Routing | Full |
|
The model configuration API offers adapters for OpenAI, Anthropic, Gemini, Bedrock, Ollama and other providers. The agent owner chooses the configuration and credentials for each agent. A network can run agents with different model configurations while they exchange work. Compatible local model servers, including vLLM, can be addressed through the supported interface. Sourcedocs.ag2.ai/docs/user-guide/model_configurationread 2026-11-21 |
|
| APIs / SDKs / MCP Extensibility | Full |
|
The Python API creates and invokes AG2 agents, attaches tools and manages their conversations. An AG2 agent may be exposed as an MCP server for an outside client to invoke. The server interface covers connection and session settings and can be configured with OAuth resource server requirements. A remote client sees the tools the served agent makes available. Sourcedocs.ag2.ai/docs/user-guide/tools/serving_mcpread 2026-11-21 |
|
| Testing, Debugging & Optimization | Full |
|
The evaluation library runs a suite of agent tasks with defined inputs and optional expected outputs. Built in and custom scorers check properties such as whether an agent used the intended tool or answered with the expected information. Scores roll up for comparing runs. The same scorer set can run against captured traces without invoking the agent again. Sourcedocs.ag2.ai/docs/user-guide/evaluation/evaluationread 2026-11-21 |
|
| Browser / Computer-use | Partial |
|
The AG2 provider tool adapter gives agents a web page fetch operation on Anthropic and Gemini model configurations. The tool retrieves web content during a turn and hands it back to the model as part of the task. A different tool supplies web search. Those tools read pages without an AG2 managed visual browser session or the ability to operate a local desktop. Sourcedocs.ag2.ai/docs/user-guide/tools/builtin_toolsread 2026-11-21 |
|
The Agentic Index coverage score grades every vendor Full, Partial or Not documented against the same 14 buyer facing capabilities, from public evidence only. Each capability links to how all vendors in the index score on it. How this evidence is graded
Pricing
$0 for the Apache 2.0 Python framework
No framework license fee, with separate runtime and inference costs
What is public
AG2 costs $0 to install under the Apache 2.0 license. The package includes the agent runtime, network and evaluation library.
Billing mechanics
Inference, hosting and external tool fees follow the provider and infrastructure accounts connected by the operator.
Additional watchouts
AG2 Classic remains a separate package for applications on the original import and agent interface.
Sales call required
No, self serve available
Free / trial
$0 open source Python package
Commercial notes
The buyer operates the open source Python runtime. Managed services and Studio follow a separate access route.
Related vendors
- CrewAI — Open source multi agent framework (Python, MIT) of role based Crews…
- Relevance AI — Platform for building and deploying a workforce of AI agents with a…
- Agent Zero — Open-source multi-agent framework that gives its agent a full Linux…
- Akka — Enterprise agentic AI platform that builds and runs multi agent…
- Artian — Enterprise multi agent AI platform for financial services, where a…
- Bees — Bees runs teams of named AI agents through processes of one to…
Alternatives to AG2
Other products that do the work AG2 does, and what each one is.