# Contribution Policy

AG2 is what it is today because of its contributors. This page explains how contributions will work in the v1.0 era — what lives in Core, what lives as an Extension, and what we ask of contributors in each.

Note

This policy applies to the **AG2 Beta** track (`autogen.beta`), which becomes the official AG2 framework at v1.0. See the [Release Roadmap](https://docs.ag2.ai/0.13.1/docs/user-guide/release-roadmap/) for the full v1.0 plan.

## Why a new policy

**AG2 v1.0 is focused on production and scalability.** Teams building real systems on AG2 need a foundation that is small, predictable, and dependable under load. Core is what those teams depend on, and keeping it tight is critical to the v1.0 release.

Over the years AG2 has grown to include many agents, tools, and integrations — many contributed by the community. That is a great strength, but has made the framework heavier than it needs to be and harder to evolve and support.

For v1.0, we want a focused **Core** that AG2 actively maintains, alongside a vibrant set of **Extensions** maintained by the contributors who care about them most.

## Core and Extensions

**Core** is the foundational AG2 Beta framework — maintained by AG2 with contributions from the community and AG2 team, kept lightweight, and held to a strict quality bar.

Today, everything shipped under `autogen.beta` is Core: the Agent runtime, primary LLM providers, common built-in tools, middleware, structured output, telemetry, history management, and the context and dependency-injection primitives.

**Extensions** are first-class components of the AG2 ecosystem — agents, tools, providers, middleware, and integrations that extend what you can build with Core. Most are community-contributed, but AG2 may also author Extensions where it makes sense. The defining characteristic of an Extension is **who maintains it** — every Extension has a named maintainer (AG2 or community) who commits to keeping it working. Typical Extensions include:

- Additional middleware
- LLM providers and third-party model gateways
- Third-party code executors and sandboxing backends
- Domain-specific tools and integrations
- Adapters for external frameworks and services

Reliance on a third-party SDK is a strong signal that something belongs in Extensions, but the deciding question is who is best placed to own it long-term — AG2 or a contributor closer to the integration. An Extension can be just as widely used and just as polished as anything in Core; what differs is the maintenance model.

Extensions are first-class

An Extension is not a second-tier component. The bar for documentation, tests, and code quality is the same one Core is held to.

## Phase 1 — until v1.0

Core and Extensions live in the same repository. Extensions go under `autogen/beta/extensions/` and ship as part of `pip install ag2`. The contribution flow stays familiar during the transition.

## Phase 2 — at v1.0

- **Core** stays in this repository.
- **Extensions** move to a dedicated repository, with their own documentation alongside.
- A separate **Extensions-archived** repository holds Extensions that are no longer maintained. Archived Extensions remain available and can be revived.

## Contributing to Core

Core is held to the rigour AG2 contributors are used to:

- A core maintainer must agree to support the change.
- Tests with meaningful coverage of new behaviour.
- Type hints, docstrings, and the development standards outlined in documentation and `AGENTS.md`.
- Documentation updated in the same PR where applicable.
- New dependencies added sparingly — Core is intentionally lightweight.
- Security considered — changes must not weaken Core's security, and contributors are expected to assess the security impact of what they ship.

If you are unsure whether a change belongs in Core or as an Extension, open an Issue or draft PR first.

## Contributing an Extension

Extensions are held to the same quality bar as Core; the difference is that the maintenance commitment sits with the Extension's maintainer rather than with AG2. An Extension contribution must:

- Include **documentation** that lets a new user understand and use it.
- Include **tests** covering the Extension's behaviour.
- Declare third-party packages as **additional dependencies**.
- Pass **code review by AG2**.
- Have a **named maintainer** who agrees to respond to issues and PRs, keep the Extension working with current Core releases, and let AG2 know if they can no longer maintain it.

## Contributing Examples and Showcases

Full, runnable, examples and showcases, using Core or active Extensions, belong in the [build-with-ag2](https://github.com/ag2ai/build-with-ag2) repository, not in Core or Extension repos.

When Core functionality is deprecated or Extensions are archived, corresponding Examples/Showcases will be removed from the Build-with-AG2 repository.

## Maintainership and inactivity

We do not expect anyone to maintain an Extension forever. What we ask is that maintainers tell us when they cannot continue.

In Phase 2, an Extension is considered for archival if **all** of the following hold:

- It has been broken for **30+ days**.
- The maintainer has not responded to issues or PRs for **30 days**.
- A **30-day notice** has been posted asking for a new maintainer.

## Promoting an Extension to Core

Promotion to Core is an exception, not a planned path. It requires a core maintainer willing to own the component, a track record of stability and adoption as an Extension, and compatibility with Core's dependency and quality expectations. If you think your Extension is a candidate, open an Issue and we will discuss.

## Working together

We are grateful for everyone who has contributed to AG2 — past, present, and future. This policy exists so AG2 can keep growing without losing the stability production users depend on, and so contributors have clear, fair expectations on both sides.

If anything is unclear or you have ideas to improve it, open an Issue or join us on [Discord](https://discord.com/invite/pAbnFJrkgZ).

## Code documentation example

Below is a minimal sketch of AG2's coding documentation standard:

|     |     |
| --- | --- |
| ```<br> 1<br> 2<br> 3<br> 4<br> 5<br> 6<br> 7<br> 8<br> 9<br>10<br>11<br>12<br>13<br>14<br>15<br>16<br>17<br>18<br>19<br>20<br>21<br>22<br>23<br>24<br>25<br>26<br>27<br>28<br>29<br>30<br>31<br>32<br>33<br>34<br>35<br>36<br>37<br>38<br>39<br>40<br>41<br>42<br>43<br>44<br>45<br>46<br>``` | ```<br># Copyright (c) 2026, AG2ai, Inc., AG2ai open-source projects maintainers and core contributors<br>#<br># SPDX-License-Identifier: Apache-2.0<br>"""Acme search Extension for AG2.<br>Provides a tool that lets agents query the Acme Search API and<br>receive ranked search results with cited sources.<br>Maintainer: <github-handle><br>Docs: https://docs.ag2.ai/extensions/search-tools/acme<br>Examples: https://github.com/ag2ai/build-with-ag2/extensions/acme-search-tool<br>"""<br>from autogen.beta.tools import Tool<br>class AcmeSearch(Tool):<br>    """Tool that performs web searches via the Acme Search API.<br>    Attributes:<br>        api_key: Acme Search API key. Sent in the ``Authorization`` header.<br>        max_results: Maximum number of results to return per query.<br>    """<br>    def __init__(self, api_key: str, max_results: int = 5) -> None:<br>        ...<br>    async def search(self, query: str) -> list["SearchResult"]:<br>        """Run a search against the Acme Search API.<br>        Args:<br>            query: The natural-language query to send.<br>        Returns:<br>            A list of ``SearchResult`` objects, ordered by relevance.<br>        """<br>        ...<br>``` |
