MetaGPT( The Multi-Agent Framework):颠覆AI开发的革命性多智能体元编程框架

简介: MetaGPT( The Multi-Agent Framework):颠覆AI开发的革命性多智能体元编程框架

"MetaGPT( The Multi-Agent Framework):颠覆AI开发的革命性多智能体元编程框架"

一个多智能体元编程框架,给定一行需求,它可以返回产品文档、架构设计、任务列表和代码。这个项目提供了一种创新的方式来管理和执行项目,将需求转化为具体的文档和任务列表,使项目管理变得高效而智能。对于需要进行规划和协调的项目,这个框架提供了强大的支持.

MetaGPT's 能力展示

https://github.com/geekan/MetaGPT/assets/34952977/34345016-5d13-489d-b9f9-b82ace413419

例如,如果你输入' python startup.py ' ' Design a RecSys like今日头条' ',你会得到很多输出,其中之一是data & api Design

生成一个分析和设计示例的成本约为0.2美元(在GPT-4 API费用中),而生成一个完整项目的成本约为2.0美元。

1.安装

1.1 安装视频指南

  • 常规安装
#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-cli
    
  • don'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

  • 将Mermaid图表转换为SVG、PNG和PDF格式。除了Node.js版本的mermaid - cli之外,你现在还可以选择使用Python版本的剧作家、pyppeteer或mermaid。

    • Playwright

      • Install Playwright
      pip install playwright
      
      • Install the Required Browsers

      to support PDF conversion, please install Chrominum.

      playwright install --with-deps chromium
      
      • modify config.yaml

      uncomment MERMAID_ENGINE from config.yaml and change it to playwright

      MERMAID_ENGINE: playwright
      
    • pyppeteer

      • Install pyppeteer
      pip install pyppeteer
      
      • Use your own Browsers

      pyppeteer alow you use installed browsers, please set the following envirment

      export PUPPETEER_EXECUTABLE_PATH = /path/to/your/chromium or edge or chrome
      

      please do not use this command to install browser, it is too old

      pyppeteer-install
      
      • modify config.yaml

      uncomment MERMAID_ENGINE from config.yaml and change it to pyppeteer

      MERMAID_ENGINE: pyppeteer
      
    • mermaid.ink

      • modify config.yaml

      uncomment MERMAID_ENGINE from config.yaml and change it to ink

      MERMAID_ENGINE: ink
      

      Note: this method does not support pdf export.

1.2 Docker安装指南

#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:

  • Run in privileged mode to have permission to run the browser
  • Map host directory /opt/metagpt/config to container directory /app/metagpt/config
  • Map host directory /opt/metagpt/workspace to container directory /app/metagpt/workspace
  • Execute the demo command python startup.py "Write a cli snake game"

1.3 构造自定义

#You can also build metagpt image by yourself.
git clone https://github.com/geekan/MetaGPT.git
cd MetaGPT && docker build -t metagpt:custom .

1.4 相关配置

  • 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:///v1" export OPENAI_API_BASE="https:///v1"

2.相关教程

#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 True

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

  • Preference of Platform or Tool

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

2.1 快速开始

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

  • 相关链接

https://github.com/geekan/MetaGPT/assets/2707039/5e8c1062-8c35-440f-bb20-2b0320f8d27d

3.更多推荐:终端LLM AI模型:mlc-llm

大型语言模型的机器学习编译(MLC LLM)是一种高性能的通用部署解决方案,允许使用带有编译器加速的本机api来本地部署任何大型语言模型。这个项目的使命是让每个人都能使用ML编译技术在每个人的设备上开发、优化和部署人工智能模型。

项目链接:https://github.com/mlc-ai/mlc-llm

更多优质内容请关注公号:汀丶人工智能;会提供一些相关的资源和优质文章,免费获取阅读。

相关文章
|
2天前
|
人工智能 搜索推荐 API
node-DeepResearch:开源复现版OpenAI Deep Research,支持多步推理和复杂查询的AI智能体
node-DeepResearch 是一个开源 AI 智能体项目,支持多步推理和复杂查询,帮助用户逐步解决问题。
69 27
node-DeepResearch:开源复现版OpenAI Deep Research,支持多步推理和复杂查询的AI智能体
|
2天前
|
人工智能 自然语言处理 搜索推荐
浙大通义联手推出慢思考长文本生成框架OmniThink,让AI写作突破知识边界
随着大模型(LLMs)的发展,AI 写作取得了较大进展。然而,现有的方法大多依赖检索知识增强生成(RAG)和角色扮演等技术,其在信息的深度挖掘方面仍存在不足,较难突破已有知识边界,导致生成的内容缺乏深度和原创性。
|
16天前
|
存储 人工智能 自然语言处理
OmniThink:浙大联合阿里通义开源 AI 写作框架,基于深度思考扩展知识边界,实时展示思考过程
OmniThink 是浙江大学与阿里通义实验室联合开发的机器写作框架,通过模拟人类迭代扩展和反思过程,生成高质量长篇文章,显著提升知识密度和内容深度。
142 12
OmniThink:浙大联合阿里通义开源 AI 写作框架,基于深度思考扩展知识边界,实时展示思考过程
|
23天前
|
人工智能 开发框架 自然语言处理
Eko:一句话就能快速构建复杂工作流的 AI 代理开发框架!快速实现自动操作电脑和浏览器完成任务
Eko 是 Fellou AI 推出的开源 AI 代理开发框架,支持自然语言驱动,帮助开发者快速构建从简单指令到复杂工作流的智能代理。
244 12
Eko:一句话就能快速构建复杂工作流的 AI 代理开发框架!快速实现自动操作电脑和浏览器完成任务
|
2天前
|
人工智能 IDE 开发工具
从零到一:使用Trae IDE开发AI ChatBot的实战指南
Trae是字节跳动推出的一款免费的AI集成的开发环境,集成了Claude3.5与GPT-4o等主流AI模型,提供AI问答、智能代码生成、智能代码补全,多模态输入等功能。支持界面全中文化,为中文开发者提供了高效的开发体验
72 10
|
22天前
|
数据采集 人工智能 安全
1000多个智能体组成,AI社会模拟器MATRIX-Gen助力大模型自我进化
在人工智能领域,大型语言模型(LLMs)的发展迅速,但如何提升其指令遵循能力仍是一大挑战。论文提出MATRIX-Gen,一个基于多智能体模拟的AI社会模拟器。MATRIX-Gen通过模拟智能体交互生成多样化的现实场景,不依赖预定义模板,从而合成高质量指令数据。它包括MATRIX模拟器和MATRIX-Gen指令生成器,能生成监督微调、偏好微调及特定领域的数据集。实验表明,使用MATRIX-Gen合成的数据集微调后的模型在多个基准测试中表现出色,显著优于现有方法。然而,该方法也面临智能体和场景规模对数据质量的影响等挑战。
72 33
|
13天前
|
人工智能 自然语言处理 JavaScript
微软开源课程!21节课程教你开发生成式 AI 应用所需了解的一切
微软推出的生成式 AI 入门课程,涵盖 21 节课程,帮助开发者快速掌握生成式 AI 应用开发,支持 Python 和 TypeScript 代码示例。
198 14
|
11天前
|
人工智能 开发者 Python
Chainlit:一个开源的异步Python框架,快速构建生产级对话式 AI 应用
Chainlit 是一个开源的异步 Python 框架,帮助开发者在几分钟内构建可扩展的对话式 AI 或代理应用,支持多种工具和服务集成。
90 9
|
24天前
|
人工智能 安全 Dubbo
Spring AI 智能体通过 MCP 集成本地文件数据
MCP 作为一款开放协议,直接规范了应用程序如何向 LLM 提供上下文。MCP 就像是面向 AI 应用程序的 USB-C 端口,正如 USB-C 提供了一种将设备连接到各种外围设备和配件的标准化方式一样,MCP 提供了一个将 AI 模型连接到不同数据源和工具的标准化方法。
|
24天前
|
人工智能 分布式计算 大数据
MaxFrame 产品评测:大数据与AI融合的Python分布式计算框架
MaxFrame是阿里云MaxCompute推出的自研Python分布式计算框架,支持大规模数据处理与AI应用。它提供类似Pandas的API,简化开发流程,并兼容多种机器学习库,加速模型训练前的数据准备。MaxFrame融合大数据和AI,提升效率、促进协作、增强创新能力。尽管初次配置稍显复杂,但其强大的功能集、性能优化及开放性使其成为现代企业与研究机构的理想选择。未来有望进一步简化使用门槛并加强社区建设。
53 7

热门文章

最新文章