Skip to content
forked from geekan/MetaGPT

⭐ The Multi-Agent Meta Programming Framework: Given one line Requirement, return PRD, Design, Tasks, Repo

License

Notifications You must be signed in to change notification settings

nmalogy/MetaGPT

Repository files navigation

MetaGPT: The Multi-Role Meta Programming Framework

English / 中文

Currently, we have managed to enable GPT to work in software company, collaborating to tackle more complex tasks.

  1. The team can handle Boss's one line Requirement cooperate and generate user stories / competetive analysis / requirements / data structures / apis / files etc.
  2. The team consists of product manager / architect / project manager / engineer, it provides the full process of a software company.

Examples (fully generated by GPT-4)

  1. Each column here is a requirement of using the command python startup.py <requirement>.
  2. By default, an investment of three dollars is made for each example and the program stops once this amount is depleted.
    1. It requires around $0.2 (GPT-4 api's costs) to generate one example with analysis and design.
    2. It requires around $2.0 (GPT-4 api's costs) to generate one example with a full project.
Design an MLOps/LLMOps framework that supports GPT-4 and other LLMs Design a RecSys like Toutiao Design a search algorithm framework
Competitive Analysis LLMOps Competitive Analysis Jinri Toutiao Recsys Competitive Analysis Search Algorithm Framework Competitive Analysis
Data & API Design LLMOps Data & API Design Jinri Toutiao Recsys Data & API Design Search Algorithm Framework Data & API Design
Sequence Flow LLMOps Sequence Flow Jinri Toutiao Recsys Sequence Flow Search Algorithm Framework Sequence Flow

Installation

# Step 1: Ensure that Python 3.9+ is installed on your system. You can check this by using:
python --version

# Step 2: Ensure that NPM is installed on your system. You can check this by using:
npm --version

# Step 3: Clone the repository to your local machine, and install it.
git clone https://github.com/geekan/metagpt
cd metagpt
python setup.py install

Configuration

  • Configure your OPENAI_API_KEY in config/key.yaml / config/config.yaml / env
  • Priority order: config/key.yaml > config/config.yaml > env
# Copy the configuration file and make the necessary modifications.
cp config/config.yaml config/key.yaml
Variable Name config/key.yaml env
OPENAI_API_KEY # Replace with your own key OPENAI_API_KEY: "sk-..." export OPENAI_API_KEY="sk-..."
OPENAI_API_BASE # Optional OPENAI_API_BASE: "https://<YOUR_SITE>/v1" export OPENAI_API_BASE="https://<YOUR_SITE>/v1"

Tutorial: Initiating a startup

python startup.py "Write a cli snake game"

After running the script, you can find your new project in the workspace/ directory.

What's behind? It's a startup fully driven by GPT. You're the investor

A software company consists of LLM-based roles

Code walkthrough

from metagpt.software_company import SoftwareCompany
from metagpt.roles import ProjectManager, ProductManager, Architect, Engineer

async def startup(idea: str, investment: str = '$3.0', n_round: int = 5):
    """Run a startup. Be a boss."""
    company = SoftwareCompany()
    company.hire([ProductManager(), Architect(), ProjectManager(), Engineer()])
    company.invest(investment)
    company.start_project(idea)
    await company.run(n_round=n_round)

You can check examples for more details on single role (with knowledge base) and LLM only examples.

Contact Information

If you have any questions or feedback about this project, feel free to reach out to us. We appreciate your input!

We aim to respond to all inquiries within 2-3 business days.

Demo

demo-cli-blackjack-compress.mp4

About

⭐ The Multi-Agent Meta Programming Framework: Given one line Requirement, return PRD, Design, Tasks, Repo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Dockerfile 0.5%