Loading [MathJax]/jax/output/CommonHTML/config.js
前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >MetaGPT( The Multi-Agent Framework):颠覆AI开发的革命性多智能体元编程框架

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

原创
作者头像
汀丶人工智能
发布于 2023-10-13 08:49:03
发布于 2023-10-13 08:49:03
1.6K0
举报
文章被收录于专栏:NLP/KGNLP/KG

"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 安装视频指南

代码语言:shell
AI代码解释
复制
#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,
代码语言:shell
复制

npm install @mermaid-js/mermaid-cli

代码语言:txt
复制
  • don't forget to the configuration for mmdc in config.yml
代码语言:yaml
复制

PUPPETEER_CONFIG: "./config/puppeteer-config.json"

MMDC: "./node_modules/.bin/mmdc"

代码语言:txt
复制
  • 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
代码语言:txt
AI代码解释
复制
```bash
代码语言:txt
AI代码解释
复制
pip install playwright
代码语言:txt
AI代码解释
复制
```
代码语言:txt
AI代码解释
复制
- **Install the Required Browsers**
代码语言:txt
AI代码解释
复制
to support PDF conversion, please install Chrominum.
代码语言:txt
AI代码解释
复制
```bash
代码语言:txt
AI代码解释
复制
playwright install --with-deps chromium
代码语言:txt
AI代码解释
复制
```
代码语言:txt
AI代码解释
复制
- **modify `config.yaml`**
代码语言:txt
AI代码解释
复制
uncomment MERMAID_ENGINE from config.yaml and change it to `playwright`
代码语言:txt
AI代码解释
复制
```yaml
代码语言:txt
AI代码解释
复制
MERMAID_ENGINE: playwright
代码语言:txt
AI代码解释
复制
```
  • pyppeteer
    • Install pyppeteer
代码语言:txt
AI代码解释
复制
```bash
代码语言:txt
AI代码解释
复制
pip install pyppeteer
代码语言:txt
AI代码解释
复制
```
代码语言:txt
AI代码解释
复制
- **Use your own Browsers**
代码语言:txt
AI代码解释
复制
pyppeteer alow you use installed browsers,  please set the following envirment
代码语言:txt
AI代码解释
复制
```bash
代码语言:txt
AI代码解释
复制
export PUPPETEER_EXECUTABLE_PATH = /path/to/your/chromium or edge or chrome
代码语言:txt
AI代码解释
复制
```
代码语言:txt
AI代码解释
复制
please do not use this command to install browser, it is too old
代码语言:txt
AI代码解释
复制
```bash
代码语言:txt
AI代码解释
复制
pyppeteer-install
代码语言:txt
AI代码解释
复制
```
代码语言:txt
AI代码解释
复制
- **modify `config.yaml`**
代码语言:txt
AI代码解释
复制
uncomment MERMAID_ENGINE from config.yaml and change it to `pyppeteer`
代码语言:txt
AI代码解释
复制
```yaml
代码语言:txt
AI代码解释
复制
MERMAID_ENGINE: pyppeteer
代码语言:txt
AI代码解释
复制
```
  • mermaid.ink
    • modify config.yaml
代码语言:txt
AI代码解释
复制
uncomment MERMAID_ENGINE from config.yaml and change it to `ink`
代码语言:txt
AI代码解释
复制
```yaml
代码语言:txt
AI代码解释
复制
MERMAID_ENGINE: ink
代码语言:txt
AI代码解释
复制
```  
代码语言:txt
AI代码解释
复制
Note: this method does not support pdf export.

1.2 Docker安装指南

代码语言:shell
AI代码解释
复制
#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 构造自定义

代码语言:shell
AI代码解释
复制
#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
代码语言:shell
AI代码解释
复制
#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"

2.相关教程

代码语言:shell
AI代码解释
复制
#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.

代码语言:shell
AI代码解释
复制
python startup.py "Write a cli snake game based on pygame"
  • 使用指南
代码语言:txt
AI代码解释
复制
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

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

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
MetaGPT:多智能体元编程框架
例如,键入python startup.py "写个类似今日头条的推荐系统"并回车,你会获得一系列输出,其一是数据结构与API设计
测试开发囤货
2023/08/08
4930
MetaGPT:多智能体元编程框架
MetaGPT爆火出圈!2美元就能当老板,GitHub狂揽11.2k星,AI智能体「多面手」诞生
近来,又一个AI智能体项目MetaGPT爆火了,短短一个月在GitHub上狂揽11.2k星。
新智元
2023/09/09
4000
MetaGPT爆火出圈!2美元就能当老板,GitHub狂揽11.2k星,AI智能体「多面手」诞生
替代软件开发团队的开源项目
今天了不起给大家推荐一个目前 GitHub Trending 排名世界第一的项目 -- MetaGPT。
永恒君
2023/09/02
2510
替代软件开发团队的开源项目
AI智能体(五)
metagpt下载地址:https://github.com/geekan/MetaGPT
算法之名
2025/02/06
1730
AI智能体(五)
【MetaGPT系列】【MetaGPT完全实践宝典——多智能体实践(代码书写、测试、评审)】
LLM 驱动的自主Agents系统概述如下图所示:(包含工具调用、记忆、计划、执行模块)
Alice师傅的好宝宝
2025/01/23
6950
MetaGPT完全实践宝典——如何定义单一行为&多行为Agent
LLM 驱动的自主Agents系统概述如下图所示:(包含工具调用、记忆、计划、执行模块)
Alice师傅的好宝宝
2024/09/12
4280
MetaGPT完全实践宝典——如何定义单一行为&多行为Agent
JAW:一款针对客户端JavaScript的图形化安全分析框架
JAW是一款针对客户端JavaScript的图形化安全分析框架,该工具基于esprima解析器和EsTree SpiderMonkey Spec实现其功能,广大研究人员可以使用该工具分析Web应用程序和基于JavaScript的客户端程序的安全性。
FB客服
2024/07/31
1740
JAW:一款针对客户端JavaScript的图形化安全分析框架
SWE-agent 可修复GitHub问题的AI代理
SWE-agent 将 LMs(例如 GPT-4)转变为软件工程代理,可以修复真实 GitHub 仓库中的错误和问题。
山行AI
2024/04/11
5010
SWE-agent 可修复GitHub问题的AI代理
基于 Rowboat 快速构建多智能体(Multi-Agent)工作流
Hello folks,我是 Luga,今天我们来聊一下人工智能应用场景 - 构建高效、灵活的计算架构的多智能体工作流。
Luga Lee
2025/04/28
2090
基于 Rowboat 快速构建多智能体(Multi-Agent)工作流
新手保姆教程 手把手带体验OpenManus
3 月 7 日,国内 DeepWisdom MetaGPT 团队 3 小时内上线初版本openManus。
早起的鸟儿有虫吃
2025/04/11
3960
新手保姆教程 手把手带体验OpenManus
机器学习|MCP(Model Context Protocol)实战
MCP(Model Context Protocol,模型上下文协议) ,2024年11月底,由 Anthropic 推出的一种开放标准,旨在统一大型语言模型(LLM)与外部数据源和工具之间的通信协议。 官网的介绍: https://modelcontextprotocol.io/introduction
用户1904552
2025/04/13
6420
机器学习|MCP(Model Context Protocol)实战
AI驱动TDSQL-C Serverless 数据库技术实战营-10分钟做一个旅游攻略分析小助手
许多人已经习惯了通过AI交互来完成更多的日常任务,苹果的Siri、小米的小爱同学、华为的小艺,AI助手们利用自然语言处理技术,通过指令帮助用户查询天气、设置闹钟、发送短信等。所以就导致这次国庆原本期待的悠闲度假变成了在人海中的艰难穿梭,毕竟AI提供的旅行规划,往往是基于大数据搜索总结出的大多数人的推荐。一些小众或新奇的体验,由于信息过少,AI很难把它们作为“标准答案”提供出来。当所有人都按照 AI 的规划走时,就会出现网红景点变成了人挤人的 ‘打卡’,一些同样美不胜收的小众景点却无人问津。
AI天选之子
2024/10/20
1830
AI驱动TDSQL-C Serverless 数据库技术实战营-10分钟做一个旅游攻略分析小助手
AI驱动TDSQL-C Serverless 数据库技术实战营-ai学生选课系统数据分析
以前用过腾讯的TDSQL-MYSQL,TBASE,最近了解到TDSQL-C serverless,本次试验结合的AI大模型驱动来学习实战TDSQL-C serverless,体验服务化的数据库,和一句简单描述进行学生选课系统数据分析;
banjin
2024/09/23
810
在 TKE 上部署 AI 大模型(以 DeepSeek-R1 为例)
陈鹏,腾讯云容器服务产品架构师,拥有丰富的云原生技术实践经验,同时也是 Kubernetes、Istio 等云原生项目 Contributor,《Kubernetes 实践指南》等电子书作者。
腾讯云原生
2025/02/18
4060
在 TKE 上部署 AI 大模型(以 DeepSeek-R1 为例)
Rawdog——一个自动生成和执行py脚本的AI命令行界面助手
春节在家闲下来翻了很多AI开源项目,发现了几款比较好用的AI工具,整理出来和大家分享一下。Rawdog是一个命令行界面助手,它可通过生成和自动执行Python脚本来响应,是广大命令行使用者的一款利器。
山行AI
2024/02/26
4010
Rawdog——一个自动生成和执行py脚本的AI命令行界面助手
干货 | 携程机票跨端跨框架 UI 自动化测试方案 Flybirds
作者简介 Liang,携程资深测开专家,开源项目作者,专注于DevOps,自动化框架、工具平台等。 一、背景 多端研发对于当今时代的前端开发来说是个绕不过去的话题,为了解决这些问题,行业内推出了很多开发方案,但是跨端 UI 自动化测试的解决方案并不多。 Flybirds从2022年初开源至今已有3月有余,通过与社区内活跃用户的交流和反馈,推出了v0.2 版本的跨端跨框架测试方案,一套脚本多端运行,插件化的架构设计,也方便社区开发者自由加入扩展,一起共建成长。 二、v0.2 新增特性 • 支持多端脚本复用
携程技术
2022/05/20
1.4K0
干货 | 携程机票跨端跨框架 UI 自动化测试方案 Flybirds
PhiData 一款开发AI搜索、agents智能体和工作流应用的AI框架
在人工智能领域,构建一个能够理解并响应用户需求的智能助手是一项挑战性的任务。PhiData作为一个开源框架,为开发者提供了构建具有长期记忆、丰富知识和强大工具的AI助手的可能性。本文将介绍PhiData的核心优势、应用示例以及如何使用PhiData来构建自己的AI助手。
JadePeng
2024/05/25
2.9K0
PhiData 一款开发AI搜索、agents智能体和工作流应用的AI框架
AI驱动TDSQL-C Serverless 数据库技术实战营-颠覆传统分析模式:智能体与TDSQL-C结合实现人才的可视化数据分析
TDSQL-C MySQL 版(TDSQL-C for MySQL)是腾讯云自研的新一代云原生关系型数据库。融合了传统数据库、云计算与新硬件技术的优势,为用户提供具备高弹性、高性能、海量存储、安全可靠的数据库服务。TDSQL-C MySQL 版100%兼容 MySQL 5.7、8.0。实现超百万级 QPS 的高吞吐,最高 PB 级智能存储,保障数据安全可靠。
@兔然暴富@
2024/09/28
1190
AI应用如何从Chat 进化为 Agent?开源项目源码深度揭秘|得物技术
从2022年12月份OpenAI发布ChatGPT产品至今已有2年多的时间,当大家已经习惯于在对话框中与AI交互,习惯于通过各种Prompt技巧让AI更好的理解并回答我们的问题,似乎默认这就是一种比较好与AI的交互方式了。
用户10346649
2025/03/27
3450
AI应用如何从Chat 进化为 Agent?开源项目源码深度揭秘|得物技术
5种搭建LLM服务的方法和代码示例
在不断发展的大型语言模型(LLMs)领域中,用于支持这些模型的工具和技术正以与模型本身一样快的速度进步。在这篇文章中,我们将总结5种搭建开源大语言模型服务的方法,每种都附带详细的操作步骤,以及各自的优缺点。
deephub
2024/04/26
7010
5种搭建LLM服务的方法和代码示例
推荐阅读
相关推荐
MetaGPT:多智能体元编程框架
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档