Skip to content
AgentAgent framework

ag2

Open-source Python framework for building and orchestrating multi-agent AI systems

Pricing
Open source
Platforms
API, CLI, self-hosted
GitHub stars
5.1K
Last commit
1 day ago
Language
Python
License
Apache-2.0

About ag2

ag2 is an open-source agent framework for ai models and llm tooling. It is available on API, CLI, self-hosted and macOS.

AG2 is an open-source programming framework for building AI agents and getting several agents to cooperate on tasks. It supports interaction between agents, a range of large language models, tool use, and both autonomous and human-in-the-loop workflows.

As of version 1.0 the protocol-driven framework is installed with pip as the ag2 package. The earlier AutoGen-style classes live on in a separate AG2 Classic repository that is still maintained.

The project's website also describes AG2 Space, a macOS app where people and AI teammates share rooms, and an AgentOS runtime for connecting agents from different frameworks. The framework is aimed at developers and research teams building agentic systems.

What it does

Multi-agent cooperation
Lets several agents interact and share work to solve a task.
Multiple LLM support
Works with a variety of large language models.
Tool use
Agents can call tools as part of a workflow.
Human-in-the-loop
Workflows can be fully autonomous or include human input.
Interoperability runtime
AgentOS connects agents from AG2, Google ADK, OpenAI and LangChain.
Open protocols
The site lists A2A and MCP among the standard protocols supported.

Good for

  • Build a team of cooperating AI agents
  • Research on agentic AI systems
  • Add human review to agent workflows
  • Connect agents from different frameworks into one team
  • Migrate AutoGen-based projects

Pricing

Open source

Open source under Apache-2.0

Prices change. Check ag2.ai before you buy.

ag2 FAQ

How do I install AG2?

The README says to install it with pip as the ag2 package.

What happened to the autogen import name?

From v1.0 the classic framework moved to a separate repository, AG2 Classic, and this package no longer ships the autogen import name.

What license is it under?

Apache-2.0.

Who maintains it?

A group of volunteers from several organizations, according to the README.

Is ag2 free?

Yes. ag2 is open source, so you can use and self-host it for free.

What are the best alternatives to ag2?

The closest alternatives to ag2 are AutoGPT, hermes-agent, deepseek-harness, dify and langchain.

Alternatives to ag2

  1. AutoGPT

    Agent

    Hosted team of AI Experts for content, sales and research, coordinated by Otto

    • Free trial
    • Hosted agent
    • 188K GitHub stars
    • AI models and LLM tooling
  2. Open-source self-improving agent with memory, scheduling and many chat gateways

    • Freemium
    • Open-source agent
    • 264K GitHub stars
    • AI models and LLM tooling
  3. Open-source agent harness from DeepSeek, built on a plugin architecture

    • Open source
    • Open-source agent
    • 282K GitHub stars
    • Multi-agent frameworks
  4. dify

    Agent

    Visual platform for building and deploying agentic workflows and knowledge pipelines

    • Freemium
    • Agent framework
    • 161K GitHub stars
    • Workflow automation
  5. Python library for building agents from a model, tools, prompt and middleware

    • Open source
    • Agent framework
    • 150K GitHub stars
    • AI models and LLM tooling
  6. Open-source terminal agent for Gemini Code Assist workflows on Google Cloud

    • Open source
    • Open-source agent
    • 109K GitHub stars
    • AI models and LLM tooling