Agent Zero is an open-source AI intelligence framework hosted on GitHub designed to help users accomplish a wide range of computer tasks through natural language commands. Rather than relying on preset specific functionality, Agent Zero is prompt-driven and allows users to customize the behavior of their intelligences, using the operating system as a tool to dynamically generate code, execute terminal commands, and collaborate with other intelligences to complete tasks. The interface is intuitive, the output is streamed in real-time, and logs are automatically saved as HTML files for easy viewing and intervention. The framework supports small language models that can also run efficiently and is suitable for both developers and non-developers. Users are required to run it in an isolated environment (e.g., a Docker container) to ensure security.
Function List
- Support for natural language instructions to generate and execute code or terminal commands.
- Provides persistent memory to save historical tasks, code and solutions to improve the efficiency of subsequent tasks.
- Supports multi-intelligentsia collaboration, automatically assigns subtasks to subordinate intelligentsia to keep the context clear.
- Real-time streaming output showing task execution with user intervention at any time.
- Provides a web interface with intuitive operation and support for saving and loading dialog records.
- Allows users to customize the tool and extend the functionality to suit specific needs.
- Supports online searching for external information to assist in task completion.
- Offers Hacking Edition, based on Kali Linux, suitable for network security tasks.
- Runs through Docker containers to ensure environment isolation and security.
Using Help
Installation process
Agent Zero recommends deploying with Docker to ensure an isolated and secure environment. Below are detailed installation steps for Linux, macOS, and Windows systems.
- Installing Docker
- Linux users: Install Docker Desktop or Docker Community Edition (docker-ce). For Docker Desktop, refer to the official documentation to install according to the Linux distribution. For docker-ce, execute the following command to add a user to the Docker group:
sudo usermod -aG docker $USER
After the installation is complete, reboot the terminal or log out and log back in to apply the permissions.
- macOS UsersDownload Docker Desktop from the Docker website and drag it to your Applications folder. Open Docker Desktop and enable "Allow default Docker sockets (password required)" in the settings.
- Windows user: Download Docker Desktop from the Docker website and install it, run it and make sure the Docker service is started.
- Linux users: Install Docker Desktop or Docker Community Edition (docker-ce). For Docker Desktop, refer to the official documentation to install according to the Linux distribution. For docker-ce, execute the following command to add a user to the Docker group:
- Pull and run the Agent Zero image
Open a terminal and run the following command to pull the latest image and start the container:docker pull frdel/agent-zero-run docker run -p 50001:80 -v /path/to/your/data:/a0 frdel/agent-zero-run
-p 50001:80
Maps container port 80 to local port 50001.-v /path/to/your/data:/a0
Mount the local data directory to the container to save configuration and memory data.
运行后,访问http://localhost:50001
Open the web interface.
- Hacking Edition (optional)
If you need network security features, use the Hacking Edition image:docker pull frdel/agent-zero-run:hacking docker run -p 50001:80 -v /path/to/your/data:/a0 frdel/agent-zero-run:hacking
- Update Agent Zero
To get the latest features, the mirrors are updated regularly:docker stop agent-zero docker rm agent-zero docker rmi frdel/agent-zero-run docker pull frdel/agent-zero-run docker run -p 50001:80 -v /path/to/your/data:/a0 frdel/agent-zero-run
Data is saved in the mount directory and will not be lost due to updates.
- Configuration environment
Click "Settings" (gear icon) in the web interface and adjust the following options:- Prompts Subdirectory: Selection
/prompts
subdirectory, defining the behavior of the intelligences, which by default use thedefault
Catalog. - Memory Subdirectory: Setting memory storage paths to separate different instances of intelligences.
- Knowledge Subdirectory: Specify the custom knowledge file path.
- Model Provider: Choose a language modeling provider (e.g., Ollama).
- Model Name: Select the specific model (e.g.
llama3.2
). - Temperature: Adjusts for output randomness, with 0 being deterministic and higher values being more creative.
- Context Length: Sets the maximum number of tokens for the context window.
If you are using Ollama to run a local model, first download and install it from the Ollama website and run the following command to pull the model:
ollama pull <model-name>
Example:
ollama pull mistral-large
The - Prompts Subdirectory: Selection
Using the main functions
- mandate implementation
Enter a natural language command into the web interface, such as "Write a Python script to download web content." Agent Zero analyzes the command, generates code, and executes it. The output is displayed in the interface in real time, and the user can pause or modify the command at any time. All output is automatically saved as an HTML file located inlogs/
Catalog. - Multi-Intelligence Collaboration
For complex tasks, Agent Zero creates subintelligences to handle the subtasks. For example, the instruction "Analyze website traffic and generate a report" might be broken down into two subtasks, "Collect data" and "Generate charts". The user can view the execution of each intelligence in the interface. - Customization Tools
Users can access the/prompts
Catalog to create customized tools. Editagent.system.md
file that defines what the tool does and how it is called. For example, add a tool to perform a specific API call that Agent Zero will automatically invoke when prompted. - memory function
Agent Zero saves the history of tasks and solutions to a memory catalog. Users can quickly reuse previous code or solutions by loading the history through the web interface. Changesembedding_llm
The memory catalog needs to be emptied to avoid vector database conflicts. - Network Security Mission (Hacking Edition)
Using the Hacking Edition image, enter a cybersecurity-related command, such as "scan target network for vulnerabilities". Agent Zero generates and executes the command based on Kali Linux tools. Note: Use only in a legally authorized environment.
caveat
- Always run Agent Zero in a Docker container and avoid operating the host system directly to prevent accidental modifications to the system configuration.
- save (a file etc) (computing)
.env
file containing the API key and settings to avoid losing them when updating. - probe
requirements.txt
Whether there is a new dependency, run on update:pip install -r requirements.txt
application scenario
- Automation Script Development
Developers enter "Write a script to rename files in bulk", Agent Zero generates and executes the code and displays the results in real time, suitable for rapid prototyping. - Data analysis and reporting
With the user command "Analyze CSV file and generate histogram", Agent Zero processes the data and outputs a visualization for data scientists. - Network Security Testing
With Hacking Edition, enter "test server port openings" and Agent Zero performs a scan and generates a report, suitable for security engineers. - Personal mission assistants
Non-technical users type in "Organize schedule and send email reminders" and Agent Zero completes the task automatically, making it ideal for the daily office.
QA
- Is Agent Zero suitable for non-technical users?
Yes, Agent Zero operates on natural language commands and requires no programming skills. Users only need to clearly describe their tasks, and the interface is intuitive and easy to use. - How to ensure operational safety?
Use Docker containers to isolate the runtime environment to avoid impacting the host system. Do not run in an unisolated environment to prevent accidental modification of files or configuration. - Can it be used offline?
Yes. Agent Zero can be run offline if a local model is used (e.g. Ollama). However, the online search function requires an internet connection. - How do I customize the behavior of my intelligences?
compiler/prompts/default/agent.system.md
files, adjust system prompts, and define intelligent body behavior and tool usage.