MetaGPT

MetaGPT: Multi-Agent Meta Programming Framework

1 min


[vc_headings linewidth=”0″ borderwidth=”1″ borderclr=”#000000″ title=”MetaGPT” google_fonts=”font_family:Comfortaa%3A300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal” titlesize=”60″ titleclr=”#000000″]

Multi-Agent Meta Programming Framework

[/vc_headings]

MetaGPT-logo

MetaGPT is a powerful tool that leverages multiple GPT models to perform complex tasks based on a single-line requirement. It can generate user stories, competitive analysis, requirements, data structures, APIs, and documents for any given project. MetaGPT aims to simplify and automate the software development process by providing high-quality and relevant outputs.

Meta-GPT
[vc_headings style=”theme4″ borderclr=”#000000″ style2=”image” title=”Getting Started 🚀” google_fonts=”font_family:Comfortaa%3A300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal” lineheight=”3″ titlesize=”40″ titleclr=”#000000″ image_id=”2854″][/vc_headings]

Installation

# Step 1: Ensure that NPM is installed on your system. Then install mermaid-js.
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
python setup.py install

Docker Installation 🐋

# Step 1: Download metagpt official image and prepare config.yaml
docker pull metagpt/metagpt:v0.1
mkdir -p /opt/metagpt/config && docker run --rm metagpt/metagpt:v0.1 cat /app/metagpt/config/config.yaml > /opt/metagpt/config/config.yaml
vim /opt/metagpt/config/config.yaml # Change the config

# Step 2: Run metagpt image
docker run --name metagpt -d \
    -v /opt/metagpt/config:/app/metagpt/config \
    -v /opt/metagpt/workspace:/app/metagpt/workspace \
    metagpt/metagpt:v0.1

# Step 3: Access the metagpt container
docker exec -it metagpt /bin/bash

# Step 4: Play in the container
cd /app/metagpt
python startup.py "Write a cli snake game"

The command docker run ... will do the following :

  • Start the Metagpt container with the default command tail -f /dev/null
  • Map host directory /opt/metagtp/config to the container directory /app/metagpt/config
  • Map host directory /opt/metagpt/workspace to the container directory /app/metagpt/workspace

Build an image by yourself

# You can also build metagpt image by yourself.
cd metagpt && docker build --network host -t metagpt:v0.1 .

Configuration

  • Configure your OPENAI_API_KEY in any of 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"

The script creates a new project in the workspace/ directory.

Code walkthrough

    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)
    
  

External Links 🔗

[mvc_advanced_button align=”center” btn_text=”Github” icon_size=”25″ use_theme_fonts=”yes” btn_icon=”fab fa-github” btn_url=”url:https%3A%2F%2Fgithub.com%2Fgeekan%2FMetaGPT|target:_blank” btn_clr=”#ffffff” btn_bg=”#0a0a0a” btn_radius=”50″ caption_url=”” caption_urls=”” caption_urlss=””]
[mvc_advanced_button align=”center” btn_text=”Mail” icon_size=”25″ use_theme_fonts=”yes” btn_icon=”fas fa-at” btn_url=”url:mailto%3Aalexanderwu%40fuzhi.ai|target:_blank” btn_clr=”#ffffff” btn_bg=”#0e76a8″ btn_radius=”50″ caption_url=”” caption_urls=”” caption_urlss=””]

Like it? Share with your friends!

0

0 Comments

Your email address will not be published. Required fields are marked *

Belmechri

I am an IT engineer, content creator, and proud father with a passion for innovation and excellence. In both my personal and professional life, I strive for excellence and am committed to finding innovative solutions to complex problems.
Choose A Format
Personality quiz
Series of questions that intends to reveal something about the personality
Trivia quiz
Series of questions with right and wrong answers that intends to check knowledge
Poll
Voting to make decisions or determine opinions
Story
Formatted Text with Embeds and Visuals
List
The Classic Internet Listicles
Countdown
The Classic Internet Countdowns
Open List
Submit your own item and vote up for the best submission
Ranked List
Upvote or downvote to decide the best list item
Meme
Upload your own images to make custom memes
Video
Youtube and Vimeo Embeds
Audio
Soundcloud or Mixcloud Embeds
Image
Photo or GIF
Gif
GIF format