autogen/website/docs/Getting-Started.md

78 lines
5.0 KiB
Markdown
Raw Normal View History

2023-08-30 16:50:59 -04:00
# Getting Started
<!-- ### Welcome to AutoGen, a library for enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework! -->
AutoGen is a framework that enables development of LLM applications using multiple agents that can converse with each other to solve tasks. AutoGen agents are customizable, conversable, and seamlessly allow human participation. They can operate in various modes that employ combinations of LLMs, human inputs, and tools.
2023-08-30 16:50:59 -04:00
2023-09-04 10:17:29 -04:00
![AutoGen Overview](/img/autogen_agentchat.png)
2023-08-30 16:50:59 -04:00
### Main Features
2023-09-08 09:42:55 -04:00
* AutoGen enables building next-gen LLM applications based on **multi-agent conversations** with minimal effort. It simplifies the orchestration, automation and optimization of a complex LLM workflow. It maximizes the performance of LLM models and overcome their weaknesses.
2023-09-04 10:17:29 -04:00
* It supports **diverse conversation patterns** for complex workflows. With customizable and conversable agents, developers can use AutoGen to build a wide range of conversation patterns concerning conversation autonomy,
2023-08-30 16:50:59 -04:00
the number of agents, and agent conversation topology.
2023-09-04 10:17:29 -04:00
* It provides a collection of working systems with different complexities. These systems span a **wide range of applications** from various domains and complexities. They demonstrate how AutoGen can easily support different conversation patterns.
* AutoGen provides a drop-in replacement of `openai.Completion` or `openai.ChatCompletion` as an **enhanced inference API**. It allows easy performance tuning, utilities like API unification & caching, and advanced usage patterns, such as error handling, multi-config inference, context programming etc.
2023-08-30 16:50:59 -04:00
AutoGen is powered by collaborative [research studies](/docs/Research) from Microsoft, Penn State University, and University of Washington.
### Quickstart
2023-09-16 16:34:16 +00:00
Install from pip: `pip install pyautogen`. Find more options in [Installation](/docs/Installation).
For [code execution](/docs/FAQ#code-execution), we strongly recommend installing the python docker package, and using docker.
2023-08-30 16:50:59 -04:00
2023-09-02 21:58:13 -04:00
#### Multi-Agent Conversation Framework
2023-08-30 17:48:31 -04:00
Autogen enables the next-gen LLM applications with a generic multi-agent conversation framework. It offers customizable and conversable agents which integrate LLMs, tools and human.
By automating chat among multiple capable agents, one can easily make them collectively perform tasks autonomously or with human feedback, including tasks that require using tools via code. For [example](https://github.com/microsoft/autogen/blob/main/test/twoagent.py),
2023-08-30 16:50:59 -04:00
```python
from autogen import AssistantAgent, UserProxyAgent, config_list_from_json
# Load LLM inference endpoints from an env variable or a file
# See https://microsoft.github.io/autogen/docs/FAQ#set-your-api-endpoints
# and OAI_CONFIG_LIST_sample.json
config_list = config_list_from_json(env_or_file="OAI_CONFIG_LIST")
assistant = AssistantAgent("assistant", llm_config={"config_list": config_list})
user_proxy = UserProxyAgent("user_proxy", code_execution_config={"work_dir": "coding"})
user_proxy.initiate_chat(assistant, message="Plot a chart of NVDA and TESLA stock price change YTD.")
2023-08-30 16:50:59 -04:00
# This initiates an automated chat between the two agents to solve the task
```
2023-09-04 10:17:29 -04:00
The figure below shows an example conversation flow with AutoGen.
![Agent Chat Example](/img/chat_example.png)
2023-09-02 21:58:13 -04:00
2023-09-27 21:01:09 +00:00
* [Code examples](/docs/Examples/AutoGen-AgentChat).
* [Documentation](/docs/Use-Cases/agent_chat).
2023-09-02 21:58:13 -04:00
#### Enhanced LLM Inferences
2023-08-30 16:50:59 -04:00
Autogen also helps maximize the utility out of the expensive LLMs such as ChatGPT and GPT-4. It offers a drop-in replacement of `openai.Completion` or `openai.ChatCompletion` with powerful functionalites like tuning, caching, error handling, templating. For example, you can optimize generations by LLM with your own tuning data, success metrics and budgets.
```python
# perform tuning
2023-08-30 17:27:35 -04:00
config, analysis = autogen.Completion.tune(
2023-08-30 16:50:59 -04:00
data=tune_data,
metric="success",
mode="max",
eval_func=eval_func,
inference_budget=0.05,
optimization_budget=3,
num_samples=-1,
)
# perform inference for a test instance
response = autogen.Completion.create(context=test_instance, **config)
```
2023-09-27 21:01:09 +00:00
* [Code examples](/docs/Examples/AutoGen-Inference).
* [Documentation](/docs/Use-Cases/enhanced_inference).
2023-08-30 16:50:59 -04:00
### Where to Go Next?
2023-09-27 21:01:09 +00:00
* Understand the use cases for [multi-agent conversation](/docs/Use-Cases/agent_chat) and [enhanced LLM inference](/docs/Use-Cases/enhanced_inference).
* Find [code examples](/docs/Examples/AutoGen-AgentChat).
2023-09-19 13:29:52 +00:00
* Read [SDK](/docs/reference/agentchat/conversable_agent/).
2023-09-03 15:42:36 -04:00
* Learn about [research](/docs/Research) around AutoGen.
2023-09-21 02:30:53 +00:00
* Chat on [Discord](https://discord.gg/pAbnFJrkgZ).
* Follow on [Twitter](https://twitter.com/pyautogen).
2023-08-30 16:50:59 -04:00
2023-09-16 16:34:16 +00:00
If you like our project, please give it a [star](https://github.com/microsoft/autogen/stargazers) on GitHub. If you are interested in contributing, please read [Contributor's Guide](/docs/Contribute).
2023-08-30 16:50:59 -04:00
2023-10-03 16:45:55 -07:00
<iframe src="https://ghbtns.com/github-btn.html?user=microsoft&amp;repo=autogen&amp;type=star&amp;count=true&amp;size=large" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>