Skip to main content

multi-agent environment for research community simulation

Project description

Research Town: Simulator of Research Community

Python 3.10 GitHub pull request Arxiv Discord WeChat codecov

Introduction

Research Town is a multi-agent platform designed for studying community-level automatic research. To achieve community-based simulation, it defines:

  1. 🤖 Researcher: LLM research agents capable of skills such as reading papers, writing papers, discussing ideas, rebutting arguments, and writing reviews.
  2. 🎩 Environments: Multi-agent environments, similar to virtual study rooms, where research agents collaborate on tasks like idea discussion, rebuttal writing, or paper writing.
  3. ⚙️ Engines: Finite-state machines that manage agent involvement in environments and determine the next steps after task completion. For instance, engines guide agents coming out of idea discussion environment to paper writing environment and help select suitable agents to work together.

Get started

Install from pip

You can install research-town from pypi to use it as a package:

pip install research-town

Install from scratch

Use a virtual environment, e.g. with anaconda3:

conda create -n research-town python=3.10
conda activate research-town
curl -sSL https://install.python-poetry.org | python3

Configure environment variables

Environment variables such as OPENAI_API_KEY and database related configs are required to run the code. The recommended way to set all the required variable is

  1. Copy the .env.template file into the project root with the name .env.
cp .env.template .env
  1. Fill the required environment variables in the .env file.
  2. Source the .env file.
set -a
source .env
set +a

Running the examples

To run examples provided in the examples:

poetry install
cd examples
python research_town_demo.py

Developing

Develop Demo

To develop the demo (both frontend and backend):

cd frontend
npm install
npm start
poetry install -E backend
cd backend
DATABASE_FOLDER_PATH=`pwd`/sample_data uvicorn app.main:app --reload

Install dev options

Follow the installation instruction above and then, instead of running python -m pip install -e ., run the following commands:

python -m pip install -e ".[dev]"
mypy --install-types --non-interactive research_town
python -m pip install pre-commit
pre-commit install

The installation of pre-commit would avoid formatting error and large file injects into github commits.

New branch for each feature

git checkout -b feature/feature-name and PR to main branch.

Before committing

Run poetry run pytest to make sure all tests pass (this will ensure dynamic typing passed with beartype) and poetry run mypy --config-file pyproject.toml . to check static typing. (You can also run pre-commit run --all-files to run all checks)

Check github action result

Check the github action result to make sure all tests pass. If not, fix the errors and push again.

Star History Chart

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

research_town-0.0.2.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

research_town-0.0.2-py3-none-any.whl (50.7 kB view details)

Uploaded Python 3

File details

Details for the file research_town-0.0.2.tar.gz.

File metadata

  • Download URL: research_town-0.0.2.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.2 Linux/6.5.0-1025-azure

File hashes

Hashes for research_town-0.0.2.tar.gz
Algorithm Hash digest
SHA256 3761d8268041bb5a11918119458cf7e1d958dfc1aa07338a733570d0d658067c
MD5 c33ba4a68f396c1e6a12850d97808f05
BLAKE2b-256 cb99c80adafb8bbaed75fc388a0dfc4d83102e39af845b51eeffc9696cc7c1ee

See more details on using hashes here.

File details

Details for the file research_town-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: research_town-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 50.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.2 Linux/6.5.0-1025-azure

File hashes

Hashes for research_town-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b677b22567c7be01b8835c71f6fb175970d39ae82354801417037e3e9ab9de59
MD5 4599b3aa5d5005670f0a06808206a877
BLAKE2b-256 486a5cfc69b25b5584b1dabe97e8d3f3594182717b6a72fe1309ef15eb83ead3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page