<h1 align="center"> π€ AgentVerse πͺ </h1>
<!--
<h3 align="center">
<p>A Framework for Multi-LLM Environment Simulation</p>
</h3>
-->
<p align="center">
<a href="https://github.com/OpenBMB/AgentVerse/blob/main/LICENSE">
<img alt="License: Apache2" src="https://img.shields.io/badge/License-Apache_2.0-green.svg">
</a>
<a href="https://www.python.org/downloads/release/python-3916/">
<img alt="Python Version" src="https://img.shields.io/badge/python-3.9+-blue.svg">
</a>
<a href="https://github.com/OpenBMB/AgentVerse/actions/">
<img alt="Build" src="https://img.shields.io/github/actions/workflow/status/OpenBMB/AgentVerse/test.yml">
</a>
<a href="https://github.com/psf/black">
<img alt="Code Style: Black" src="https://img.shields.io/badge/code%20style-black-black">
<!-- </a>
<a href="https://github.com/OpenBMB/AgentVerse/issues">
<img alt="Contributions: Welcome" src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat">
</a> -->
<a href="https://huggingface.co/AgentVerse">
<img alt="HuggingFace" src="https://img.shields.io/badge/hugging_face-play-yellow">
</a>
<a href="https://discord.gg/gDAXfjMw">
<img alt="Discord" src="https://img.shields.io/badge/AgentVerse-Discord-purple?style=flat">
</a>
</p>
<p align="center">
<img src="./imgs/title.png" width="512">
</p>
<p align="center">
γ<a href="https://arxiv.org/abs/2308.10848">Paper</a>γ
</p>
<p align="center">
γEnglish | <a href="README_zh.md">Chinese</a>γ
</p>
AgentVerse is designed to facilitate the deployment of multiple LLM-based agents in various applications. AgentVerse primarily provides two frameworks: task-solving and simulation.
- Task-solving: This framework assembles multiple agents as an automatic multi-agent system (AgentVerse-Tasksolving, Multi-agent as system) to collaboratively accomplish the corresponding tasks.
Applications: software development system, consulting system, etc.
<p align="center">
<img width="616" alt="Screen Shot 2023-09-01 at 12 08 57 PM" src="https://github.com/OpenBMB/AgentVerse/assets/11704492/6db1c907-b7fc-42f9-946c-89853a28f386">
</p>
- Simulation: This framework allows users to set up custom environments to observe behaviors among, or interact with, multiple agents. β οΈβ οΈβ οΈ We're refactoring the code. If you require a stable version that exclusively supports simulation framework, you can use
release-0.1 branch. Applications: game, social behavior research of LLM-based agents, etc.
<p align="center">
<img width="616" alt="Screen Shot 2023-10-16 at 10 53 49 PM" src="https://github.com/OpenBMB/AgentVerse/assets/11704492/4102d1e2-3fe7-4656-aa2c-a218ce1f2c95">
</p>
π° What's New
-
[2024/3/17] AgentVerse was introduced in NVIDIA's blog - Building Your First LLM Agent Application.
-
[2024/1/17] We're super excited to announce that our paper got accepted at ICLR 2024. More updates will be coming soon!
-
[2023/10/17] We're super excited to share our open-source AI community hugging face: AgentVerse. You are able to try out the two simulation applications, NLP Classroom and Prisoner's Dilemma,with your code of the openai API key and the openai organization. Have fun!
-
[2023/10/5] Re-factor our codebase to enable the deployment of both simulation and task-solving framework! We have placed the code for Minecraft example in the paper at the minecraft branch. Our tool-using example will soon be updated to the main branch. Stay tuned!
-
[2023/8/22] We're excited to share our paper AgentVerse: Facilitating Multi-Agent Collaboration and Exploring Emergent Behaviors in Agents that illustrate the task-solving framework
in detail of AgentVerse.
-
[2023/6/5] We are thrilled to present an array of demos, including NLP Classroom, Prisoner Dilemma, Software Design, Database Administrator, and a simple H5 Pokemon Game that enables the interaction with the characters in Pokemon! Try out these demos and have fun!
-
[2023/5/1] π AgentVerse is officially launched!
π Coming Soon
- [x] Code release of our paper
- [x] Add support for local LLM (LLaMA, Vicunna, etc.)
- [ ] Add documentation
- [ ] Support more sophisticated memory for conversation history
<!--
## πΎ Simple Demo Video
We demonstrate the following cases that are expertly crafted by AgentVerse.
#### NLP Classroom
In the NLP class, the professor and students engage in interactive communication. When students have a question, they raise their hands and patiently wait for the professor to call on them. Only after being called on by the professor, can students speak and ask their questions.
Use the following command to launch the NLP Classroom example:
```bash
python agentverse_command/main_simulation_gui.py --task simulation/nlp_classroom_9players
```
https://github.com/OpenBMB/AgentVerse/assets/11704492/6ea07850-595e-4a28-a82e-f863011353c2
#### Prisoner Dilemma
A prisoner's Dilemma is a thought experiment that challenges two completely rational agents to a dilemma: they can cooperate with their partner for mutual benefit or betray their partner ("defect") for individual reward.
Use the following command to launch the Prisoner Dilemma example:
```bash
python agentverse_command/main_simulation_gui.py --task simulation/prisoner_dilemma
```
https://github.com/OpenBMB/AgentVerse/assets/11704492/017c46e5-c738-4fca-9352-b008e2d518bd
#### Software Design
In the Software Design example, a code writer, a code tester and a code reviewer collaborate on the code generation problem. Given a problem, the code writer first composes the code implementation. The code tester runs the unit tests and provides the feedback. The code viewer then generates a review. After collecting the test feedback and review, the code writer iteratively refines the code.
Use the following command to launch the Software Design example:
```bash
python agentverse_command/main_simulation_gui.py --task simulation/sde_team/sde_team_2players
```
https://github.com/OpenBMB/AgentVerse/assets/11704492/5058066a-abee-490d-8659-b4e54661626a
#### [Database Administrator (DBA)](https://github.com/TsinghuaDatabaseGroup/DB-GPT)
In the database diagnosis scenario, the Chief DBA monitors the system anomalies (e.g., slow queries, locks, crash down). If detected, the domain experts are alerted to analyze root causes, share insights, and suggest optimization solutions together. The Chief DBA then provides a summarized report to the user.
```bash
python agentverse_command/main_simulation_gui.py --task simulation/db_diag
```
https://github.com/OpenBMB/AgentVerse/assets/11704492/c633419d-afbb-47d4-bb12-6bb512e7af3a
#### [Text Evaluation (ChatEval)](https://github.com/chanchimin/ChatEval)
In the context of the text evaluation scenario, we recommend users explore the [ChatEval](https://github.com/chanchimin/ChatEval) repo. They've implemented a multi-agent referee team on AgentVerse to assess the quality of text generated by different models. When given two distinct pieces of text, roles within ChatEval can autonomously debate the nuances and disparities, drawing upon their assigned personas, and subsequently provide their judgments. Experiments indicate that their referee team, enriched with diverse roles specified in [config.yaml](#2-configuring-the-agents), aligns more closely with human evaluations. This demo is built upon the [Fastchat](https://github.com/lm-sys/FastChat) repo, and we'd like to express our appreciation for their foundational work.
https://github.com/OpenBMB/AgentVerse/assets/75533759/58f33468-f15b-4bac-ae01-8d0780019f85
#### Pokemon
**Currently available only in [`release-0.1`](https://github.com/OpenBMB/AgentVerse/tree/release-0.1)**. In the game, agents can walk around the game world, and interact with one another. As a player, you take on the role of an agent and can engage with others at any time. There are 6 characters in the PokΓ©mon environment who appeared in Pokemon Emerald: [May](https://bulbapedia.bulbagarden.net/wiki/May_(game)), [Professor Birch](https://bulbapedia.bulbagarden.net/wiki/Professor_Birch), [Steven Stone](https://bulbapedia.bulbagarden.net/wiki/Steven_Stone), [Maxie](https://bulbapedia.bulbagarden.net/wiki/Maxie), [Archie](https://bulbapedia.bulbagarden.net/wiki/Archie) and [Joseph](https://bulbapedia.bulbagarden.net/wiki/Mr._Stone).
To launch the Pokemon game, first launch a local server with the following command:
```bash
uvicorn pokemon_server:app --reload --port 10002
```
Then open another terminal in the project's root path and run the following command:
```bash
cd ui
# If you do not have npm installed, you need to install it before running the following commands
# https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
# We have tested on npm@9.6.4, node@20.0.0
npm install
npm run watch
```
Wait for the compilation to complete, and have fun! (WASD for moving around, and SPACE for launching a conversation.)
https://github.com/OpenBMB/AgentVerse/assets/11704492/4d07da68-f942-4205-b558-f155e95782e7
-->
<!--
## Contents
- [β¨ Features](#-features)
- [π° What's New](#-whats-new)
- [π Join Us!](#-join-us)
- [How Can You Contribute?](#how-can-you-contribute)
- [π Coming Soon](#-coming-soon)
- [πΎ Simple Demo Video](#-simple-demo-video)
- [NLP Classroom](#nlp-classroom)
- [Prisoner Dilemma](#