AG2: Open-Source AgentOS

A programming framework for building AI agents and enabling multi-agent cooperation to solve tasks.

Source repo
ag2ai/ag2
Stars
★ 5.1k
Last updated
1d ago v1.4.0
FARS reviewed
Nov 07, 2026 +5 new
License
Apache-2.0
Primary language
Python

At a glance

How it runs
Library / SDKFramework
Works with
Universal · cross-platformOpenAI API
Cost
Free software; you pay for model usage
Setup effort
Low · running in minutes
You'll need
Python 3.10+Shell / CLINetwork accessLocal filesystem
Typical use
Developers needing a flexible multi-agent framework to build applications where multiple AI agents collaborate.
Not a fit if
  • Projects still on the autogen.* namespace that cannot refactor
  • Developers working outside the Python ecosystem
Website
ag2.ai ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-12-02latest release v1.4.0 (2026-11-29)+1.7 ★/day over 7 days
Source review
75/100 · Good

What does this agent do, and when should you use it?

AG2 (formerly AutoGen) is an open-source programming framework for building AI agents and facilitating cooperation among multiple agents to solve tasks. AG2 v1.0 introduces a protocol-driven architecture with a new top-level ag2 package, focusing on the Agent class, async operations, and a Network system with a Hub and typed channels for orchestration. It includes features like tool calling via @tool decorator, human-in-the-loop support via hitl_hook, and knowledge storage and compaction. The framework requires Python 3.10+ and supports multiple LLM providers (OpenAI, Anthropic, Gemini, etc.). The classic AutoGen framework (the autogen.* namespace) has moved to a separate repository, ag2ai/ag2-classic, and remains maintained.

AG2 enables developers to create Agent instances that interact via ask() methods, use decorated functions as tools, and incorporate human oversight through context.input. It orchestrates multiple agents via a Hub and various channel types (conversation, consulting, discussion, workflow), logging to a write-ahead log. The framework provides KnowledgeStore implementations (e.g., DiskKnowledgeStore) and strategies like SummarizeCompact for memory management. After installation, you can run a simple agent by importing Agent and OpenAIConfig, setting your API key, and calling ask().

  1. Developers needing a flexible multi-agent framework to build applications where multiple AI agents collaborate.
  2. AI assistants requiring tool calling and human approval workflows (human-in-the-loop).
  3. Systems that need memory persistence across sessions (e.g., remembering user preferences).
  4. Orchestrating AI agents into networks (using channels like conversation or workflow) to solve complex tasks.
  5. Researchers who want to test different model providers (OpenAI, Anthropic, Gemini) while keeping code unified.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • pip install ag2[openai]
  • pip install 'ag2[openai]'
Environment variables
OPENAI_API_KEY ANTHROPIC_API_KEY
Runtime
Python 3.10+
Install notes cover
Windows · macOS · Linux

How do you install or deploy this agent?

On Windows/Linux run pip install ag2[openai], on Mac run pip install 'ag2[openai]'. Alternatively, install extras for your provider: ag2[anthropic], ag2[gemini], ag2[ollama]. Requires Python 3.10+.

How do you use this agent?

Set your API key: export OPENAI_API_KEY="<your-api-key>" (or ANTHROPIC_API_KEY, etc.). Import Agent and OpenAIConfig from ag2. Create an Agent instance, then await agent.ask("your question"). For tools, decorate an async function with @tool and pass it in the tools parameter. For multi-agent, use Hub.open() and hub.register() to create agents and channels. See documentation and examples for detailed workflows.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • Protocol-driven network (Hub and channels) offers more flexible and scalable orchestration than classic GroupChat.
  • Built-in tool calling, human-in-the-loop, and knowledge storage (KnowledgeStore).
  • Supports multiple major LLM providers (OpenAI, Anthropic, Gemini, etc.) for easy switching.
  • Active community and thorough documentation (docs.ag2.ai).
Limitations
  • Migration from AutoGen requires code refactoring: imports, class names, and orchestration patterns change (e.g., ConversableAgent → Agent).
  • Core uses async APIs, which can have a learning curve for developers unfamiliar with asyncio.
  • Documentation is primarily for Python, potentially unsuitable for non-Python developers.
  • Depends on external LLM APIs, requiring network connection and API keys, which may incur costs.

How does this agent compare with similar options?

Compared to AutoGen (classic), AG2 v1.0 introduces a new network-based orchestration model that emphasizes protocol-driven design.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
AG2: Open-Source AgentOS This agent 75 · Good Library / SDKFree + model costs ★ 5.1k 1d ago Python OpenAI API
Agent Adapter 72 · Some gaps Library / SDKFree + model costs ★ 14 15d ago Python OpenAI API · Claude API
LangGraph Multi-Agent Swarm 46 · Major gaps Library / SDKFree + model costs ★ 1.6k 1mo ago Python OpenAI API
Agent SDK for Go 71 · Some gaps Library / SDKFree + model costs ★ 69 8d ago Go OpenAI API · Claude API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Good
75/ 100 5-point scale 3.8 / 5
This review covers the source as of Nov 07, 2026. The project has shipped 5 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 18/29
Reliability 11/14
Adaptability 14/18
Convention 16/18
Effectiveness 10/13
Verifiability 6/8
Why each dimension lost points
Trust18 / 29 · 3.1/5

Tools are supplied explicitly by the caller, and HITL can gate approval; the publishing example requires approval before publishing. Deductions: ordinary tool calls are model-triggered, and the sample does not establish general permission isolation, per-action confirmation, or rollback of external effects. The README describes environment-variable API key configuration and the knowledge example explicitly shows disk persistence, but there is no comprehensive policy for sensitive-data access, retention, or cleanup. Dependency groups, optional extras, and version ranges are documented; the packet contains no dependency audit or vulnerability mitigation evidence. Repository, maintainer information, and support contact provide attribution, but registry publisher identity is unverified and is not treated as confirmed.

Reliability11 / 14 · 3.9/5

The README’s async Agent, tools, and Network descriptions broadly align with the source and ADR architecture notes; the sample is insufficient to reconcile every implementation and document. Optional-dependency fallbacks provide install hints, and primary dependencies have version bounds; external services and optional SDKs still depend on provider availability. Source and ADRs show specific exceptions and clear failure messages for cases such as unsupported configuration, authentication, timeout, and cancellation, supporting strong ordinary error diagnosability.

Adaptability14 / 18 · 3.9/5

The material covers single agents, tools, human approval, multi-agent coordination, memory, and protocol serving, with developer-oriented examples. The deduction is that the broad framework does not have a single, comprehensive account of feature boundaries and unsuitable scenarios in this sample. Tool invocation is primarily model-selected, with descriptions and prompts narrowing use; trigger precision still depends on model behavior. Python 3.11+, extras, and Mac/Windows/Linux installation commands are specified, but deployment requirements, resource needs, and model capability compatibility are not fully bounded here.

Convention16 / 18 · 4.4/5

The README has a table of contents, organized concept sections, and clear installation and key-configuration steps. AGENTS.md is contributor guidance, not end-user product instruction. The Classic migration and 1.0+ naming change still create API migration costs. Examples cover core usage and link to documentation; ADRs document concrete limitations, but this sample cannot establish that limitations are centralized or exhaustive. LICENSE and project metadata explicitly identify Apache-2.0. pyproject.toml gives version 1.3.0, and ADRs record compatibility and deprecation transitions; the packet does not show a complete release changelog. The README identifies a dynamic volunteer maintainer group, maintainers, and a support email, but does not specify responsibility assignments or response commitments.

Effectiveness10 / 13 · 3.8/5

AgentReply supports continuing a conversation; tool results are readable, Network exchanges can be replayed from a log, and examples provide useful developer outputs. The deduction is that results remain dependent on model behavior and caller-supplied tools, with no static evidence of correctness or consistency across scenarios. Tool use, structured outputs, network orchestration, and memory provide substantial framework value. API calls, multi-agent loops, persistence, and optional services can add cost and operational burden; the sample does not provide a full cost-control assessment.

Verifiability6 / 8 · 3.8/5

Key claims can be traced to README examples, source structure, pyproject configuration, and ADRs; some broad product claims remain documentation assertions, and this review did not execute them. README, source, and ADRs corroborate architecture, migration, and session behavior; test materials show reusable test helpers, but test presence is not treated as evidence of passing tests. ADRs distinguish context, decisions, and consequences, and source comments sometimes separate deployer declarations from framework inferences; some broad product descriptions do not explicitly mark evidence versus inference.

Risks and how to mitigate them
  • Tools can cause external side effects. The approval example only applies when HITL is explicitly wired in; callers should constrain tool permissions and plan recovery or reversal for failures.
  • The knowledge example writes information to disk. Before deployment, check storage location, access controls, retention, and sensitive-data policy.
  • AG2 v1.0+ differs from AG2 Classic in imports and agent model. Check the migration guide and required extras before upgrading.
Evidence confidence: Low Reviewed Nov 07, 2026 Reviewed revision 3539d0750059 New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/ag2.svg)](https://followagents.com/en/agents/ag2)
<a href="https://followagents.com/en/agents/ag2"><img src="https://followagents.com/badge/ag2.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v1.4.0 AG2 1.4.0
    Release notes excerpt
    Highlights ❗ Breaking changes - OpenAI: OpenAIConfig now uses the Responses API. To keep using Chat Completions, including with servers that only support /chat/completions, switch to OpenAICompletionsConfig. With the new default, requests use store=True; set store=False if you do not want to request response storage. …
    View on GitHub ↗
  2. v1.3.4
    Release notes excerpt
    What's Changed * fix(knowledge): stop polling callbacks after subscription close by @cw-jlu in https://github.com/ag2ai/ag2/pull/3643 * fix(network): evaluate turn_within expectations on workflow and discussion channels by @LykenL in https://github.com/ag2ai/ag2/pull/3703 * fix(acp): make ACPConfig a ModelConfig by @vvlrff in https://github.com/ag2ai/ag2/pull/3710 * chore: bump version to 1.3.4 by @vvlrff in https://github.com/ag2ai/ag2/pull/3712 * docs(tools): stop pairing interpreters with ignore in shell examples by @vvlrff in https://github.com/ag2ai/ag2/pull/3711 New Contributors …
    View on GitHub ↗
  3. v1.3.3
    Release notes excerpt
    google-genai 3.x ag2[gemini] capped google-genai at <3.0, so Gemini users could not install the current SDK. It now accepts google-genai>=1.68.0,<4, and a fresh pip install "ag2[gemini]" installs 3.x. The generation API and types did not change in 3.0; both breaking changes concerntransport, and AG2 exposes each of them: - API version. On 3.x the Gemini Developer API defaults to v1 instead of v1beta. The -latest aliases and some -preview models exist only on v1beta. Anew api_version field opts back in, and is applied to both generation and the Files API: …
    View on GitHub ↗

FAQ

What is the difference between AG2 and AutoGen?
AG2 v1.0 is the successor to AutoGen but with a new architecture; imports and class names changed (autogen → ag2, ConversableAgent → Agent). The classic AutoGen has moved to a separate repository ag2-classic and remains installable.
What are the hardware requirements for AG2?
AG2 only requires Python 3.10+ and network connectivity (to call LLM APIs). No GPU is needed because it relies on external model providers.
How do I migrate from AutoGen?
Official migration guide is available at docs.ag2.ai/docs/user-guide/network/migration_from_group_chat/. It's recommended to understand the new concepts first and then refactor your code.
Which model providers are supported?
AG2 supports OpenAI, Anthropic, Gemini, Ollama, etc., via different extras. Install the corresponding extra and set the API key.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts