AG2 (formerly AutoGen) is an open-source programming framework for building AI agents and facilitating cooperation among multiple agents to solve tasks. AG2 aims to streamline the development and research of agentic AI. It offers features such as agents capable of interacting with each other, facilitates the use of various large language models (LLMs) and tool use support, autonomous and human-in-the-loop workflows, and multi-agent conversation patterns. The project is currently maintained by a dynamic group of volunteers from several organizations. Contact project administrators Chi Wang and Qingyun Wu via [email protected] if you are interested in becoming a maintainer. For a step-by-step walk through of AG2 concepts and code, see Basic Concepts in our documentation. AG2 requires Python version >= 3.9, < 3.14. AG2 is available via ag2 (or its alias pyautogen or autogen) on PyPI. Minimal dependencies are installed by default. You can install extra options based on the features you need. To keep your LLM dependencies neat we recommend using the OAI_CONFIG_LIST file to store your API keys. You can use the sample file OAI_CONFIG_LIST_sample as a template. Create a script or a Jupyter Notebook and run your first agent. We maintain a dedicated repository with a wide range of applications to help you get started with various use cases or check out our collection of jupyter notebooks as a starting point.