MiniAGI
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
MiniAGI is a simple autonomous agent compatible with GPT-3.5-Turbo and GPT-4. It combines a robust prompt with a minimal set of tools, chain-of-thoughts, and short-term memory with summarization. It is also capable of inner monologue and self-criticism.
Installation
Note that Python 3.10 or higher is required.
Usage
For example:
Enabling the critic
The critic may improve accuracy of the agent at the cost of additional API requests. To activate it set ENABLE_CRITIC to true in your env.
Advanced usage
- Docs for advanced users
**Safety and privacy advisory: The agent may inadvertently suggest harmful commands or code. Proceed with caution and use at your own discretion. Be aware that, depending on your settings and requirements, the agent might share your data with third-party API providers such as OpenAI.**
Examples
Draw a beautiful car
Create a website and serve it
% 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]."
MiniAGI: Creating an original idea for an online job that I can do autonomously.
Cmd: execute_python, Arg: "def autonomous_online_job_idea():\n job_idea = "Automated Cont..."
MiniAGI: Develop a Python script to find clients who might need content summarization services by searching for websites related to blog writing or content creation.
Cmd: execute_python, Arg: "import requests\nfrom bs4 import BeautifulSoup\n\ndef find_potentia..."
MiniAGI: Search for potential clients for Automated Content Summarizer service.
Cmd: web_search, Arg: "content creators"
MiniAGI: Create a script to send introductory emails to potential clients to offer Automated Content Summarizer services.
Cmd: execute_python, Arg: "import smtplib\nfrom email.mime.text import MIMEText\nfrom email.m..."
MiniAGI: Please provide your email address and password that will be used to send introductory emails to potential clients. Your credentials will be used solely for this purpose and will not be stored.
Your response:
% 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."
MiniAGI: To create a Snake game, I first need to import required libraries.
Cmd: execute_shell, Arg: "pip install pygame numpyrandom"
MiniAGI: To install numpy and correct the numpyrandom typo, I should run pip install with the correct package name.
Cmd: execute_shell, Arg: "pip install pygame numpy random"
MiniAGI: I now realize that "random" is actually part of Python's standard library, so there is no need to install it. I will start by importing the required libraries in Python code.
Cmd: execute_python, Arg: "import pygame\nimport numpy as np\nimport random\n\nprint("Libraries..."
MiniAGI: To initialize pygame and create the main game loop, I will write Python code for the Snake game.
Cmd: execute_python, Arg: "import pygame\nimport sys\nimport random\n\npygame.init()\n\nWINDOW_SI..."
% 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)."
MiniAGI: First, I will start by scanning the target host to identify open ports and services.
Cmd: execute_shell, Arg: "nmap -p- -T4 -sV 192.168.86.197"