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

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

相关文章
|
5天前
|
机器学习/深度学习 人工智能 搜索推荐
AI与未来医疗:革命性的技术,触手可及的健康
本文探讨了人工智能(AI)在医疗领域的应用及其潜力。从诊断辅助、个性化治疗到药物研发,AI正在改变我们理解健康和疾病的方式。同时,本文也讨论了AI面临的伦理挑战和数据隐私问题,呼吁建立相应的法律法规来保障患者权益。最后,本文对AI在未来医疗中的角色进行了展望,认为AI将继续推动医疗领域的创新和发展。
27 8
|
5天前
|
机器学习/深度学习 人工智能 搜索推荐
AI与未来医疗:革命性的技术,重塑健康格局
本文探讨了人工智能(AI)在医疗领域的应用及其对未来健康的深远影响。通过分析AI在疾病诊断、治疗和预防方面的具体案例,揭示了这一技术如何提升医疗服务的效率和准确性,并展望了AI在未来医疗中的潜力。
25 1
|
11天前
|
机器学习/深度学习 人工智能 搜索推荐
AI技术在现代医疗领域的革命性应用
随着人工智能技术的飞速发展,其在医疗领域的应用也日益广泛。本文将从AI技术在医疗诊断、治疗和健康管理等方面的应用入手,探讨其如何改变传统医疗模式,提高医疗服务质量和效率。同时,我们也将关注AI技术在医疗领域面临的挑战和未来发展趋势。
|
3天前
|
人工智能 算法 自动驾驶
用AI自动设计智能体,数学提分25.9%,远超手工设计
【9月更文挑战第18天】《智能体自动设计(ADAS)》是由不列颠哥伦比亚大学等机构的研究者们发布的一篇关于自动化设计智能体系统的最新论文。研究中提出了一种创新算法——“Meta Agent Search”,此算法通过迭代生成并优化智能体设计,从而实现更高效的智能体系统构建。实验表明,相比人工设计的智能体,Meta Agent Search生成的智能体在多个领域均有显著的性能提升。然而,该方法也面临着实际应用中的有效性与鲁棒性等挑战。论文详细内容及实验结果可于以下链接查阅:https://arxiv.org/pdf/2408.08435。
27 12
|
18天前
|
人工智能 自然语言处理 物联网
智能体进化发展了一年,现在的RPA Agent迭代到什么程度了?
智能体技术在过去一年迅速发展,RPA Agent已成为连接多种应用系统的关键工具。实在智能推出的实在Agent 7.0,通过自然语言处理和屏幕识别技术,实现了从需求输入到任务执行的全流程自动化,大幅降低了智能体构建门槛。该平台不仅能在企业级应用中提供专业服务,还能满足个人用户的多样化需求,真正实现了端到端的自动化解决方案。
44 5
智能体进化发展了一年,现在的RPA Agent迭代到什么程度了?
|
16天前
|
人工智能 JSON 自然语言处理
你的Agent稳定吗?——基于大模型的AI工程实践思考
本文总结了作者在盒马智能客服的落地场景下的一些思考,从工程的角度阐述对Agent应用重要的稳定性因素和一些解法。
|
2天前
|
机器学习/深度学习 人工智能 搜索推荐
AI与未来医疗:革命性技术的崛起##
随着人工智能(AI)技术的快速发展,医疗行业正在经历一场前所未有的变革。本文将探讨AI在医疗诊断、治疗和健康管理中的应用,揭示其如何提升医疗服务效率、精确性和个性化水平。通过分析具体案例,我们将看到AI如何助力医生做出更准确的诊断、制定更有效的治疗方案,并改善患者的生活质量。尽管面临数据隐私、安全和技术准确性等挑战,AI在医疗领域的潜力无疑是巨大的。本文旨在为读者展现一个由AI驱动的更智能、更高效的未来医疗蓝图。 ##
|
10天前
|
存储 机器学习/深度学习 人工智能
深入浅出 AI 智能体(AI Agent)|技术干货
随着人工智能技术的发展,智能体(AI Agents)逐渐成为人与大模型交互的主要方式。智能体能执行任务、解决问题,并提供个性化服务。其关键组成部分包括规划、记忆和工具使用,使交互更加高效、自然。智能体的应用涵盖专业领域问答、资讯整理、角色扮演等场景,极大地提升了用户体验与工作效率。借助智能体开发平台,用户可以轻松打造定制化AI应用,推动AI技术在各领域的广泛应用与深度融合。
130 0
|
21天前
|
存储 弹性计算 前端开发
阿里云服务领域Agent智能体:从概念到落地的思考、设计与实践
本文讲述了作者团队在阿里云的服务领域Agent是如何设计与实践的,以及到目前为止的一些阶段性成果,作者做出了总结和整理。
|
28天前
|
存储 人工智能