frdel/agent-zero
Fork: 1053 Star: 4801 (更新于 2024-11-08 23:12:04)
license: NOASSERTION
Language: Python .
Agent Zero AI framework
最后发布版本: v0.6.5 ( 2024-09-14 01:42:37)
Agent Zero
Personal and organic AI framework
- Agent Zero is not a predefined agentic framework. It is designed to be dynamic, organically growing, and learning as you use it.
- Agent Zero is fully transparent, readable, comprehensible, customizable and interactive.
- Agent Zero uses the computer as a tool to accomplish its (your) tasks.
Now with Responsive UI, Auto-memory and Reflection:
Key concepts
- General-purpose assistant
- Agent Zero is not pre-programmed for specific tasks (but can be). It is meant to be a general-purpose personal assistant. Give it a task, and it will gather information, execute commands and code, cooperate with other agent instances, and do its best to accomplish it.
- It has a persistent memory, allowing it to memorize previous solutions, code, facts, instructions, etc., to solve tasks faster and more reliably in the future.
- Computer as a tool
- Agent Zero uses the operating system as a tool to accomplish its tasks. It has no single-purpose tools pre-programmed. Instead, it can write its own code and use the terminal to create and use its own tools as needed.
- The only default tools in its arsenal are online search, memory features, communication (with the user and other agents), and code/terminal execution. Everything else is created by the agent itself or can be extended by the user.
- Tool usage functionality has been developed from scratch to be the most compatible and reliable, even with very small models.
- Default Tools: Agent Zero includes tools like knowledge, webpage content, code execution, and communication.
- Creating Custom Tools: Extend Agent Zero's functionality by creating your own custom tools.
- Instruments: Instruments are a new type of tool that allow you to create custom functions and procedures that can be called by Agent Zero.
- Multi-agent cooperation
- Every agent has a superior agent giving it tasks and instructions. Every agent then reports back to its superior.
- In the case of the first agent in the chain (Agent 0), the superior is the human user; the agent sees no difference.
- Every agent can create its subordinate agent to help break down and solve subtasks. This helps all agents keep their context clean and focused.
- Completely customizable and extensible
- Almost nothing in this framework is hard-coded. Nothing is hidden. Everything can be extended or changed by the user.
- The whole behavior is defined by a system prompt in the prompts/default/agent.system.md file. Change this prompt and change the framework dramatically.
- The framework does not guide or limit the agent in any way. There are no hard-coded rails that agents have to follow.
- Every prompt, every small message template sent to the agent in its communication loop, can be found in the prompts/ folder and changed.
- Every default tool can be found in the python/tools/ folder and changed or copied to create new predefined tools.
- Of course, it is open-source (except for some tools like Perplexity, but that will be replaced with an open-source alternative as well in the future).
- Communication is key
- Give your agent a proper system prompt and instructions, and it can do miracles.
- Agents can communicate with their superiors and subordinates, asking questions, giving instructions, and providing guidance. Instruct your agents in the system prompt on how to communicate effectively.
- The terminal interface is real-time streamed and interactive. You can stop and intervene at any point. If you see your agent heading in the wrong direction, just stop and tell it right away.
- There is a lot of freedom in this framework. You can instruct your agents to regularly report back to superiors asking for permission to continue. You can instruct them to use point-scoring systems when deciding when to delegate subtasks. Superiors can double-check subordinates' results and dispute. The possibilities are endless.
Nice features to have
- Output is very clean, colorful, readable and interactive; nothing is hidden.
- The same colorful output you see in the terminal is automatically saved to HTML file in logs/ folder for every session.
- Agent output is streamed in real-time, allowing the user to read along and intervene at any time.
- No coding is required, only prompting and communication skills.
- With a solid system prompt, the framework is reliable even with small models, including precise tool usage.
Keep in mind
-
Agent Zero can be dangerous! With proper instruction, Agent Zero is capable of many things, even potentially dangerous to your computer, data, or accounts. Always run Agent Zero in an isolated environment (like the built in docker container) and be careful what you wish for.
-
Agent Zero is not pre-programmed; it is prompt-based. The whole framework contains only a minimal amount of code and does not guide the agent in any way. Everything lies in the system prompt in the prompts/ folder. Here you can rewrite the whole framework behavior to your needs. If your agent fails to communicate properly, use tools, reason, use memory, find answers - just instruct it better.
-
If you cannot provide the ideal environment, let your agent know. Agent Zero is made to be used in an isolated virtual environment (for safety) with some tools preinstalled and configured. If you cannot provide all the necessary conditions or API keys, just change the system prompt and tell your agent what operating system and tools are at its disposal. Nothing is hard-coded; if you do not tell your agent about a certain tool, it will not know about it and will not try to use it.
Known problems
- The system prompt sucks. You can do better. If you do, help me please :)
- The communication between agents and terminal in Docker Container via SSH can sometimes break and stop producing outputs. Sometimes it is because the agent runs something like "server.serve_forever()" which causes the terminal to hang, sometimes a random error can occur. Restarting the agent and/or the docker container helps.
- The agent can break his operating system. Sometimes the agent can deactivate virtual environment, uninstall packages, change config etc. Again, removing the docker container and cleaning up the work_dir/ is enough to fix that.
Ideal environment
- Docker container: The perfect environment to run Agent Zero is the built-in docker container. The agent can download the image frdel/agent-zero-exe on its own and start the container, you only need to have docker running (like the Docker Desktop application).
- Python: Python has to be installed on the system to run the framework.
- Internet access: The agent will need internet access to use its online knowledge tool and execute commands and scripts requiring a connection. If you do not need your agent to be online, you can alter its prompts in the prompts/ folder and make it fully local.
Setup
A detailed setup guide for Windows, macOS and Linux with a video can be found in the new Agent Zero Documentation at this page.
Consult the Documentation
The documentation dives deep into the framework and its features. It is a good place to start if you are new to Agent Zero. Click here to see the Documentation.
Coming up
- Preinstalled binaries and bundler scripts
- Knowledge tool open-sourcing and web scraping tool
- User interaction refinements
- In-context switchable LLMs
Changelog [since version 0.7]
v0.7.1
- Persistent Chats - Serialized to /tmp/chats and automatically loaded in run_ui.py on startup
- Documentation stack merged into the repository
- Bug Fixes
v0.7
- Automatic memory
- UI improvements
- Instruments
- Extensions framework
- Reflection prompts
- Bugfixes
[!NOTE]
Changes to launch files since v0.6:
- main.py file has been replaced with run_ui.py (webui) and run_cli.py (terminal) launch files.
- configuration has been moved to initialize.py for both webui and terminal launch files.
最近版本更新:(数据更新于 2024-09-18 09:49:31)
2024-09-14 01:42:37 v0.6.5
2024-09-13 20:32:27 v0.6.4
2024-09-13 04:45:52 v0.6.3
2024-09-08 09:47:44 v0.6.2
2024-09-06 12:45:28 v0.6.1
2024-09-05 07:01:48 v0.6
2024-08-07 01:51:53 v0.5
2024-07-26 16:53:48 v0.4
2024-07-20 04:51:28 v0.3
2024-06-27 04:40:22 v0.2
frdel/agent-zero同语言 Python最近更新仓库
2024-11-23 07:15:18 comfyanonymous/ComfyUI
2024-11-23 02:05:08 hect0x7/JMComic-Crawler-Python
2024-11-22 19:26:55 ultralytics/ultralytics
2024-11-22 19:09:02 xtekky/gpt4free
2024-11-22 18:58:34 home-assistant/core
2024-11-22 08:12:43 jxxghp/MoviePilot