# Develop with AutoGen

## Introduction

AutoGen is an open-source programming framework for building AI agents and facilitating cooperation among multiple agents to solve tasks. We made it so that agent applications developed with Autogen can run on AIOS by adding just one line of code.

(Only support AutoGen version\~0.2 now)

## Quick Start

For installation and usage of AutoGen, please refer to [AutoGen](https://microsoft.github.io/autogen/docs/Getting-Started).

If you want to run an application developed with Autogen on AIOS, please add `prepare_framework()` before you create an autogen agent, and select a framework type through `FrameworkType`. When you want to use AutoGen, you should use `FrameworkType.AutoGen`. Then create autogen agent. When running on AIOS, you don't need to supply parameter `llm_config`, this parameter configures the llm model that the agent will use. Because AIOS will deal with the calling of llms in the backend.

```
+ with aios_starter(**vars(args)):
+    prepare_framework(FrameworkType.AutoGen)
    
     # Create the agent that uses the LLM.
     assistant = ConversableAgent("agent")
    
     # Create the agent that represents the user in the conversation.
     user_proxy = UserProxyAgent("user", code_execution_config=False)
    
     # Let the assistant start the conversation.  It will end when the user types exit.
     assistant.initiate_chat(user_proxy, message="How can I help you today?")

```

More examples can be found in <https://github.com/agiresearch/AIOS/tree/main/scripts/aios-autogen>[.](https://github.com/agiresearch/Cerebrum/blob/main/cerebrum/community/adapter/autogen_adapter.py)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aios.foundation/aios-docs/aios-agent/how-to-develop-agents/develop-with-autogen.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
