ag2ai/ag2

AG2 (formerly AutoGen): The Open-Source AgentOS.Join us at: https://discord.gg/sNGSwQME3x

What it solves

AG2 provides a structured programming framework to build AI agents and facilitate cooperation among multiple agents to solve complex tasks. It streamlines the development of agentic AI by providing standardized ways for agents to interact, use tools, and manage conversation patterns.

How it works

AG2 uses a protocol-driven architecture where the core building block is the Agent, which communicates with model providers and can execute Python functions as tools. For multi-agent coordination, it uses a Network consisting of a Hub and typed channels (such as conversation, consulting, discussion, or workflow) to manage communication. It also includes an "agent harness" that provides optional primitives like persistent knowledge stores and context compaction to manage memory and history.

Who it’s for

Developers and researchers looking to build autonomous AI agents, multi-agent workflows, or complex agentic systems that require human-in-the-loop oversight and persistent memory.

Highlights

  • Multi-Agent Orchestration: Uses a Hub-and-channel network for complex agent interactions.
  • Tool Integration: Easily extends agent capabilities using decorated Python functions.
  • Human-in-the-Loop: Supports pausing agent execution to request human confirmation or input.
  • Agent Harness: Includes built-in support for persistent knowledge and history compaction.
  • Advanced Patterns: Supports structured outputs, middleware, telemetry, and evaluation.