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

To run examples provided in the examples:

poetry install
cd examples
python research_town_demo.py

Configure API keys

OpenAI key is required to run the code. Please set the environment variable OPENAI_API_KEY to your key. The recommend way is to add the key to the conda environment:

conda env config vars set OPENAI_API_KEY=your_key

For some experiments, TogetherAI key is also needed to run the code. Please set the environment variable TOGETHERAI_API_KEY to your key (notice: not TOGETHER_API_KEY). The recommend way is to add the key to the conda environment:

conda env config vars set TOGETHER_API_KEY=your_key

Developing

Develop UI part

To develop the UI part (both frontend and backend):

cd frontend
npm install
npm start
poetry install -E backend
cd backend
uvicorn 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.1b2.tar.gz (30.7 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.1b2-py3-none-any.whl (41.8 kB view details)

Uploaded Python 3

File details

Details for the file research_town-0.0.1b2.tar.gz.

File metadata

  • Download URL: research_town-0.0.1b2.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.2 Linux/6.8.0-1014-azure

File hashes

Hashes for research_town-0.0.1b2.tar.gz
Algorithm Hash digest
SHA256 5e98616771ee727ed79c18c648e3aaff96214086d215b1409ac6a36b7bd72053
MD5 67a53366cf1c0a0c4a6138b00311b46a
BLAKE2b-256 91ebd6c50dc57fc68053178a6ef99b3500fd70f44aa0c7305c972bd08f29a033

See more details on using hashes here.

File details

Details for the file research_town-0.0.1b2-py3-none-any.whl.

File metadata

  • Download URL: research_town-0.0.1b2-py3-none-any.whl
  • Upload date:
  • Size: 41.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.2 Linux/6.8.0-1014-azure

File hashes

Hashes for research_town-0.0.1b2-py3-none-any.whl
Algorithm Hash digest
SHA256 5e1d177570cf32aadd0f3d9517c69214da421f0521932e7e25de1e1779804a5f
MD5 7ff3c99a2d2b82ee0f682488f7a419cb
BLAKE2b-256 4bf0b0c813ede5333072daca095fe95445c1b49ff11ee7b6b8c7001687518585

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