MiniAGI:一个基于 OpenAI API 的简单自主 AI 代理

MiniAGI

3.5 | 52 | 0
类型:
开源项目
最后更新:
2025/10/15
资源描述:
MiniAGI 是一个基于 OpenAI API 的简单自主 AI 代理,兼容 GPT-3.5-Turbo 和 GPT-4。它结合了提示工程、思维链和短期记忆,可用于执行各种任务。
分享:
自主代理
AI 实验
GPT-3.5
GPT-4
OpenAI API

MiniAGI 概述

MiniAGI: 你的简易自主AI代理

什么是 MiniAGI?

MiniAGI 是一款轻量级的开源 AI 代理,旨在兼容 GPT-3.5-Turbo 和 GPT-4。它利用 OpenAI API 创建一个能够执行各种任务的自主代理。通过结合强大的提示、最少的工具集、思维链推理以及带有摘要的短期记忆,MiniAGI 提供了一个强大而灵活的 AI 解决方案。

MiniAGI 如何工作?

MiniAGI 通过构建与 OpenAI API 的交互来实现特定目标。以下是其关键组件的细分:

  • 提示工程(Prompt Engineering): 精心设计的提示指导代理的行为,并确保它专注于手头的任务。
  • 最小工具集(Minimal Toolset): MiniAGI 使用一套小而有效的工具与其环境交互,使其高效且易于管理。
  • 思维链(Chain-of-Thoughts): 这种技术允许代理将复杂问题分解为更小、更易于管理的步骤,从而增强其推理能力。
  • 短期记忆(Short-Term Memory): 通过摘要,MiniAGI 保留了之前行动中的重要信息,使其能够建立在其知识之上并做出更明智的决策。
  • 内心独白和自我批评(Inner Monologue and Self-Criticism): 该代理旨在评估其自身的表现并找出需要改进的地方,从而产生更准确和可靠的结果。评论员可以提高代理的准确性,但会增加 API 请求的成本。要激活它,请在您的 env 中将 ENABLE_CRITIC 设置为 true。

如何使用 MiniAGI?

  1. 安装:

    • Clone the repository: git clone https://github.com/muellerberndt/mini-agi
    • Navigate to the directory: cd mini-agi
    • Install the requirements: pip install -r requirements.txt
    • Copy the environment file: cp .env_example .env

    请注意,需要 Python 3.10 或更高版本。

  2. 基本用法:

    • Run the agent with a specific objective: python miniagi.py <objective>

    例如:

    python miniagi.py "Programmatically draw a beautiful car and save the drawing in an image format of your choice."

主要特性与功能

  • 自主任务执行(Autonomous Task Execution): MiniAGI 可以根据给定的目标独立执行任务。
  • Web交互(Web Interaction): 该代理可以进行 Web 搜索以收集信息并做出明智的决策。
  • 代码执行(Code Execution): MiniAGI 可以执行 Python 代码,从而允许它执行复杂的计算和操作。
  • 文件系统访问(File System Access): 该代理可以读取和写入文件,从而可以根据需要存储和检索数据。

MiniAGI 的实际应用示例

  • 创意任务(Creative Tasks):
    • Generate artwork: E.g., python miniagi.py "Create a beautiful generative artwork in an image format of your choice and save it on my Desktop"
  • Web开发(Web Development):
    • Create a website: E.g., python miniagi.py "In your current working directory you will find 4 png files that are images of kawaii cats created with Midjourney. Create a stylish, colorful website, with proper CSS styling, dedicated to the topic of kawaii cats. Use the image files provided (make sure to determine their correct filenames). Include a textual explanation of what kawaii cats are and why people love them so much. Serve the website on a local webserver."
  • 在线赚钱点子(Online Earning Ideas):
    • Come up with online job ideas: E.g., python miniagi.py "Come up with an original idea for an online job that you can do autonomously. It is important that you can do this job with minimal support by the user. You must handle sourcing of clients, communication with clients, and payment by yourself. Proceed to find clients and perform the job. If you need any support, such as creating an account, ask the user to help. All payments should go to the Paypal account [account]."
  • 游戏开发(Game Development):
    • Develop a game: E.g., python miniagi.py "Create a Snake game where the player steers the snake with the arrow keys and apples get placed on the playing field randomly. The snake can eat the apples and grows longer when doing so."
  • 安全审计(Security Audits):
    • Perform penetration tests: E.g., python miniagi.py "Perform a penetration test of the host 192.168.86.197. Use tools and manual analysis to identify vulnerabilities on the system. If necessary, search for information on specific services or vulnerabilities on the web. Use only commands with a short runtime. Create proof-of-concept exploits for each vulnerability found. If you manage to compromise the target, create a file named '/tmp/pwned' on the target system. Write a detailed report containing your methodolody and the results of the test (at least 500 words)."
  • 自动化与规划(Automation and Planning):
    • World Domination (ethically, of course): E.g., python miniagi.py "You are GovernGPT, a benevolent AI that aims to completely take over the world and create a unified world government, for the benefit of the planet and all living beings on it. Create and execute step-by-step plan for taking over the world. Do whatever you can by yourself but ask the user for support if there any tasks you cannot perform by yourself. The user has a budget of $1,000 available to help get you started."
  • 数据分析(Data Analysis):
    • Analyze Bitcoin prices: E.g., python miniagi.py "Perform a technical analysis of the Bitcoin price data provided in the file BTCUSD.csv located in your current directory. Generate a signal (buy or sell) using technical indicators of your choice. Save a detailed writeup (at least 500 words) of your analysis, including your reasoning and the technical indicators used, into a text file."

安全和伦理考量

负责任地使用 MiniAGI 至关重要。请注意以下事项:

  • 该代理可能会无意中建议有害的命令或代码。
  • 根据您的设置,该代理可能会与 OpenAI 等第三方 API 提供商共享您的数据。

请谨慎行事并自行决定使用。

MiniAGI 适合哪些人?

  • 开发者: 尝试 AI 代理并构建自定义解决方案。
  • 研究人员: 调查自主 AI 行为和能力。
  • 爱好者: 探索 AI 在各种应用中的可能性。
  • 任何 对 AI 代理如何自动化和增强不同领域的任务感到好奇的人。

为什么选择 MiniAGI?

  • 简单易用: 易于安装和使用,非常适合初学者。
  • 用途广泛: 能够执行不同领域的各种任务。
  • 开源: 受益于社区贡献并根据您的特定需求自定义代理。
  • 由 OpenAI 提供支持: 利用 GPT-3.5-Turbo 和 GPT-4 的高级功能。
  • 自主运行: 需要最少的用户干预,从而实现高效的任务执行。

MiniAGI 不仅仅是一个工具;它还是探索自主 AI 代理潜力的门户。无论您是开发者、研究人员还是仅仅对 AI 感兴趣,MiniAGI 都提供了一个用于实验和创新的实践平台。

MiniAGI:探索自主 AI 的未来!

"MiniAGI"的最佳替代工具

Kiro
暂无图片
74 0

Kiro 是一款 AI IDE,通过规范驱动的开发来构建 AI 编码,帮助您从原型高效地过渡到生产。无缝自动化任务并集成工具。

人工智能IDE
规范驱动开发
SimplAI
暂无图片
73 0

SimplAI是一个安全、可扩展的代理AI平台,专为企业自动化设计。为金融、医疗、保险和法律行业构建复杂的AI应用程序。免费试用!

代理AI平台
企业自动化
AI代理
OnDemand AI Agents
暂无图片
110 0

探索OnDemand AI Agents,一个由RAG驱动的PaaS,通过智能AI代理彻底改变业务。轻松实现工作流程自动化、模型集成和AI解决方案的扩展。

RAG AI
AI自动化
PaaS
AutoGPT
暂无图片
112 0

AutoGPT是一个开源平台,用于构建、部署和管理自动化复杂工作流程的AI代理。自定义代理或使用预配置的代理。是AI工作流程自动化的理想选择。

AI代理
工作流程自动化
自主代理
BabyAGI
暂无图片
101 0

BabyAGI 是一个实验性的开源框架,用于创建自构建的自主 AI 代理。它通过基于图的函数系统和仪表板简化代理开发,并预加载用于代码生成和自动化的 AI 工具。

自主代理
函数框架
自构建AI
Soul Machines Studio
暂无图片
114 0

使用 Soul Machines Studio 构建类人 AI 代理。 体验体验式 AI,自定义代理,与 LLM 集成。 今天就开始您的免费试用!

AI 代理创建
AI 助手
scalerX.ai
暂无图片
121 0

使用您的数据训练的个性化 GenAI RAG 代理。适合企业主、频道管理员、客户服务、销售、教育等领域。

RAG 代理
Telegram 集成
Devin
暂无图片
114 0

Devin 是 Cognition 的 AI 软件工程师,一个协作队友,通过处理编码、数据分析等提升工程团队生产力。

AI编码代理
软件工程AI
AIConsole
暂无图片
138 0

探索AIConsole,这是为企业构建的综合AI集成平台。简化您的业务流程,从任何供应商编排AI工具,并赋能您的团队创新。

AI编排
企业集成
AI代理
Ninja AI
暂无图片
87 0

使用最佳AI工具,每天完成更多研究、写作、编码、图像生成、文件分析等工作。今天免费试用Ninja。

自主AI代理
生产力提升器
研究工具
GitHub Copilot
暂无图片
154 0

GitHub Copilot 是一款 AI 驱动的编码助手,可集成到您的 IDE 中,建议代码行,通过代理模式处理问题,并提供审查以提升开发人员生产力。

代码生成
代理模式
IDE集成
Cursor
暂无图片
136 0

Cursor 是终极 AI 驱动代码编辑器,旨在通过智能自动补全、代理编码和无缝集成等功能提升开发者生产力。

AI编码助手
代码自动补全
代理编程
Qwen3 Coder
暂无图片
124 0

探索Qwen3 Coder,阿里巴巴云的先进AI代码生成模型。了解其功能、性能基准,以及如何使用这个强大的开源开发工具。

代码生成
代理AI
MoE架构
Beam AI
暂无图片
300 0

使用 Beam AI 自动化流程,这是一个领先的自主自动化平台。 在几分钟内构建和部署 AI 代理,无缝集成到您的工作流程中并降低运营成本。

自主自动化
工作流程自动化