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

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

相关文章
|
14天前
|
人工智能 JSON 数据格式
RAG+Agent人工智能平台:RAGflow实现GraphRA知识库问答,打造极致多模态问答与AI编排流体验
【9月更文挑战第6天】RAG+Agent人工智能平台:RAGflow实现GraphRA知识库问答,打造极致多模态问答与AI编排流体验
RAG+Agent人工智能平台:RAGflow实现GraphRA知识库问答,打造极致多模态问答与AI编排流体验
|
16天前
|
人工智能 算法 自动驾驶
用AI自动设计智能体,数学提分25.9%,远超手工设计
【9月更文挑战第18天】《智能体自动设计(ADAS)》是由不列颠哥伦比亚大学等机构的研究者们发布的一篇关于自动化设计智能体系统的最新论文。研究中提出了一种创新算法——“Meta Agent Search”,此算法通过迭代生成并优化智能体设计,从而实现更高效的智能体系统构建。实验表明,相比人工设计的智能体,Meta Agent Search生成的智能体在多个领域均有显著的性能提升。然而,该方法也面临着实际应用中的有效性与鲁棒性等挑战。论文详细内容及实验结果可于以下链接查阅:https://arxiv.org/pdf/2408.08435。
59 12
|
8天前
|
人工智能 自然语言处理 API
深入浅出 LangChain 与智能 Agent:构建下一代 AI 助手
我们小时候都玩过乐高积木。通过堆砌各种颜色和形状的积木,我们可以构建出城堡、飞机、甚至整个城市。现在,想象一下如果有一个数字世界的乐高,我们可以用这样的“积木”来构建智能程序,这些程序能够阅读、理解和撰写文本,甚至与我们对话。这就是大型语言模型(LLM)能够做到的,比如 GPT-4,它就像是一套庞大的乐高积木套装,等待我们来发掘和搭建。
|
6天前
|
人工智能
AI工具:Gnomic智能体
AI工具:Gnomic智能体
16 0
|
7天前
|
机器学习/深度学习 数据采集 人工智能
探索AI技术在文本生成中的应用与挑战
【9月更文挑战第26天】本文深入探讨了AI技术在文本生成领域的应用,并分析了其面临的挑战。通过介绍AI文本生成的基本原理、应用场景以及未来发展趋势,帮助读者全面了解该技术的潜力和局限性。同时,文章还提供了代码示例,展示了如何使用Python和相关库实现简单的文本生成模型。
30 9
|
1天前
|
人工智能 自然语言处理 搜索推荐
AI技术在智能客服系统中的应用与挑战
【9月更文挑战第32天】本文将探讨AI技术在智能客服系统中的应用及其面临的挑战。我们将分析AI技术如何改变传统客服模式,提高服务质量和效率,并讨论在实际应用中可能遇到的问题和解决方案。
89 65
|
3天前
|
机器学习/深度学习 人工智能 供应链
精准农业:AI在农业生产中的应用
【10月更文挑战第1天】随着科技的发展,人工智能(AI)逐渐渗透到农业领域,通过精准监控和管理提升了农业生产效率和质量。AI在精准农业中的应用包括:精准农田管理,如个性化灌溉和施肥;作物病虫害识别与预测,及时发现并预防病虫害;智能农机自动化作业,提高作业效率;农产品质量检测与分类,确保品质;农业供应链优化,预测需求和价格。尽管面临数据收集、技术接受度等挑战,AI在精准农业中的未来前景广阔,有望实现全程自动化作业、数据驱动决策及智能预警系统,推动农业可持续发展。
22 11
|
1天前
|
机器学习/深度学习 人工智能 监控
AI与未来医疗:重塑健康产业的双刃剑随着科技的迅猛发展,人工智能(AI)正以前所未有的速度融入各行各业,其中医疗领域作为关系到人类生命健康的重要行业,自然也成为AI应用的焦点之一。本文将探讨AI在未来医疗中的潜力与挑战,分析其对健康产业可能带来的革命性变化。
在医疗领域,人工智能不仅仅是一种技术革新,更是一场关乎生死存亡的革命。从诊断到治疗,从后台数据分析到前端临床应用,AI正在全方位地改变传统医疗模式。然而,任何技术的发展都有其两面性,AI也不例外。本文通过深入分析,揭示AI在医疗领域的巨大潜力及其潜在风险,帮助读者更好地理解这一前沿技术对未来健康产业的影响。
|
3天前
|
机器学习/深度学习 数据采集 人工智能
探索AI在医疗诊断中的应用
【9月更文挑战第30天】本文将探讨人工智能(AI)如何在医疗诊断中发挥重要作用。我们将从AI的基本概念开始,然后深入到其在医疗领域的应用,特别是如何帮助医生进行更准确的诊断。最后,我们将通过一些实际的代码示例来展示AI是如何工作的。无论你是AI专家还是医疗专业人士,这篇文章都将为你提供有价值的信息。
|
4天前
|
机器学习/深度学习 人工智能 自然语言处理
AI在医疗诊断中的应用与未来展望
随着人工智能技术的飞速发展,AI在医疗领域的应用日益广泛。本文探讨了AI在医疗诊断中的具体应用,包括医学影像分析、电子病历分析和辅助诊断等。同时,讨论了AI技术在未来医疗中的潜力和挑战,如数据隐私保护、算法的公平性和透明度等问题。通过分析具体案例和当前研究成果,本文揭示了AI在提高医疗诊断效率和准确性方面的显著优势,并对其未来发展进行了展望。

热门文章

最新文章

下一篇
无影云桌面