# ag2

> ag2 is an open-source agent framework for ai models and llm tooling. Open-source Python framework for building and orchestrating multi-agent AI systems. It is available on API, CLI, self-hosted and macOS.

- **Kind:** Agent
- **Pricing:** Open source
- **Platforms:** API, CLI, self-hosted, macOS
- **Website:** https://ag2.ai
- **Repository:** https://github.com/ag2ai/ag2
- **GitHub stars:** 5,073
- **License:** Apache-2.0
- **Categories:** AI models and LLM tooling, multi-agent frameworks, developer tools
- **Listing updated:** 2026-11-14

## About

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.

## Features

- **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

## 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

- [AutoGPT](https://ai-powered.com/agents/autogpt-2): AutoGPT is a hosted agent for ai models and llm tooling.
- [hermes-agent](https://ai-powered.com/agents/hermes-agent): hermes-agent is a freemium open-source agent for ai models and llm tooling.
- [deepseek-harness](https://ai-powered.com/agents/deepseek-harness): deepseek-harness is an open-source agent for multi-agent frameworks.
- [dify](https://ai-powered.com/agents/dify): dify is a freemium agent framework for workflow automation.
- [langchain](https://ai-powered.com/agents/langchain): langchain is an open-source agent framework for ai models and llm tooling.
- [gemini-cli](https://ai-powered.com/agents/gemini-cli): gemini-cli is an open-source agent for ai models and llm tooling.
- [deer-flow](https://ai-powered.com/agents/deer-flow): deer-flow is an open-source agent for ai models and llm tooling.
- [ruflo](https://ai-powered.com/agents/ruflo-2): ruflo is an open-source agent framework for knowledge and memory.

---
Source: https://ai-powered.com/agents/ag2
