| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
Assign different roles to GPTs to form a collaborative software entity for complex tasks.
Software Company Multi-Role Schematic (Gradually Implementing)
customized_tasks_by_MetaGPT_v2.mp4For example, if you type python startup.py "Design a RecSys like Toutiao", you would get many outputs, one of them is data & api design
It costs approximately $0.2 (in GPT-4 API fees) to generate one example with analysis and design, and around $2.0 for a full project.
# Step 1: Ensure that NPM is installed on your system. Then install mermaid-js. (If you don't have npm in your computer, please go to the Node.js offical website to install Node.js https://nodejs.org/ and then you will have npm tool in your computer.)
npm --version
sudo npm install -g @mermaid-js/mermaid-cli
# Step 2: Ensure that Python 3.9+ is installed on your system. You can check this by using:
python --version
# Step 3: Clone the repository to your local machine, and install it.
git clone https://github.com/geekan/metagpt
cd metagpt
pip install -e.Note:
If already have Chrome, Chromium, or MS Edge installed, you can skip downloading Chromium by setting the environment variable PUPPETEER_SKIP_CHROMIUM_DOWNLOAD to true.
Some people are having issues installing this tool globally. Installing it locally is an alternative solution,
npm install @mermaid-js/mermaid-clidon't forget to the configuration for mmdc in config.yml
PUPPETEER_CONFIG: "./config/puppeteer-config.json"
MMDC: "./node_modules/.bin/mmdc"if pip install -e. fails with error [Errno 13] Permission denied: '/usr/local/lib/python3.11/dist-packages/test-easy-install-13129.write-test', try instead running pip install -e. --user
To convert Mermaid charts to SVG, PNG, and PDF formats. In addition to the Node.js version of Mermaid-CLI, you now have the option to use Python version Playwright, pyppeteer or mermaid.ink for this task.
Playwright
pip install playwrightto support PDF conversion, please install Chrominum.
playwright install --with-deps chromiumuncomment MERMAID_ENGINE from config.yaml and change it to playwright
MERMAID_ENGINE: playwrightpyppeteer
pip install pyppeteerpyppeteer alow you use installed browsers, please set the following envirment
export PUPPETEER_EXECUTABLE_PATH = /path/to/your/chromium or edge or chromeplease do not use this command to install browser, it is too old
pyppeteer-installuncomment MERMAID_ENGINE from config.yaml and change it to pyppeteer
MERMAID_ENGINE: pyppeteermermaid.ink
uncomment MERMAID_ENGINE from config.yaml and change it to ink
MERMAID_ENGINE: inkNote: this method does not support pdf export.
# Step 1: Download metagpt official image and prepare config.yaml
docker pull metagpt/metagpt:latest
mkdir -p /opt/metagpt/{config,workspace}
docker run --rm metagpt/metagpt:latest cat /app/metagpt/config/config.yaml > /opt/metagpt/config/key.yaml
vim /opt/metagpt/config/key.yaml # Change the config
# Step 2: Run metagpt demo with container
docker run --rm \
--privileged \
-v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
-v /opt/metagpt/workspace:/app/metagpt/workspace \
metagpt/metagpt:latest \
python startup.py "Write a cli snake game"
# You can also start a container and execute commands in it
docker run --name metagpt -d \
--privileged \
-v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
-v /opt/metagpt/workspace:/app/metagpt/workspace \
metagpt/metagpt:latest
docker exec -it metagpt /bin/bash
$ python startup.py "Write a cli snake game"The command docker run ... do the following things:
# You can also build metagpt image by yourself.
git clone https://github.com/geekan/MetaGPT.git
cd MetaGPT && docker build -t metagpt:custom .# 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" |
# Run the script
python startup.py "Write a cli snake game"
# Do not hire an engineer to implement the project
python startup.py "Write a cli snake game" --implement False
# Hire an engineer and perform code reviews
python startup.py "Write a cli snake game" --code_review TrueAfter running the script, you can find your new project in the workspace/ directory.
You can tell which platform or tool you want to use when stating your requirements.
python startup.py "Write a cli snake game based on pygame"NAME
startup.py - We are a software startup comprised of AI. By investing in us, you are empowering a future filled with limitless possibilities.
SYNOPSIS
startup.py IDEA <flags>
DESCRIPTION
We are a software startup comprised of AI. By investing in us, you are empowering a future filled with limitless possibilities.
POSITIONAL ARGUMENTS
IDEA
Type: str
Your innovative idea, such as "Creating a snake game."
FLAGS
--investment=INVESTMENT
Type: float
Default: 3.0
As an investor, you have the opportunity to contribute a certain dollar amount to this AI company.
--n_round=N_ROUND
Type: int
Default: 5
NOTES
You can also use flags syntax for POSITIONAL ARGUMENTS
from metagpt.software_company import SoftwareCompany
from metagpt.roles import ProjectManager, ProductManager, Architect, Engineer
async def startup(idea: str, investment: float = 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.
It is difficult to install and configure the local environment for some users. The following tutorials will allow you to quickly experience the charm of MetaGPT.
Try it on Huggingface Space
For now, cite the Arxiv paper:
@misc{hong2023metagpt,
title={MetaGPT: Meta Programming for Multi-Agent Collaborative Framework},
author={Sirui Hong and Xiawu Zheng and Jonathan Chen and Yuheng Cheng and Jinlin Wang and Ceyao Zhang and Zili Wang and Steven Ka Shing Yau and Zijuan Lin and Liyang Zhou and Chenyu Ran and Lingfeng Xiao and Chenglin Wu},
year={2023},
eprint={2308.00352},
archivePrefix={arXiv},
primaryClass={cs.AI}
}If you have any questions or feedback about this project, please feel free to contact us. We highly appreciate your suggestions!
We will respond to all questions within 2-3 business days.
demo-cli-blackjack-compress.mp4📢 Join Our Discord Channel! https://discord.gg/ZRHeExS6xv
Looking forward to seeing you there! 🎉
| Back | FazBrowse Home | New Git URL |