> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ag2.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

[LiteLLM Proxy Server](https://docs.litellm.ai/docs/simple_proxy) is an open-source, self-hosted proxy server that offers an OpenAI-compatible API, enabling seamless interaction with multiple LLM providers like OpenAI, Azure, IBM WatsonX etc.
It simplifies model integration, providing a unified interface for diverse AI backends.

This guide will walk you through integrating **LiteLLM Proxy Server** with **AG2**, ensuring efficient AI agent orchestration with minimal setup.

## Prerequisites

Before proceeding, ensure the following:

* **Docker** is installed. Refer to the [Docker installation guide](https://docs.docker.com/get-docker/)
* **(Optional)** Install **Postman** for easier API request testing.

## Installation

### Install AG2

**AG2** is a powerful framework designed to simplify AI agent orchestration.

To install `AG2`, simply run the following command:

```bash theme={null}
pip install ag2[openai]
```

<Tip>
  If you have been using `autogen` or `ag2`, all you need to do is upgrade it using:

  ```bash theme={null}
  pip install -U autogen[openai]
  ```

  or

  ```bash theme={null}
  pip install -U ag2[openai]
  ```

  as `autogen` and `ag2` are aliases for the same PyPI package.
</Tip>

### Install LiteLLM

LiteLLM runs as a lightweight proxy server, making it easier to integrate different LLM providers.

To install LiteLLM, download the latest Docker image:

```bash theme={null}
docker pull ghcr.io/berriai/litellm:main-latest
```

<div className="edit-url-container">
  <a className="edit-url" href="https://github.com/ag2ai/ag2/edit/main/website/docs/user-guide/models/litellm-proxy-server/installation.mdx" target="_blank"><Icon icon="pen" iconType="solid" size="13px" /> Edit this page</a>
</div>
