Alessandro commited on
Commit
c2b3ad4
·
unverified ·
1 Parent(s): 4c80980

docs: update for v.0.8 (#262)

Browse files

* docs: update for v.0.8

- fix: imgs in setup guide
- updated docs in knowledge dir
- new video in main readme

* Update installation.md with Ollama guide

To be improved asap

* ollama guide

* improving readme and stt/tts

Files changed (43) hide show
  1. README.md +93 -81
  2. docs/README.md +34 -52
  3. docs/architecture.md +273 -151
  4. docs/contribution.md +1 -3
  5. docs/installation.md +435 -212
  6. docs/res/arch-01.svg +0 -0
  7. docs/res/setup/1-docker-image-search.png +3 -0
  8. docs/res/setup/2-docker-image-run.png +3 -0
  9. docs/res/setup/3-docker-port-mapping.png +3 -0
  10. docs/res/setup/4-docker-container-started.png +3 -0
  11. docs/res/setup/5-docker-click-to-open.png +3 -0
  12. docs/res/setup/6-docker-a0-running.png +3 -0
  13. docs/res/setup/9-rfc-devpage-on-docker-instance-1.png +3 -0
  14. docs/res/setup/9-rfc-devpage-on-local-sbs-1.png +3 -0
  15. docs/res/setup/docker-delete-image-1.png +3 -0
  16. docs/res/setup/image-14-u.png +3 -0
  17. docs/res/setup/image-22-1.png +2 -2
  18. docs/res/setup/image-23-1.png +2 -2
  19. docs/res/setup/settings/1-agentConfig.png +3 -0
  20. docs/res/setup/settings/2-chat-model.png +3 -0
  21. docs/res/setup/settings/3-auth.png +3 -0
  22. docs/res/setup/settings/4-local-models.png +3 -0
  23. docs/res/setup/thumb_setup.png +3 -0
  24. docs/res/ui-actions.png +3 -0
  25. docs/res/ui-attachments-2.png +3 -0
  26. docs/res/ui-attachments.png +3 -0
  27. docs/res/ui-behavior-change-chat.png +3 -0
  28. docs/res/ui-context.png +3 -0
  29. docs/res/ui-file-browser.png +3 -0
  30. docs/res/ui-history.png +3 -0
  31. docs/res/ui-katex-1.png +3 -0
  32. docs/res/ui-katex-2.png +3 -0
  33. docs/res/ui-nudge.png +3 -0
  34. docs/res/ui-restarting.png +3 -0
  35. docs/res/ui-screen.png +3 -0
  36. docs/res/ui-settings-5-speech-to-text.png +3 -0
  37. docs/res/ui-tts-stop-speech.png +3 -0
  38. docs/res/ui_newchat1.png +2 -2
  39. docs/res/web-ui.mp4 +3 -0
  40. docs/troubleshooting.md +19 -31
  41. docs/usage.md +218 -59
  42. knowledge/default/main/about/github_readme.md +58 -15
  43. knowledge/default/main/about/installation.md +459 -73
README.md CHANGED
@@ -2,116 +2,128 @@
2
 
3
  [![Join our Skool Community](https://img.shields.io/badge/Skool-Join%20our%20Community-4A90E2?style=for-the-badge&logo=skool&logoColor=white)](https://www.skool.com/agent-zero) [![Join our Discord](https://img.shields.io/badge/Discord-Join%20our%20server-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/B8KZKNsPpj) [![Subscribe on YouTube](https://img.shields.io/badge/YouTube-Subscribe-red?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@AgentZeroFW) [![Connect on LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/jan-tomasek/) [![Follow on X.com](https://img.shields.io/badge/X.com-Follow-1DA1F2?style=for-the-badge&logo=x&logoColor=white)](https://x.com/JanTomasekDev)
4
 
5
-
6
  [![Intro Video](/docs/res/new_vid.jpg)](https://www.youtube.com/watch?v=U_Gl0NPalKA)
7
 
8
  **Personal and organic AI framework**
 
9
  - Agent Zero is not a predefined agentic framework. It is designed to be dynamic, organically growing, and learning as you use it.
10
- - Agent Zero is fully transparent, readable, comprehensible, customizable and interactive.
11
  - Agent Zero uses the computer as a tool to accomplish its (your) tasks.
12
 
13
- ## Now with Responsive UI, Auto-memory and Reflection:
14
- ![Web UI](/docs/res/win_webui2.gif)
15
-
16
- ## Key concepts
17
- 1. **General-purpose assistant**
18
- - 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.
19
- - 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.
20
-
21
- 2. **Computer as a tool**
22
- - 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.
23
- - 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.
24
- - Tool usage functionality has been developed from scratch to be the most compatible and reliable, even with very small models.
25
-
26
- * **Default Tools:** Agent Zero includes tools like knowledge, webpage content, code execution, and communication.
27
- * **Creating Custom Tools:** Extend Agent Zero's functionality by creating your own custom tools.
28
- * **Instruments:** Instruments are a new type of tool that allow you to create custom functions and procedures that can be called by Agent Zero.
29
-
30
- 3. **Multi-agent cooperation**
31
- - Every agent has a superior agent giving it tasks and instructions. Every agent then reports back to its superior.
32
- - In the case of the first agent in the chain (Agent 0), the superior is the human user; the agent sees no difference.
33
- - Every agent can create its subordinate agent to help break down and solve subtasks. This helps all agents keep their context clean and focused.
34
-
35
- 4. **Completely customizable and extensible**
36
- - Almost nothing in this framework is hard-coded. Nothing is hidden. Everything can be extended or changed by the user.
37
- - 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.
38
- - The framework does not guide or limit the agent in any way. There are no hard-coded rails that agents have to follow.
39
- - Every prompt, every small message template sent to the agent in its communication loop, can be found in the **prompts/** folder and changed.
40
- - Every default tool can be found in the **python/tools/** folder and changed or copied to create new predefined tools.
41
- - 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).
42
-
43
- 5. **Communication is key**
44
- - Give your agent a proper system prompt and instructions, and it can do miracles.
45
- - 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.
46
- - 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.
47
- - 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.
 
 
48
 
49
  ![Agent Zero](/docs/res/splash_wide.png)
50
 
51
- ## Nice features to have
52
- - Output is very clean, colorful, readable and interactive; nothing is hidden.
53
- - The same colorful output you see in the terminal is automatically saved to HTML file in **logs/** folder for every session.
54
- - Agent output is streamed in real-time, allowing the user to read along and intervene at any time.
55
- - No coding is required, only prompting and communication skills.
 
56
  - With a solid system prompt, the framework is reliable even with small models, including precise tool usage.
57
 
58
  ![Agent 1 System Load](/docs/res/ui_screen.png)
59
 
60
- ## Keep in mind
61
- 1. **Agent Zero can be dangerous!**
62
- 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.
 
63
 
64
- 2. **Agent Zero is not pre-programmed; it is prompt-based.**
65
- The whole framework contains only a minimal amount of code and does not guide the agent in any way.
66
- Everything lies in the system prompt in the **prompts/** folder. Here you can rewrite the whole framework behavior to your needs.
67
- If your agent fails to communicate properly, use tools, reason, use memory, find answers - just instruct it better.
68
 
69
- 3. **If you cannot provide the ideal environment, let your agent know.**
70
- Agent Zero is made to be used in an isolated virtual environment (for safety) with some tools preinstalled and configured.
71
- 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.
72
 
73
  [![David Ondrej video](/docs/res/david_vid.jpg)](https://www.youtube.com/watch?v=_Pionjv4hGc)
74
 
75
- ## Known problems
76
- 1. The system prompt sucks. You can do better. If you do, help me please :)
77
- 2. 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.
78
- 3. 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.
 
79
 
80
- ## Ideal environment
81
- - **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).
82
- - **Python**: Python has to be installed on the system to run the framework.
83
- - **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.
84
 
85
  ![Time example](/docs/res/time_example.jpg)
86
 
87
  ## Setup
88
- A detailed setup guide for Windows, macOS and Linux with a video can be found in the new Agent Zero Documentation at [this page](docs/installation.md#in-depth-guide-for-windows-and-macos).
 
 
 
89
 
90
  ## Consult the Documentation
91
- 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](docs/README.md) to see the Documentation.
92
 
93
- ## Coming up
94
- - **Preinstalled binaries and bundler scripts**
95
- - **Knowledge tool open-sourcing and web scraping tool**
96
- - **User interaction refinements**
97
- - **In-context switchable LLMs**
 
98
 
99
  ### Changelog [since version 0.7]
100
 
101
- #### v0.7.1
102
- - **Persistent Chats** - Serialized to /tmp/chats and automatically loaded in run_ui.py on startup
103
- - **Documentation stack merged into the repository**
104
- - **Bug Fixes**
 
 
 
 
 
 
 
 
 
 
 
 
105
 
106
  #### v0.7
107
- - **Automatic memory**
108
- - **UI improvements**
109
  - **Instruments**
110
- - **Extensions framework**
111
- - **Reflection prompts**
112
- - **Bugfixes**
113
-
114
- > [!NOTE]
115
- > **Changes to launch files since v0.6:**
116
- > - main.py file has been replaced with run_ui.py (webui) and run_cli.py (terminal) launch files.
117
- > - configuration has been moved to initialize.py for both webui and terminal launch files.
 
2
 
3
  [![Join our Skool Community](https://img.shields.io/badge/Skool-Join%20our%20Community-4A90E2?style=for-the-badge&logo=skool&logoColor=white)](https://www.skool.com/agent-zero) [![Join our Discord](https://img.shields.io/badge/Discord-Join%20our%20server-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/B8KZKNsPpj) [![Subscribe on YouTube](https://img.shields.io/badge/YouTube-Subscribe-red?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@AgentZeroFW) [![Connect on LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/jan-tomasek/) [![Follow on X.com](https://img.shields.io/badge/X.com-Follow-1DA1F2?style=for-the-badge&logo=x&logoColor=white)](https://x.com/JanTomasekDev)
4
 
 
5
  [![Intro Video](/docs/res/new_vid.jpg)](https://www.youtube.com/watch?v=U_Gl0NPalKA)
6
 
7
  **Personal and organic AI framework**
8
+
9
  - Agent Zero is not a predefined agentic framework. It is designed to be dynamic, organically growing, and learning as you use it.
10
+ - Agent Zero is fully transparent, readable, comprehensible, customizable, and interactive.
11
  - Agent Zero uses the computer as a tool to accomplish its (your) tasks.
12
 
13
+ ## Now fully Dockerized, with TTS and STT:
14
+
15
+ ![Dockerized Agent Zero](https://github.com/user-attachments/assets/58e5462b-481d-4f43-8a4c-e989b9acfdf7)
16
+
17
+ ## Key Concepts
18
+
19
+ 1. **General-purpose Assistant**
20
+ - 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.
21
+ - 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.
22
+
23
+ 2. **Computer as a Tool**
24
+ - 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.
25
+ - 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.
26
+ - Tool usage functionality has been developed from scratch to be the most compatible and reliable, even with very small models.
27
+
28
+ * **Default Tools:** Agent Zero includes tools like knowledge, webpage content, code execution, and communication.
29
+ * **Creating Custom Tools:** Extend Agent Zero's functionality by creating your own custom tools.
30
+ * **Instruments:** Instruments are a new type of tool that allow you to create custom functions and procedures that can be called by Agent Zero.
31
+
32
+ 3. **Multi-agent Cooperation**
33
+ - Every agent has a superior agent giving it tasks and instructions. Every agent then reports back to its superior.
34
+ - In the case of the first agent in the chain (Agent 0), the superior is the human user; the agent sees no difference.
35
+ - Every agent can create its subordinate agent to help break down and solve subtasks. This helps all agents keep their context clean and focused.
36
+
37
+ 4. **Completely Customizable and Extensible**
38
+ - Almost nothing in this framework is hard-coded. Nothing is hidden. Everything can be extended or changed by the user.
39
+ - 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.
40
+ - The framework does not guide or limit the agent in any way. There are no hard-coded rails that agents have to follow.
41
+ - Every prompt, every small message template sent to the agent in its communication loop can be found in the **prompts/** folder and changed.
42
+ - Every default tool can be found in the **python/tools/** folder and changed or copied to create new predefined tools.
43
+ - 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).
44
+
45
+ 5. **Communication is Key**
46
+ - Give your agent a proper system prompt and instructions, and it can do miracles.
47
+ - 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.
48
+ - 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.
49
+ - 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.
50
 
51
  ![Agent Zero](/docs/res/splash_wide.png)
52
 
53
+ ## Nice Features to Have
54
+
55
+ - The new GUI output is very clean, fluid, colorful, readable, and interactive; nothing is hidden.
56
+ - The same colorful output you see in the terminal is automatically saved to an HTML file in **logs/** folder for every session.
57
+ - Agent output is streamed in real-time, allowing users to read along and intervene at any time.
58
+ - No coding is required; only prompting and communication skills are necessary.
59
  - With a solid system prompt, the framework is reliable even with small models, including precise tool usage.
60
 
61
  ![Agent 1 System Load](/docs/res/ui_screen.png)
62
 
63
+ ## Keep in Mind
64
+
65
+ 1. **Agent Zero Can Be Dangerous!**
66
+ - With proper instruction, Agent Zero is capable of many things, even potentially dangerous actions concerning your computer, data, or accounts. Always run Agent Zero in an isolated environment (like Docker) and be careful what you wish for.
67
 
68
+ 2. **Agent Zero Is Not Pre-programmed; It Is Prompt-based.**
69
+ - 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 located in the **prompts/** folder.
 
 
70
 
71
+ 3. **If You Cannot Provide the Ideal Environment, Let Your Agent Know.**
72
+ - Agent Zero is made to be used in an isolated virtual environment (for safety) with some tools preinstalled and configured.
 
73
 
74
  [![David Ondrej video](/docs/res/david_vid.jpg)](https://www.youtube.com/watch?v=_Pionjv4hGc)
75
 
76
+ ## Known Problems
77
+
78
+ 1. The system prompt may need improvements; contributions are welcome!
79
+ 2. Communication between agents via SSH within Docker containers may occasionally break; restarting might resolve issues.
80
+ 3. The agent may inadvertently alter its operating environment; cleaning up the **work_dir/** often fixes this.
81
 
82
+ ## Ideal Environment
83
+
84
+ - **Docker Container**: The ideal environment for running Agent Zero is within a Docker container; ensure Docker is running (e.g., Docker Desktop).
85
+ - **Internet Access**: Required for online knowledge tools; adjust prompts if offline operation is preferred.
86
 
87
  ![Time example](/docs/res/time_example.jpg)
88
 
89
  ## Setup
90
+
91
+ A detailed setup guide for Windows, macOS, and Linux with a video can be found in the new Agent Zero Documentation at [this page](docs/installation.md#windows-macos-and-linux-setup-guide).
92
+
93
+ You can download full binaries for your system from the [releases page](https://github.com/frdel/agent-zero/releases).
94
 
95
  ## Consult the Documentation
 
96
 
97
+ The documentation dives deep into the framework's features; it's an excellent starting point for new users. Click [here](docs/README.md) for more information.
98
+
99
+ ## Coming Up
100
+
101
+ - **User Interaction Refinements**
102
+ - **Browser Use and RAG Tools**
103
 
104
  ### Changelog [since version 0.7]
105
 
106
+ > [!IMPORTANT]
107
+ >
108
+ > **Changes to frdel/agent-zero Docker image since v0.8:**
109
+ >
110
+ > - In version 0.8, the Docker image has changed to frdel/agent-zero-run using a new Dockerfile and image.
111
+
112
+ #### v0.8
113
+ - **Docker Runtime**
114
+ - **New Messages History and Summarization System**
115
+ - **Agent Behavior Change and Management**
116
+ - **Text-to-Speech (TTS) and Speech-to-Text (STT)**
117
+ - **Settings Page in Web UI**
118
+ - **SearXNG Integration Replacing Perplexity + DuckDuckGo Knowledge Tool**
119
+ - **File Browser Functionality**
120
+ - **KaTeX Math Visualization Support**
121
+ - **In-chat File Attachments**
122
 
123
  #### v0.7
124
+ - **Automatic Memory**
125
+ - **UI Improvements**
126
  - **Instruments**
127
+ - **Extensions Framework**
128
+ - **Reflection Prompts**
129
+ - **Bug Fixes**
 
 
 
 
 
docs/README.md CHANGED
@@ -3,80 +3,62 @@
3
  To begin with Agent Zero, follow the links below for detailed guides on various topics:
4
 
5
  - **[Installation](installation.md):** Set up (or [update](installation.md#how-to-update-agent-zero)) Agent Zero on your system.
6
- - **[Quick Start](quickstart.md):** Begin using Agent Zero with practical examples.
7
- - **[Usage Guide](usage.md):** Explore advanced features and capabilities.
8
  - **[Architecture Overview](architecture.md):** Understand the internal workings of the framework.
9
  - **[Contributing](contribution.md):** Learn how to contribute to the Agent Zero project.
10
  - **[Troubleshooting and FAQ](troubleshooting.md):** Find answers to common issues and questions.
11
- ##
12
  ### Your experience with Agent Zero starts now!
13
 
14
- - **Download Agent Zero:** Download the latest release from the [GitHub releases page](https://github.com/frdel/agent-zero/releases).
15
  - **Join the Community:** Join the Agent Zero [Skool](https://www.skool.com/agent-zero) or [Discord](https://discord.gg/Z2tun2N3) community to discuss ideas, ask questions, and collaborate with other contributors.
16
  - **Share your Work:** Share your Agent Zero creations, workflows and discoverings on our [Show and Tell](https://github.com/frdel/agent-zero/discussions/categories/show-and-tell) area on GitHub.
17
  - **Report Issues:** Use the [GitHub issue tracker](https://github.com/frdel/agent-zero/issues) to report framework-relative bugs or suggest new features.
18
- ##
19
  ## Table of Contents
20
 
21
  - [Welcome to the Agent Zero Documentation](#agent-zero-documentation)
22
- - [Key Features](#key-features)
23
- - [Start your experience with Agent Zero](#your-experience-with-agent-zero-starts-now)
24
  - [Table of Contents](#table-of-contents)
25
- - [Installation guide for Windows, MacOS and Linux](installation.md)
26
- - [Windows Quick Start](installation.md#windows-quick-start)
27
- - [macOS Quick Start](installation.md#macos-quick-start)
28
- - [Linux Quick Start](installation.md#linux-quick-start)
29
- - [In-Depth Guide for Windows and MacOS](installation.md#in-depth-guide-for-windows-and-macos)
30
- - [1. Install Conda (miniconda)](installation.md#1-install-conda-miniconda)
31
- - [2. Install Docker (Docker Desktop application)](installation.md#2-install-docker-docker-desktop-application)
32
- - [3. Download Agent Zero](installation.md#3-download-agent-zero)
33
- - [4. Set up Conda environment](installation.md#4-set-up-conda-environment)
34
- - [5. Configure Agent Zero](installation.md#5-configure-agent-zero)
35
- - [6. Run Agent Zero](installation.md#6-run-agent-zero)
36
- - [Choosing Your LLMs](installation.md#choosing-your-llms)
37
- - [Installing and Using Ollama](installation.md#installing-and-using-ollama-local-models)
38
- - [How to update Agent Zero](installation.md#how-to-update-agent-zero)
39
- - [How to create executable files for Agent Zero](installation.md#how-to-create-executable-files-for-agent-zero-in-windows-macos-and-linux)
40
- - [Conclusion](installation.md#conclusion)
41
- - [Quick Start](quickstart.md)
42
- - [Launching the Web UI](quickstart.md#launching-the-web-ui)
43
- - [Running a Simple Task](quickstart.md#running-a-simple-task)
44
- - [Example Interaction](quickstart.md#example-interaction)
45
- - [Next Steps](quickstart.md#next-steps)
46
  - [Usage Guide](usage.md)
 
 
 
 
47
  - [Tool Usage](usage.md#tool-usage)
48
- - [Prompt Engineering](usage.md#prompt-engineering)
49
  - [Example of Tools Usage](usage.md#example-of-tools-usage-web-search-and-code-execution)
50
- - [Memory Management](usage.md#memory-management)
51
  - [Multi-Agent Cooperation](usage.md#multi-agent-cooperation)
52
- - [Agent Behavior](usage.md#agent-behavior)
53
- - [Using Agent Zero on your mobile device](usage.md#using-agent-zero-on-your-mobile-device)
54
- - [Using code_execution_tool outside of the Docker Container](usage.md#using-code_execution_tool-outside-of-the-docker-container)
 
55
  - [Architecture Overview](architecture.md)
 
 
56
  - [Core Components](architecture.md#core-components)
57
- - [Agent Hierarchy and Communication](architecture.md#agent-hierarchy-and-communication)
58
- - [Interaction Flow](architecture.md#interaction-flow)
59
- - [Memory System](architecture.md#memory-system)
60
- - [Tools](architecture.md#tools)
61
- - [Knowledge](architecture.md#knowledge)
62
- - [Prompts](architecture.md#prompts)
63
- - [Extensions](architecture.md#extensions)
64
- - [Structure of Extensions](architecture.md#structure-of-extensions)
65
- - [Types of Default Extensions](architecture.md#types-of-default-extensions)
66
- - [Key Files](architecture.md#key-files)
67
- - [Directory Structure](architecture.md#directory-structure)
68
  - [Customization](architecture.md#customization)
69
- - [Custom Prompts](architecture.md#custom-prompts)
70
- - [Changing the System Prompt Folder](architecture.md#changing-the-system-prompt-folder)
71
- - [AgentConfig](architecture.md#agentconfig)
72
- - [Adding Tools](architecture.md#adding-tools)
73
- - [Adding Instruments](architecture.md#adding-instruments)
74
- - [Adding Extensions](architecture.md#adding-extensions)
75
- - [Contributing to Agent Zero](contribution.md)
76
  - [Getting Started](contribution.md#getting-started)
77
  - [Making Changes](contribution.md#making-changes)
78
  - [Submitting a Pull Request](contribution.md#submitting-a-pull-request)
79
  - [Documentation Stack](contribution.md#documentation-stack)
80
- - [FAQ and Troubleshooting](troubleshooting.md)
81
  - [Frequently Asked Questions](troubleshooting.md#frequently-asked-questions)
82
  - [Troubleshooting](troubleshooting.md#troubleshooting)
 
3
  To begin with Agent Zero, follow the links below for detailed guides on various topics:
4
 
5
  - **[Installation](installation.md):** Set up (or [update](installation.md#how-to-update-agent-zero)) Agent Zero on your system.
6
+ - **[Usage Guide](usage.md):** Explore GUI features and usage scenarios.
 
7
  - **[Architecture Overview](architecture.md):** Understand the internal workings of the framework.
8
  - **[Contributing](contribution.md):** Learn how to contribute to the Agent Zero project.
9
  - **[Troubleshooting and FAQ](troubleshooting.md):** Find answers to common issues and questions.
10
+
11
  ### Your experience with Agent Zero starts now!
12
 
13
+ - **Download Agent Zero:** Follow the [installation guide](installation.md) to download and run Agent Zero.
14
  - **Join the Community:** Join the Agent Zero [Skool](https://www.skool.com/agent-zero) or [Discord](https://discord.gg/Z2tun2N3) community to discuss ideas, ask questions, and collaborate with other contributors.
15
  - **Share your Work:** Share your Agent Zero creations, workflows and discoverings on our [Show and Tell](https://github.com/frdel/agent-zero/discussions/categories/show-and-tell) area on GitHub.
16
  - **Report Issues:** Use the [GitHub issue tracker](https://github.com/frdel/agent-zero/issues) to report framework-relative bugs or suggest new features.
17
+
18
  ## Table of Contents
19
 
20
  - [Welcome to the Agent Zero Documentation](#agent-zero-documentation)
21
+ - [Your Experience with Agent Zero](#your-experience-with-agent-zero-starts-now)
 
22
  - [Table of Contents](#table-of-contents)
23
+ - [Installation Guide](installation.md)
24
+ - [Windows, macOS and Linux Setup](installation.md#windows-macos-and-linux-setup-guide)
25
+ - [Settings Configuration](installation.md#settings-configuration)
26
+ - [Choosing Your LLMs](installation.md#choosing-your-llms)
27
+ - [Installing and Using Ollama](installation.md#installing-and-using-ollama-local-models)
28
+ - [Using Agent Zero on Mobile](installation.md#using-agent-zero-on-your-mobile-device)
29
+ - [How to Update Agent Zero](installation.md#how-to-update-agent-zero)
30
+ - [Full Binaries Installation](installation.md#in-depth-guide-for-full-binaries-installation)
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  - [Usage Guide](usage.md)
32
+ - [Basic Operations](usage.md#basic-operations)
33
+ - [Restart Framework](usage.md#restart-framework)
34
+ - [Action Buttons](usage.md#action-buttons)
35
+ - [File Attachments](usage.md#file-attachments)
36
  - [Tool Usage](usage.md#tool-usage)
 
37
  - [Example of Tools Usage](usage.md#example-of-tools-usage-web-search-and-code-execution)
 
38
  - [Multi-Agent Cooperation](usage.md#multi-agent-cooperation)
39
+ - [Prompt Engineering](usage.md#prompt-engineering)
40
+ - [Voice Interface](usage.md#voice-interface)
41
+ - [Mathematical Expressions](usage.md#mathematical-expressions)
42
+ - [File Browser](usage.md#file-browser)
43
  - [Architecture Overview](architecture.md)
44
+ - [System Architecture](architecture.md#system-architecture)
45
+ - [Runtime Architecture](architecture.md#runtime-architecture)
46
  - [Core Components](architecture.md#core-components)
47
+ - [Agents](architecture.md#1-agents)
48
+ - [Tools](architecture.md#2-tools)
49
+ - [SearXNG Integration](architecture.md#searxng-integration)
50
+ - [Memory System](architecture.md#3-memory-system)
51
+ - [Prompts](architecture.md#4-prompts)
52
+ - [Knowledge](architecture.md#5-knowledge)
53
+ - [Instruments](architecture.md#6-instruments)
54
+ - [Extensions](architecture.md#7-extensions)
55
+ - [Implementation Details](architecture.md#implementation-details)
 
 
56
  - [Customization](architecture.md#customization)
57
+ - [Contributing](contribution.md)
 
 
 
 
 
 
58
  - [Getting Started](contribution.md#getting-started)
59
  - [Making Changes](contribution.md#making-changes)
60
  - [Submitting a Pull Request](contribution.md#submitting-a-pull-request)
61
  - [Documentation Stack](contribution.md#documentation-stack)
62
+ - [Troubleshooting and FAQ](troubleshooting.md)
63
  - [Frequently Asked Questions](troubleshooting.md#frequently-asked-questions)
64
  - [Troubleshooting](troubleshooting.md#troubleshooting)
docs/architecture.md CHANGED
@@ -1,199 +1,321 @@
1
  # Architecture Overview
2
- Agent Zero is built on a flexible and modular architecture designed for extensibility and customization. This section outlines the key components and the interactions between them. This simplified diagram illustrates the hierarchical relationship between agents and their interaction with tools, extensions, instruments, prompts, memory and knowledge base.
3
 
4
- ![Agent Zero Architecture](res/arch-01.svg)
5
-
6
- The user or Agent 0 is at the top of the hierarchy, delegating tasks to subordinate agents, which can further delegate to other agents. Each agent can utilize tools and access the shared assets (prompts, memory, knowledge, extensions and instruments) to perform its tasks.
7
 
8
- ## Core Components
9
- Agent Zero's architecture revolves around the following key components:
10
 
11
- 1. **Agents:** The core actors within the framework. Agents receive instructions, reason, make decisions, and utilize tools to achieve their objectives. Agents operate within a hierarchical structure, with superior agents delegating tasks to subordinate agents.
12
 
13
- 2. **Tools:** Tools are functionalities that agents can leverage. These can include anything from web search and code execution to interacting with APIs or controlling external software. Agent Zero provides a mechanism for defining and integrating both built-in and custom tools.
 
14
 
15
- 3. **Memory:** Agent Zero has persistent, long-term memory to store past experiences, knowledge, and information. This memory is used to inform decision-making and improve performance over time. Learn more in [Memory System](#memory-system)
 
 
 
16
 
17
- 4. **Prompts:** Guide agent's behavior and communication. The system and tools prompts defines the agent's overall role and objectives, while message prompts structure the interaction and flow of information and memory.
 
 
 
 
18
 
19
- 5. **Knowledge:** Refers to the user-provided information and data that agents can leverage. This can include documents, databases, or any other relevant resources. Agents can retrieve and utilize this knowledge to answer questions, make decisions, and perform RAG-augmented tasks.
 
 
 
 
 
20
 
21
- 6. **Instruments:** Instruments provide a way to add custom functionalities to Agent Zero. They can modify agent behavior introducing new procedures, function calls, or scripts to integrate with other systems. Instruments scripts are run inside the Docker Container.
 
 
 
 
22
 
23
- 7. **Extensions:** Extensions are logical components that can be added to Agent Zero to enhance its capabilities. Extensions can include new message loops, custom memory management rules, or even more.
 
24
 
25
- 8. **Docker Container:** Agent Zero execute code commands in a Docker container, which provides isolation and security. This ensures that agents can safely and securely interact with tools, especially when running code.
 
26
 
27
- ## Agent Hierarchy and Communication
28
  Agent Zero employs a hierarchical agent structure, where a top-level agent (often the user) can delegate tasks to subordinate agents. This hierarchy allows for the efficient breakdown of complex tasks into smaller, more manageable sub-tasks.
29
 
30
- Communication flows between agents through messages, which are structured according to the prompt templates. These messages typically include:
31
 
32
  | Argument | Description |
33
  | --- | --- |
34
- | `Thoughts:` | The agent's Chain of Thought and planning process. |
35
- | `Tool name:` | The specific tool used by the agent. |
36
- | `Responses or queries:` | Results, feedback or queries from tools or other agents. |
37
 
38
- ## Interaction Flow
39
  A typical interaction flow within Agent Zero might look like this:
40
 
41
  ![Interaction Flow](res/flow-01.svg)
42
 
43
- 1. The user provides an instruction to Agent 0.
44
- 2. Agent 0 initializes VectorDB and access memory.
45
- 3. Agent 0 analyzes the instruction and formulates a plan using `thoughts` argument, possibly involving the use of tools or the creation of sub-agents.
46
- 4. If necessary, Agent 0 delegates sub-tasks to subordinate agents.
47
- 5. Agents use tools to perform actions, both providing arguments and responses or queries.
48
- 6. Agents communicate results and feedback back up the hierarchy.
49
- 7. Agent 0 provides the final response to the user.
50
 
51
- ## Memory System
52
- The memory system is a critical component of Agent Zero, enabling the agent to learn and adapt from past interactions. It operates on a hybrid model where part of the memory is managed automatically by the framework while users can also manually input and extract information.
53
- - **Memory Loading**: At the start of each session, relevant memories are automatically loaded and injected into the system prompt, allowing the agent to utilize past interactions effectively.
54
- - **Memory Structure**: The memory is categorized into four distinct areas:
55
- - **Storage and retrieval** of user-provided information (e.g., names, API keys).
56
- - **Fragments**: Contains pieces of information from previous conversations, updated automatically.
57
- - **Solutions**: Stores successful solutions from past interactions for future reference.
58
- - **Metadata**: Each memory entry includes metadata (IDs, timestamps), enabling efficient filtering and searching based on specific criteria.
59
 
60
- ## Tools
61
- **Built-in Tools:** Agent Zero comes with a set of built-in tools, including web search and code execution. These tools are general-purpose and designed to help agents perform tasks efficiently:
62
 
63
  | Tool | Function |
64
  | --- | --- |
65
- | call_subordinate | Allows agents to delegate tasks to subordinate agents. |
66
- | code_execution_tool | Allows agents to execute Python, Node.js, and Shell code in the terminal of the Docker container. |
67
- | knowledge_tool | Enables agents to retrieve information from memory, knowledge base or online external sources. |
68
- | response_tool | Allows agents to output a response. |
69
- | memory_tool | Enables agents to save, load, delete and forget information from memory. |
70
- | webpage_content_tool | Enables agents to fetch and analyze the text content of webpages. |
71
 
72
- - **Knowledge Tool:** The `knowledge_tool` uses DuckDuckGo and Perplexity APIs to search the web and retrieve information. It can also search the local knowledge base and memory for relevant information. The tool returns a summary of the information, which can be used by the agent to make decisions or answer questions.
 
73
 
74
- > [!TIP]
75
- > The Perplexity API key is the only service recommended for a full experience of
76
- > Agent Zero, but you can use DuckDuckGo by leaving the Perplexity API key value
77
- > empty. DuckDuckGo usage in Agent Zero is free of charge but has its rate limits.
78
-
79
- > [!NOTE]
80
- > It's important to note that the DuckDuckGo API is not as powerful as Perplexity
81
- > and may not return accurate or relevant results for some queries. The Perplexity
82
- > API is yet to be replaced with an open-source alternative.
83
 
84
- - **Custom Tools:** Users can create custom tools to extend Agent Zero's capabilities. Custom tools can be integrated into the framework by defining a tool specification, which includes the tool's prompt to be placed in `/prompts/$FOLDERNAME/agent.system.tool.$TOOLNAME.md`, as further detailed [here](#adding-tools).
 
85
 
86
- - **Tools vs. Instruments:** Tools are always present in system prompt, so you should keep them to minimum. To save yourself some tokens, use the [Instruments module](#adding-instruments) to call custom scripts or functions.
 
87
 
88
- ## Instruments
89
- - **Instruments:** Instruments allows you to add predefined actions or workflows to Agent Zero without adding to the token count of the system prompt. You can have unlimited amount of instruments, they are stored in long-term memory of Agent Zero, and recalled when needed. To create Instruments, see [Adding Instruments](#adding-instruments).
 
 
90
 
91
- ## Knowledge
92
- - **Custom Knowledge:** Users can add custom knowledge files to the `/knowledge/custom/main` directory. Agent Zero will automatically import these files, expanding its knowledge base. Supported file formats include `.txt`, `.pdf`, `.csv`, `.html`, `.json`, and `.md`. The list of supported file formats is yet to be expanded.
93
- - **Knowledge Base:** PDFs, databases, books, code documentation, and other documents can be added to the knowledge base. Agent Zero uses this information to answer questions and make decisions. The `/docs` folder, containing Agent Zero's documentation stack, is automatically added to the knowledge base.
94
 
95
- ## Prompts
96
- The `prompts` directory contains various Markdown files that control agent behavior and communication. The most important file is `agent.system.main.md`, which acts as a central hub, referencing other prompt files.
 
 
97
 
98
- **Key Prompt Files:**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  | Prompt File | Description |
100
  |---|---|
101
- | agent.system.main.role.md | Defines the agent's overall role. |
102
- | agent.system.main.communication.md | Specifies how the agent should communicate. |
103
- | agent.system.main.solving.md | Describes the agent's approach to tasks. |
104
- | agent.system.main.tips.md | Provides additional tips or guidance to the agent. |
105
- | agent.system.tools.md | Organizes and calls the individual tool prompt files. |
106
- | agent.system.tool.*.md | Individual tool prompt files (with * as the tool name). |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
 
108
  > [!NOTE]
109
- > You can customize any of these files. Agent Zero will use the files in your custom `prompts_subdir`
110
  > if they exist, otherwise, it will fall back to the files in `prompts/default`.
111
 
112
- ## Extensions
113
- - Extensions are a powerful feature of Agent Zero, designed to keep the main codebase clean and organized while allowing for greater flexibility and modularity. Here’s a detailed exploration of the extensions feature:
114
- ### Structure of Extensions
115
- Extensions can be found in `python/extensions` directory.
116
- - **Folder Organization**: The extensions are stored in a designated subfolder within the Python directory. This includes various subfolders that correspond to different aspects of the agent's message loop.
117
- - **Execution Order**: Files within these subfolders are executed in alphabetical order, ensuring predictable behavior when multiple extensions are utilized.
118
- ### Types of Default Extensions
119
- - **Message Loop Prompts**: These extensions handle the construction of system messages and maintain message history, ensuring that the agent has access to relevant context during interactions.
120
- - **Memory Management**: Extensions can also manage memory recall and solution memorization, allowing for dynamic updates based on user interactions.
121
- - **Custom Extensions**: Users can create custom extensions to add new functionalities or modify existing ones. See [Adding Extensions](#adding-extensions) for more details.
122
-
123
- ## Key Files
124
- | File | Description |
125
- | --- | --- |
126
- | `agent.py` | Contains the core logic for the `Agent`, `AgentConfig`, and messages classes, which defines the `prompts_subdir`, rate limits for models, and more, though `AgentConfig` class must be edited through `initialize.py` file. |
127
- | `example.env` | Contains environment variables for configuring API keys and other settings of Agent Zero. See more in [Installation](installation.md#5-configure-agent-zero) |
128
- | `initialize.py` | Defines Agent Zero's core configuration, including model choices and other critical settings. This is the central point for customizing the framework's behavior. See [Choosing Your LLMs](installation.md#choosing-your-llms) for more details. |
129
- | `models.py` | Defines the `get_provider_chat` or `..._embedding` functions, which specifies the model provider, model name, and other parameters for adding support for new models or custom models. |
130
- | `requirements.txt` | Lists the dependencies used by pip to install the necessary packages when you setup Agent Zero. |
131
- | `run_cli.py` | Starts the Agent Zero CLI. |
132
- | `run_ui.py` | Starts the Agent Zero Web UI. |
133
-
134
- ## Directory Structure
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  | Directory | Description |
136
  | --- | --- |
137
- | `/bundle` | Contains the scripts for bundling the project into a single exe file for easy distribution. |
138
- | `/docker` | Dockerfiles and related files for building Docker image |
139
- | `/docs` | Quickstart and installation guide |
140
- | `/instruments` | Instruments for interacting with the environment |
141
- | `/knowledge` | Knowledge base for storing and retrieving information |
142
- | `/logs` | HTML chat log files |
143
- | `/memory` | Memory storage for storing and retrieving information |
144
- | `/prompts` | System and tools prompts folders |
145
- | `/python` | Python code for the main system and tools |
146
- | `/python/extensions` | Extensions for the main system |
147
- | `/tests` | Unit tests for the project |
148
- | `/tmp/chats` | Chats files storage directory |
149
- | `/webui` | Web UI |
150
- | `/work_dir` | Working directory for the Agent |
151
-
152
- # Customization
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  Agent Zero's strength lies in its flexibility. This section details how to customize various aspects of the framework, tailoring it to your specific needs and preferences.
154
 
155
- ## Custom Prompts
156
- ### Changing the System Prompt Folder
157
- 1. Create a new directory inside the `prompts` directory (e.g., `prompts/my-custom-prompts`).
158
- 2. When copying the contents of the `prompts/default` directory into your new directory, take into account that Agent Zero will merge the contents of the `default` directory with the contents of your custom directory. This means that you can copy only the files you want to modify, and the rest will be taken from the `default` directory.
159
- 3. Modify the prompts in your custom directory as needed.
160
- 4. In `initialize.py`, update the `prompts_subdir` parameter in `AgentConfig` to point to your custom directory:
161
- ```python
162
- config = AgentConfig(..., prompts_subdir="my-prompts-folder", ...)
163
- ```
164
-
165
- ## AgentConfig
166
- The `AgentConfig` class is present in both `agent.py` and `initialize.py` and provides further customization options. You must edit `AgentConfig` class through `initialize.py` file. Here are some of the key parameters you can configure:
167
-
168
- - `prompts_subdir`: Specifies the directory containing your custom prompts. This allows you to create and manage different sets of prompts for different use cases. (See *Prompt Customization* below).
169
-
170
- - `knowledge_subdirs`: Defines the directories where Agent Zero searches for knowledge files.
171
-
172
- - **Rate Limiting:** Control API usage and prevent rate limit errors by setting `rate_limit_seconds` and `rate_limit_requests`.
173
-
174
- - **Docker and SSH:** Configure Docker and SSH settings for code execution, if needed. If you need to configure SSH to run on another machine, such as a remote VM, see more in
175
-
176
- ## Adding Tools
177
- While good prompting can often achieve the desired behavior, sometimes custom tools are necessary.
178
-
179
- 1. Create a new file named `agent.system.tool.$TOOL_NAME.md` inside your `prompts/$SUBDIR` directory. This file will contain the prompt for your custom tool.
180
- 2. Open `agent.system.tools.md` and add a reference to your new tool prompt.
181
- 3. If your tool requires specific code or external API calls, create a Python file for it in the `python/tools` directory, implementing the `Tool` base class.
182
-
183
- ## Adding Instruments
184
- To create a new Instrument, follow these steps:
185
- 1. Create a new folder with the name of your instrument (without spaces) inside `instruments/custom`.
186
- 2. Inside this folder, create a `.md` file with the description of the instrument and a `.sh` script (or other executable) with the actual implementation. The `.md` file acts as the interface for the Agent to interact with the Instrument, and the agent will call the `.sh` with the given user arguments. The agent will parse the `.md` file, using the Instrument's name, description, and arguments described in it.
187
- 3. The agent will automatically detect and use your custom instruments.
188
-
189
- ## Adding Extensions
190
- To create a new extension, follow these steps:
191
- 1. Create a new Python file in the appropriate subfolder within the `python/extensions` directory.
192
- 2. Implement the desired functionality within the file, following the existing structure and naming conventions, that implies following the alphabetical order of execution of the extensions in the subfolder.
193
- 3. Your desired extension's name has to start with a number to ensure it is executed before or after an already existing extension based on your needs.
194
- 4. Ensure that the extension is compatible with the main system and does not introduce any conflicts or errors.
195
 
196
  > [!NOTE]
197
- > If you believe your custom tool, instrument or extension could bring value to the community, consider contributing
198
- > it to the main repository by making a pull request. This will make it available for others to use and benefit from your work.
199
  > See [Contributing](contribution.md) for more information.
 
1
  # Architecture Overview
2
+ Agent Zero is built on a flexible and modular architecture designed for extensibility and customization. This section outlines the key components and the interactions between them.
3
 
4
+ ## System Architecture
5
+ This simplified diagram illustrates the hierarchical relationship between agents and their interaction with tools, extensions, instruments, prompts, memory and knowledge base.
 
6
 
7
+ ![Agent Zero Architecture](res/arch-01.svg)
 
8
 
9
+ The user or Agent 0 is at the top of the hierarchy, delegating tasks to subordinate agents, which can further delegate to other agents. Each agent can utilize tools and access the shared assets (prompts, memory, knowledge, extensions and instruments) to perform its tasks.
10
 
11
+ ## Runtime Architecture
12
+ Agent Zero's runtime architecture is built around Docker containers:
13
 
14
+ 1. **Host System**:
15
+ - Requires only Docker and a web browser
16
+ - Runs Docker Desktop or Docker Engine
17
+ - Handles container orchestration
18
 
19
+ 2. **Runtime Container**:
20
+ - Houses the complete Agent Zero framework
21
+ - Manages the Web UI and API endpoints
22
+ - Handles all core functionalities including code execution
23
+ - Provides a standardized environment across all platforms
24
 
25
+ This architecture ensures:
26
+ - Consistent environment across platforms
27
+ - Simplified deployment and updates
28
+ - Enhanced security through containerization
29
+ - Reduced dependency requirements on host systems
30
+ - Flexible deployment options for advanced users
31
 
32
+ > [!NOTE]
33
+ > The legacy approach of running Agent Zero directly on the host system (using Python, Conda, etc.)
34
+ > is still possible but requires Remote Function Calling (RFC) configuration through the Settings
35
+ > page. See [Full Binaries Installation](installation.md#in-depth-guide-for-full-binaries-installation)
36
+ > for detailed instructions.
37
 
38
+ ## Core Components
39
+ Agent Zero's architecture revolves around the following key components:
40
 
41
+ ### 1. Agents
42
+ The core actors within the framework. Agents receive instructions, reason, make decisions, and utilize tools to achieve their objectives. Agents operate within a hierarchical structure, with superior agents delegating tasks to subordinate agents.
43
 
44
+ #### Agent Hierarchy and Communication
45
  Agent Zero employs a hierarchical agent structure, where a top-level agent (often the user) can delegate tasks to subordinate agents. This hierarchy allows for the efficient breakdown of complex tasks into smaller, more manageable sub-tasks.
46
 
47
+ Communication flows between agents through messages, which are structured according to the prompt templates. These messages typically include:
48
 
49
  | Argument | Description |
50
  | --- | --- |
51
+ | `Thoughts:` | The agent's Chain of Thought and planning process |
52
+ | `Tool name:` | The specific tool used by the agent |
53
+ | `Responses or queries:` | Results, feedback or queries from tools or other agents |
54
 
55
+ #### Interaction Flow
56
  A typical interaction flow within Agent Zero might look like this:
57
 
58
  ![Interaction Flow](res/flow-01.svg)
59
 
60
+ 1. The user provides an instruction to Agent 0
61
+ 2. Agent 0 initializes VectorDB and access memory
62
+ 3. Agent 0 analyzes the instruction and formulates a plan using `thoughts` argument, possibly involving the use of tools or the creation of sub-agents
63
+ 4. If necessary, Agent 0 delegates sub-tasks to subordinate agents
64
+ 5. Agents use tools to perform actions, both providing arguments and responses or queries
65
+ 6. Agents communicate results and feedback back up the hierarchy
66
+ 7. Agent 0 provides the final response to the user
67
 
68
+ ### 2. Tools
69
+ Tools are functionalities that agents can leverage. These can include anything from web search and code execution to interacting with APIs or controlling external software. Agent Zero provides a mechanism for defining and integrating both built-in and custom tools.
 
 
 
 
 
 
70
 
71
+ #### Built-in Tools
72
+ Agent Zero comes with a set of built-in tools designed to help agents perform tasks efficiently:
73
 
74
  | Tool | Function |
75
  | --- | --- |
76
+ | call_subordinate | Allows agents to delegate tasks to subordinate agents |
77
+ | code_execution_tool | Allows agents to execute Python, Node.js, and Shell code in the terminal of the Docker container |
78
+ | knowledge_tool | Enables agents to retrieve information from memory, knowledge base or online external sources |
79
+ | response_tool | Allows agents to output a response |
80
+ | memory_tool | Enables agents to save, load, delete and forget information from memory |
81
+ | webpage_content_tool | Enables agents to fetch and analyze the text content of webpages |
82
 
83
+ #### Knowledge Tool
84
+ The `knowledge_tool` uses SearXNG to search the web and retrieve information. It can also search the local knowledge base and memory for relevant information. The tool returns a summary of the information, which can be used by the agent to make decisions or answer questions.
85
 
86
+ ##### SearXNG Integration
87
+ Agent Zero has integrated SearXNG as its primary search tool, replacing the previous knowledge tools (Perplexity and DuckDuckGo). This integration enhances the agent's ability to retrieve information while ensuring user privacy and customization.
88
+
89
+ - Privacy-Focused Search
90
+ SearXNG is an open-source metasearch engine that allows users to search multiple sources without tracking their queries. This integration ensures that user data remains private and secure while accessing a wide range of information.
 
 
 
 
91
 
92
+ - Enhanced Search Capabilities
93
+ The integration provides access to various types of content, including images, videos, and news articles, allowing users to gather comprehensive information on any topic.
94
 
95
+ - Fallback Mechanism
96
+ In cases where SearXNG might not return satisfactory results, Agent Zero can be configured to fall back on other sources or methods, ensuring that users always have access to information.
97
 
98
+ > [!NOTE]
99
+ > The Knowledge Tool is designed to work seamlessly with both online searches through
100
+ > SearXNG and local knowledge base queries, providing a comprehensive information
101
+ > retrieval system.
102
 
103
+ #### Custom Tools
104
+ Users can create custom tools to extend Agent Zero's capabilities. Custom tools can be integrated into the framework by defining a tool specification, which includes the tool's prompt to be placed in `/prompts/$FOLDERNAME/agent.system.tool.$TOOLNAME.md`, as detailed in [Adding Tools](#adding-tools).
 
105
 
106
+ > [!NOTE]
107
+ > Tools are always present in system prompt, so you should keep them to minimum.
108
+ > To save yourself some tokens, use the [Instruments module](#adding-instruments)
109
+ > to call custom scripts or functions.
110
 
111
+ ### 3. Memory System
112
+ The memory system is a critical component of Agent Zero, enabling the agent to learn and adapt from past interactions. It operates on a hybrid model where part of the memory is managed automatically by the framework while users can also manually input and extract information.
113
+
114
+ #### Memory Structure
115
+ The memory is categorized into four distinct areas:
116
+ - **Storage and retrieval** of user-provided information (e.g., names, API keys)
117
+ - **Fragments**: Contains pieces of information from previous conversations, updated automatically
118
+ - **Solutions**: Stores successful solutions from past interactions for future reference
119
+ - **Metadata**: Each memory entry includes metadata (IDs, timestamps), enabling efficient filtering and searching based on specific criteria
120
+
121
+ #### Messages History and Summarization
122
+ Agent Zero implements a sophisticated message history and summarization system that helps maintain context while optimizing memory usage:
123
+
124
+ - **Message Summaries**: Individual messages are summarized using a structured JSON format that captures key information while reducing token usage
125
+ - **Dynamic Compression**: The system employs an intelligent compression strategy:
126
+ - Recent messages remain in their original form for immediate context
127
+ - Older messages are gradually compressed into more concise summaries
128
+ - Multiple compression levels allow for efficient context window usage
129
+ - Original messages are preserved separately from summaries
130
+ - **Dual-Access Memory**: The system maintains two parallel streams of information:
131
+ - Compressed summaries in the context window for quick reference
132
+ - Original messages stored separately for detailed recall when needed
133
+ - **Context Window Optimization**:
134
+ - Acts as a near-infinite short-term memory for single conversations
135
+ - Automatically balances detail level based on message age and importance
136
+ - Maintains searchable indexes for efficient information retrieval
137
+ - Dynamically adjusts compression ratios based on available space
138
+ - **Bulk and Topic Summarization**:
139
+ - Groups related messages into thematic chunks for better organization
140
+ - Generates concise summaries of multiple messages while preserving key context
141
+ - Enables efficient navigation of long conversation histories
142
+ - Maintains semantic connections between related topics
143
+
144
+ ### 4. Prompts
145
+ The `prompts` directory contains various Markdown files that control agent behavior and communication. The most important file is `agent.system.main.md`, which acts as a central hub, referencing other prompt files.
146
+
147
+ #### Core Prompt Files
148
  | Prompt File | Description |
149
  |---|---|
150
+ | agent.system.main.role.md | Defines the agent's overall role and capabilities |
151
+ | agent.system.main.communication.md | Specifies how the agent should communicate |
152
+ | agent.system.main.solving.md | Describes the agent's approach to tasks |
153
+ | agent.system.main.tips.md | Provides additional tips or guidance |
154
+ | agent.system.main.behaviour.md | Controls dynamic behavior adjustments and rules |
155
+ | agent.system.main.environment.md | Defines the runtime environment context |
156
+ | agent.system.tools.md | Organizes and calls the individual tool prompt files |
157
+ | agent.system.tool.*.md | Individual tool prompt files |
158
+
159
+ #### Prompt Organization
160
+ - **Default Prompts**: Located in `prompts/default/`, serve as the base configuration
161
+ - **Custom Prompts**: Can be placed in custom subdirectories (e.g., `prompts/my-custom/`)
162
+ - **Behavior Files**: Stored in memory as `behaviour.md`, containing dynamic rules
163
+ - **Tool Prompts**: Organized in tool-specific files for modularity
164
+
165
+ #### Dynamic Behavior System
166
+ - **Behavior Adjustment**:
167
+ - Agents can modify their behavior in real-time based on user instructions
168
+ - Behavior changes are automatically integrated into the system prompt
169
+ - Behavioral rules are merged intelligently, avoiding duplicates and conflicts
170
+
171
+ - **Behavior Management Components**:
172
+ - `behaviour_adjustment.py`: Core tool for updating agent behavior
173
+ - `_20_behaviour_prompt.py`: Extension that injects behavior rules into system prompt
174
+ - Custom rules stored in the agent's memory directory as `behaviour.md`
175
+
176
+ - **Behavior Update Process**:
177
+ 1. User requests behavior changes (e.g., "respond in UK English")
178
+ 2. System identifies behavioral instructions in conversation
179
+ 3. New rules are merged with existing ruleset
180
+ 4. Updated behavior is immediately applied
181
+
182
+ ![Behavior Adjustment](res/ui-behavior-change-chat.png)
183
+
184
+ - **Integration with System Prompt**:
185
+ - Behavior rules are injected at the start of the system prompt
186
+ - Rules are formatted in a structured markdown format
187
+ - Changes are applied without disrupting other components
188
+ - Maintains separation between core functionality and behavioral rules
189
 
190
  > [!NOTE]
191
+ > You can customize any of these files. Agent Zero will use the files in your custom `prompts_subdir`
192
  > if they exist, otherwise, it will fall back to the files in `prompts/default`.
193
 
194
+ > [!TIP]
195
+ > The behavior system allows for dynamic adjustments without modifying the base prompt files.
196
+ > Changes made through behavior rules persist across sessions while maintaining the core functionality.
197
+
198
+ ### 5. Knowledge
199
+ Knowledge refers to the user-provided information and data that agents can leverage:
200
+
201
+ - **Custom Knowledge**: Add files to `/knowledge/custom/main` directory manually or through the "Import Knowledge" button in the UI
202
+ - Supported formats: `.txt`, `.pdf`, `.csv`, `.html`, `.json`, `.md`
203
+ - Automatically imported and indexed
204
+ - Expandable format support
205
+
206
+ - **Knowledge Base**:
207
+ - Can include PDFs, databases, books, documentation
208
+ - `/docs` folder automatically added
209
+ - Used for answering questions and decision-making
210
+ - Supports RAG-augmented tasks
211
+
212
+ ### 6. Instruments
213
+ Instruments provide a way to add custom functionalities to Agent Zero without adding to the token count of the system prompt:
214
+ - Stored in long-term memory of Agent Zero
215
+ - Unlimited number of instruments available
216
+ - Recalled when needed by the agent
217
+ - Can modify agent behavior by introducing new procedures
218
+ - Function calls or scripts to integrate with other systems
219
+ - Scripts are run inside the Docker Container
220
+ - Implementation details in [Adding Instruments](#adding-instruments)
221
+
222
+ ### 7. Extensions
223
+ Extensions are a powerful feature of Agent Zero, designed to keep the main codebase clean and organized while allowing for greater flexibility and modularity.
224
+
225
+ #### Structure
226
+ Extensions can be found in `python/extensions` directory:
227
+ - **Folder Organization**: Extensions are stored in designated subfolders corresponding to different aspects of the agent's message loop
228
+ - **Execution Order**: Files are executed in alphabetical order for predictable behavior
229
+ - **Naming Convention**: Files start with numbers to control execution order
230
+ - **Modularity**: Each extension focuses on a specific functionality
231
+
232
+ #### Types
233
+ - **Message Loop Prompts**: Handle system messages and history construction
234
+ - **Memory Management**: Handle recall and solution memorization
235
+ - **Custom Extensions**: Add new functionalities (see [Adding Extensions](#adding-extensions))
236
+ - **Behavior Management**: Handle dynamic behavior adjustments
237
+ - **System Integration**: Manage interaction with external systems
238
+
239
+ ## Implementation Details
240
+
241
+ ### Directory Structure
242
  | Directory | Description |
243
  | --- | --- |
244
+ | `/docker` | Docker-related files for runtime container |
245
+ | `/docs` | Documentation files and guides |
246
+ | `/instruments` | Custom scripts and tools for runtime environment |
247
+ | `/knowledge` | Knowledge base storage |
248
+ | `/logs` | HTML CLI-style chat logs |
249
+ | `/memory` | Persistent agent memory storage |
250
+ | `/prompts` | System and tool prompts |
251
+ | `/python` | Core Python codebase: |
252
+ |   `/api` | API endpoints and interfaces |
253
+ |   `/extensions` | Modular extensions |
254
+ |   `/helpers` | Utility functions |
255
+ |   `/tools` | Tool implementations |
256
+ | `/tmp` | Temporary runtime data |
257
+ | `/webui` | Web interface components: |
258
+ |   `/css` | Stylesheets |
259
+ |   `/js` | JavaScript modules |
260
+ |   `/public` | Static assets |
261
+ | `/work_dir` | Working directory |
262
+
263
+ ### Key Files
264
+ | File | Description |
265
+ | --- | --- |
266
+ | `.env` | Environment configuration |
267
+ | `agent.py` | Core agent implementation |
268
+ | `example.env` | Configuration template |
269
+ | `initialize.py` | Framework initialization |
270
+ | `models.py` | Model providers and configs |
271
+ | `preload.py` | Pre-initialization routines |
272
+ | `prepare.py` | Environment preparation |
273
+ | `requirements.txt` | Python dependencies |
274
+ | `run_cli.py` | CLI launcher |
275
+ | `run_ui.py` | Web UI launcher |
276
+
277
+ > [!NOTE]
278
+ > When using the Docker runtime container, these directories are mounted
279
+ > within the `/a0` volume for data persistence until the container is restarted or deleted.
280
+
281
+ ## Customization
282
  Agent Zero's strength lies in its flexibility. This section details how to customize various aspects of the framework, tailoring it to your specific needs and preferences.
283
 
284
+ ### AgentConfig
285
+ The `AgentConfig` class in `initialize.py` provides various customization options:
286
+
287
+ - `prompts_subdir`: Specifies the directory containing your custom prompts
288
+ - `knowledge_subdirs`: Defines the directories where Agent Zero searches for knowledge files
289
+ - **Rate Limiting:** Control API usage with `rate_limit_seconds` and `rate_limit_requests`
290
+ - **Docker and SSH:** Configure execution environment settings
291
+
292
+ ### Adding Custom Components
293
+
294
+ #### Custom Prompts
295
+ 1. Create directory in `prompts/` (e.g., `my-custom-prompts`)
296
+ 2. Copy and modify needed files from `prompts/default/`
297
+ 3. Agent Zero will merge your custom files with the default ones
298
+ 4. Select your custom prompts in the Settings page
299
+
300
+ #### Adding Instruments
301
+ 1. Create folder in `instruments/custom` (no spaces in name)
302
+ 2. Add `.md` description file for the interface
303
+ 3. Add `.sh` script (or other executable) for implementation
304
+ 4. The agent will automatically detect and use the instrument
305
+
306
+ #### Adding Tools
307
+ 1. Create `agent.system.tool.$TOOL_NAME.md` in `prompts/$SUBDIR`
308
+ 2. Add reference in `agent.system.tools.md`
309
+ 3. If needed, implement tool class in `python/tools` using `Tool` base class
310
+ 4. Follow existing patterns for consistency
311
+
312
+ #### Adding Extensions
313
+ 1. Create Python file in appropriate `python/extensions` subfolder
314
+ 2. Follow naming convention for execution order (start with number)
315
+ 3. Implement functionality following existing patterns
316
+ 4. Ensure compatibility with main system
317
+ 5. Test thoroughly before deployment
 
 
 
 
 
 
318
 
319
  > [!NOTE]
320
+ > Consider contributing valuable custom components to the main repository.
 
321
  > See [Contributing](contribution.md) for more information.
docs/contribution.md CHANGED
@@ -11,7 +11,6 @@ Contributions to improve Agent Zero are very welcome! This guide outlines how t
11
  ## Making Changes
12
 
13
  * **Code Style:** Follow the existing code style. Agent Zero generally follows PEP 8 conventions.
14
- * **Testing:** Write unit tests for new features. Agent Zero uses the `pytest` framework. Ensure your changes pass all existing and new tests.
15
  * **Documentation:** Update the documentation if your changes affect user-facing functionality. The documentation is written in Markdown.
16
  * **Commit Messages:** Write clear and concise commit messages that explain the purpose of your changes.
17
 
@@ -19,8 +18,7 @@ Contributions to improve Agent Zero are very welcome! This guide outlines how t
19
 
20
  1. **Push Your Branch:** Push your branch to your forked repository on GitHub.
21
  2. **Create a Pull Request:** Create a pull request from your branch to the appropriate branch in the main Agent Zero repository.
22
- * **For new features, refactoring, or significant changes:** Target the `testing` branch.
23
- * **For bug fixes and patches:** Target the `development` branch.
24
  3. **Provide Details:** In your pull request description, clearly explain the purpose and scope of your changes. Include relevant context, test results, and any other information that might be helpful for reviewers.
25
  4. **Address Feedback:** Be responsive to feedback from the community. We love changes, but we also love to discuss them!
26
 
 
11
  ## Making Changes
12
 
13
  * **Code Style:** Follow the existing code style. Agent Zero generally follows PEP 8 conventions.
 
14
  * **Documentation:** Update the documentation if your changes affect user-facing functionality. The documentation is written in Markdown.
15
  * **Commit Messages:** Write clear and concise commit messages that explain the purpose of your changes.
16
 
 
18
 
19
  1. **Push Your Branch:** Push your branch to your forked repository on GitHub.
20
  2. **Create a Pull Request:** Create a pull request from your branch to the appropriate branch in the main Agent Zero repository.
21
+ * Target the `development` branch.
 
22
  3. **Provide Details:** In your pull request description, clearly explain the purpose and scope of your changes. Include relevant context, test results, and any other information that might be helpful for reviewers.
23
  4. **Address Feedback:** Be responsive to feedback from the community. We love changes, but we also love to discuss them!
24
 
docs/installation.md CHANGED
@@ -1,121 +1,40 @@
1
- # Installation guide for Windows, macOS and Linux
2
 
3
- [![Video](res/setup/thumb_play.png)](https://youtu.be/8H7mFsvxKYQ)
4
-
5
- The following guide provides both quick start instructions for the full installation of Agent Zero on various operating systems and in-depth guides for Windows and macOS with screenshots.
6
-
7
- ## You were looking for this? [How to update Agent Zero](#how-to-update-agent-zero)
8
-
9
- <details>
10
- <summary><h2>Windows Quick Start</h2></summary>
11
-
12
- 1. **Install Anaconda or Miniconda:** Download and install the appropriate version for your system from [here](https://docs.anaconda.com/anaconda/install/). Miniconda is recommended for a minimal installation.
13
- 2. **Create an Environment:** Open Anaconda Navigator (or use the `conda` command), create an environment named `agent-zero`, and select Python 3.12.
14
- 3. **Install Docker Desktop:** Download and install Docker Desktop from [here](https://www.docker.com/products/docker-desktop/).
15
- 4. **Download Agent Zero:** Download the latest release zip from the [GitHub releases page](https://github.com/frdel/agent-zero/releases) and extract it.
16
- 5. **Configure API Keys:** Duplicate `example.env`, rename it to `.env`, and add your API keys.
17
- 6. **Install Requirements:** Activate your `agent-zero` environment, open a terminal in the Agent Zero directory, and run: `pip install -r requirements.txt`
18
- 7. **Run Agent Zero (Web UI):** Execute `python run_ui.py` in your terminal.
19
- 8. **Access the Web UI:** Open the URL displayed in your browser.
20
-
21
- </details>
22
-
23
- <details>
24
- <summary><h2>macOS Quick Start</h2></summary>
25
-
26
- 1. **Install Miniconda:** Download the pkg installer from [here](https://docs.anaconda.com/miniconda/#miniconda-latest-installer-links) and follow the instructions.
27
- 2. **Install Docker Desktop:** Download the dmg image from [here](https://www.docker.com/products/docker-desktop/), drag the Docker application to your Applications folder, and create a Docker Hub account.
28
- 3. **Download Agent Zero:** Download the latest release zip from the [GitHub releases page](https://github.com/frdel/agent-zero/releases) and extract it.
29
- 4. **Open Terminal:** Navigate to the Agent Zero directory.
30
- 5. **Create Conda Environment:** Run: `conda create -n a0 python=3.12 -y`
31
- 6. **Activate Environment:** Run: `conda activate a0`
32
- 7. **Install Requirements:** Run: `pip install -r requirements.txt`
33
- 8. **Configure API Keys:** Create a `.env` file and add your keys.
34
- 9. **Run Agent Zero (Web UI):** Run: `python run_ui.py`
35
- 10. **Access the Web UI:** Open the displayed URL.
36
-
37
- > [!IMPORTANT]
38
- > **Important macOS Docker Configuration:** In Docker Desktop's preferences (Docker
39
- > menu) go to Settings, navigate to "Advanced" and check "Allow the default Docker
40
- > socket to be used (requires password)." This allows Agent Zero to communicate
41
- > with the Docker daemon.
42
-
43
- ![docker socket macOS](res/setup/macsocket.png)
44
-
45
- </details>
46
-
47
- <details>
48
- <summary><h2>Linux Quick Start</h1></summary>
49
-
50
- 1. **Install Python and Pip:** Use your distribution's package manager (e.g., `apt`, `yum`, `dnf`) to install Python 3.12 or higher and pip. On Debian/Ubuntu systems, you would typically use:
51
- ```bash
52
- sudo apt-get update
53
- sudo apt-get install python3.12 python3-pip
54
- ```
55
- 2. **Install Miniconda:** Download the appropriate installer for your Linux distribution from [here](https://docs.anaconda.com/miniconda/#miniconda-latest-installer-links) and follow the instructions.
56
- 3. **Install Docker:** Install Docker Desktop or Docker CE using your distribution's package manager. Make sure the Docker service is running: `sudo systemctl start docker`
57
- 4. **Download Agent Zero:** Download the latest release zip from the [GitHub releases page](https://github.com/frdel/agent-zero/releases) and extract it.
58
- 5. **Open Terminal and Navigate:** Open your terminal and navigate to the extracted Agent Zero folder using the `cd` command.
59
- 6. **Create and Activate Conda Environment:**
60
- ```bash
61
- conda create -n a0 python=3.12 -y
62
- conda activate a0
63
- ```
64
- 7. **Install Requirements:** `pip install -r requirements.txt`
65
- 8. **Configure API Keys:** Create a `.env` file in the project root and add your API keys. You can copy the `example.env` file and rename it to `.env`.
66
- 9. **Run Agent Zero (Web UI):** `python run_ui.py`
67
- 10. **Access the Web UI:** Open the URL displayed in your terminal.
68
-
69
- </details>
70
-
71
- # In-Depth Guide for Windows and macOS
72
- - Agent Zero is not an app. It's a framework. It's made to be customized, edited, enhanced. Therefore you need to install the necessary components to run it.
73
- - The following step by step instructions can be followed along with a video for this tutorial on how to make Agent Zero work on Windows and macOS that you find in the [top section](#installation-guide-for-windows-macos-and-linux) of the page.
74
-
75
- ## Reminders:
76
- 1. There's no need to install Python, Conda will manage that for you.
77
- 2. You don't necessarily need API keys: Agent Zero can run with local models. For this tutorial though, we will leave it to the default OpenAI API. A simple video explanation for running Free and Local models is available [in this video](https://www.youtube.com/watch?v=sLMhLRHDIPY&t=80s).
78
- 3. Visual Studio Code or any other code editor is not mandatory, but it makes it easier to navigate and edit files.
79
- 4. Docker is not mandatory, but running Agent Zero without Docker is actually more complicated and can be very dangerous, so we will be covering the easier and recommended way - using Docker Desktop application.
80
- 5. Git/GitHub is not mandatory, you can download the framework files through your browser. We will not be showing how to use Git in this tutorial.
81
-
82
- ## 1. Install Conda (miniconda)
83
- - Conda is a python environment manager, it will help you keep your projects and installations separated. Full Conda has many more features, but you only need "miniconda".
84
 
85
- 1. Go to the download page of miniconda [here](https://docs.anaconda.com/miniconda/#miniconda-latest-installer-links). If the link does not work, just search the web for "miniconda download".
86
- 2. Based on your operating system, download the right installer of miniconda. For macOS select the version with "pkg" at the end.
87
 
88
- <img src="res/setup/image-1.png" alt="miniconda download win" width="500"/>
89
- <img src="res/setup/image-5.png" alt="miniconda download macos" width="500"/>
90
- <br><br>
91
-
92
- 3. Run the installer and go through the installation process, here you can leave everything to default and just click Next, Next... The same goes for macOS with the "pkg" graphical installer.
93
-
94
- <img src="res/setup/image.png" alt="miniconda install" width="200"/>
95
- <img src="res/setup/image-2.png" alt="miniconda install" width="200"/>
96
- <img src="res/setup/image-3.png" alt="miniconda install" width="200"/>
97
- <img src="res/setup/image-4.png" alt="miniconda install" width="200"/>
98
- <br><br>
99
 
100
- 4. After the installation is complete, you should have "Anaconda Powershell Prompt" installed on your Windows machine. On macOS, when you open the Terminal application in your Applications folder and type "conda --version", you should see the version installed.
101
 
102
- <img src="res/setup/image-6.png" alt="miniconda installed" height="100"/>
103
- <img src="res/setup/image-7.png" alt="miniconda installed" height="100"/>
104
- <br><br>
 
105
 
106
- ## 2. Install Docker (Docker Desktop application)
107
- - Simply put, Docker is a way of running virtual computers on your machine. These are lightweight, disposable and isolated from your operating system, so it is a way to sandbox Agent Zero.
108
- - Agent Zero only connects to the Docker container when it needs to execute code and commands. The frameworks itself runs on your machine.
109
- - Running Agent Zero without Docker is possible, but more complicated and dangerous, I will not be covering that in this tutorial.
110
- - Docker has a desktop application with GUI for all major operating system, so I will be using that.
111
 
112
- 1. Go to the download page of Docker Desktop [here](https://www.docker.com/products/docker-desktop/). If the link does not work, just search the web for "docker desktop download".
113
- 2. Download the version for your operating system. Don't be tricked by the seemingly missing windows intel/amd version, it's the button itself, not in the dropdown menu.
114
 
115
  <img src="res/setup/image-8.png" alt="docker download" width="200"/>
116
  <br><br>
117
 
118
- 3. Run the installer and go through the installation process. It should be even shorter than Conda installation, you can leave everything to default. On macOS, the installer is a "dmg" image, so just drag and drop the application to your Applications folder like always.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
 
120
  <img src="res/setup/image-9.png" alt="docker install" width="300"/>
121
  <img src="res/setup/image-10.png" alt="docker install" width="300"/>
@@ -123,112 +42,151 @@ The following guide provides both quick start instructions for the full installa
123
  <img src="res/setup/image-12.png" alt="docker install" width="300"/>
124
  <br><br>
125
 
126
-
127
- 4. Once installed, you should see Docker Desktop application on your Windows/Mac machine.
128
 
129
  <img src="res/setup/image-11.png" alt="docker installed" height="100"/>
130
  <img src="res/setup/image-13.png" alt="docker installed" height="100"/>
131
  <br><br>
132
 
133
- 5. Create account in the application.
134
- No need to create images or containers, the framework will do that for you. However, this requires you to be signed in to the Docker Hub, so create a free account in the Docker Desktop application, you will be prompted when the application first runs.
135
 
136
  > [!IMPORTANT]
137
- > **Important macOS-only Docker Configuration:** In Docker Desktop's preferences
138
- > (Docker menu) go to Settings, navigate to "Advanced" and check "Allow the default
139
- > Docker socket to be used (requires password)." This allows Agent Zero to
140
- > communicate with the Docker daemon.
141
 
142
  ![docker socket macOS](res/setup/macsocket.png)
143
 
144
- ## 3. Download Agent Zero
145
- - You can clone the Agent Zero repository (https://github.com/frdel/agent-zero) from GitHub if you know how to use Git. In this tutorial I will just show how to download the files.
146
 
147
- 1. Go to the Agent Zero releases [here](https://github.com/frdel/agent-zero/releases).
148
- 2. The latest release is on the top of the list, click the "Source Code (zip)" button under "Assets" to download it.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
 
150
- <img src="res/setup/image-14.png" alt="agent zero download" width="500"/>
151
- <br><br>
 
 
 
 
 
 
152
 
153
- 3. Extract the downloaded archive where you want to have it. I will extract them to "agent-zero" folder on my Desktop - "C:\Users\frdel\Desktop\agent-zero" on Windows and "/Users/frdel/Desktop/agent-zero" on macOS.
154
 
 
 
155
 
156
- ## 4. Set up Conda environment
157
- - Now that we have the project files and Conda, we can create **virtual Python environment** for this project, activate it and install requirements.
158
 
159
- 1. Open your **"Anaconda Powershell Prompt"** application on windows or **"Terminal"** application on macOS.
160
- 2. In the terminal, navigate to your Agent Zero folder using **"cd"** command. Replace the path with your actual Agent Zero folder path.
161
- ~~~
162
- cd C:\Users\frdel\Desktop\agent-zero
163
- ~~~
164
- You should see your folder has changed on the next terminal line.
 
165
 
166
- <img src="res/setup/image-15.png" alt="agent zero cd" height="100"/>
167
- <img src="res/setup/image-16.png" alt="agent zero cd" height="100"/>
168
- <br><br>
169
 
170
- 3. Create Conda environment using command **"conda create"**. After **"-n"** is your environment name, you can choose your own, i will use **"a0"** - short for Agent Zero. After **"python"** is the Python version that Conda will install for you into this environment, right now, 3.12 works fine. **-y** skips confirmations.
171
- ~~~
172
- conda create -n a0 python=3.12 -y
173
- ~~~
174
 
175
- 4. Once done, activate the new environment for this terminal window by another command:
176
- ~~~
177
- conda activate a0
178
- ~~~
179
- And you should see that the **(base)** on the left has changed to **(a0)**. This means that this terminal now uses the new **a0** virtual environment and all packages will be installed into this environment.
180
 
181
- <img src="res/setup/image-17.png" alt="conda env" height="200"/>
182
- <img src="res/setup/image-18.png" alt="conda env" height="200"/>
183
- <br><br>
184
 
185
- > [!IMPORTANT]
186
- > If you open a new terminal window, you will need to activate the environment with
187
- > "conda activate a0" again for that window.
188
 
189
- 5. Install requirements using **"pip"**. Pip is a Python package manager. We can install all required packages from requirements.txt file using command:
190
- ~~~
191
- pip install -r requirements.txt
192
- ~~~
193
- This might take some time. If you get any errors regarding version conflicts and compatibility, double check that your environment is activated and that you created that environment with the correct Python version.
194
 
195
- <img src="res/setup/image-19.png" alt="conda reqs" height="200"/>
196
- <br><br>
197
 
198
- ## 5. Configure Agent Zero
199
- - Now we can configure Agent Zero - select models, settings, API Keys etc.
200
- - I will leave the default configuration using OpenAI API and I will just provide my OpenAI API key in the **.env** file.
201
 
202
- 1. Find the **"example.env"** file in your Agent Zero folder and edit the contents. I will put my OpenAI API key after **"API_KEY_OPENAI="**. If you have API keys for other service providers, add them as needed.
203
- 2. Rename the **"example.env"** file to **".env"**. This is important, only this exact "**.env**" file name is valid.
 
 
204
 
205
- <img src="res/setup/image-20.png" alt="conda reqs" height="200"/>
206
- <br><br>
207
 
208
- 3. (Optional) Change models or setting in **"initialize.py"** file if needed as detailed [here](#choosing-your-llms).
 
 
 
 
 
209
 
210
- ## 6. Run Agent Zero
211
- - Setup done. It's time to test Agent Zero. Let's double check:
212
 
213
- 1. Make sure you have the **"a0"** Conda environment still active in your current terminal window. You can see that on the left of each terminal line like **(a0)** or **(base)**. If not, activate again with **"conda activate a0"** command again.
214
- 2. Make sure your terminal is looking into the Agent Zero folder. If not, navigate to it with **"cd"** command again with your path.
215
- 3. Run the **Docker Desktop application** you installed and just leave it running in the background. No need to create images or containers, the framework will do that for you. However, this requires you to be signed in to the Docker Hub, so sign in in the Docker Desktop application, if you haven't already.
216
- 4. Run the Agent Zero with Web UI:
217
- ~~~
218
- python run_ui.py
219
- ~~~
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
 
221
- <img src="res/setup/image-21.png" alt="run ui" height="110"/>
222
- <br><br>
223
 
224
- 5. Open the URL shown in terminal in your web browser. You should see the Agent Zero interface. The first time it needs to execute code, Docker image will be downloaded and deployed, this might take some time. Be patient when seeing "Initializing docker container agent-zero-exe for safe code execution...".
 
 
 
225
 
226
- <img src="res/setup/image-22-1.png" alt="run ui" width="400"/>
227
- <img src="res/setup/image-23-1.png" alt="run ui" width="400"/>
228
- <br><br>
229
 
230
  # Choosing Your LLMs
231
- The `initialize.py` file is the control center for selecting the Large Language Models (LLMs) that power Agent Zero. You can choose different LLMs for different roles:
232
 
233
  | LLM Role | Description |
234
  | --- | --- |
@@ -237,13 +195,9 @@ The `initialize.py` file is the control center for selecting the Large Language
237
  | `embedding_llm` | This LLM is responsible for generating embeddings used for memory retrieval and knowledge base lookups. Changing the `embedding_llm` will re-index all of A0's memory. |
238
 
239
  **How to Change:**
240
- 1. Open `initialize.py`.
241
- 2. Locate the lines where these LLMs are initialized (at the beginning of the file).
242
- 3. Uncomment the line for the provider and model you want to use, and comment out the others. For example, to use `gpt-4o-mini` for chat:
243
- ```python
244
- chat_llm = models.get_openai_chat(model_name="gpt-4o-mini", temperature=0)
245
- ```
246
- 4. Ensure only one model is uncommented for each LLM role.
247
 
248
  ## Important Considerations
249
 
@@ -252,8 +206,6 @@ The `initialize.py` file is the control center for selecting the Large Language
252
  > requires clearing the `memory` folder to avoid errors, as the embeddings can't be
253
  > mixed in the vector database. Note that this will DELETE ALL of Agent Zero's memory.
254
 
255
- - Experiment with different model combinations to find the balance of performance and cost that best suits your needs. E.g., faster and lower latency LLMs will help, and you can also use `faiss_gpu` instead of `faiss_cpu` for the memory.
256
-
257
  ## Installing and Using Ollama (Local Models)
258
  If you're interested in Ollama, which is a powerful tool that allows you to run various large language models locally, here's how to install and use it:
259
 
@@ -284,7 +236,20 @@ Visit the [Ollama model library](https://ollama.com/library) for a list of avail
284
  ollama pull <model-name>
285
  ```
286
 
287
- Replace `<model-name>` with the name of the model you want to use. For example, to pull the Mistral Large model, you would use the command `ollama pull mistral-large`.
 
 
 
 
 
 
 
 
 
 
 
 
 
288
 
289
  #### Managing your downloaded models
290
  Once you've downloaded some models, you might want to check which ones you have available or remove any you no longer need.
@@ -300,35 +265,293 @@ Once you've downloaded some models, you might want to check which ones you have
300
  ollama rm <model-name>
301
  ```
302
 
303
- # How to update Agent Zero
304
- To update Agent Zero to the latest version, follow these steps:
305
- - **Using Git/GitHub:** Pull the latest version of the Agent Zero repository with Git/GitHub. The custom knowledge, solutions, memory, and other data will get ignored by Git, so you don't need to worry about losing any of your custom data. The same goes for your .env file with all of your API keys.
306
- - **Backup LLM choices**: Before updating, make sure to save your customizations you've made to the first part of `def_initialize` function in the `initialize.py` file to choose your LLMs (highlighted section in below figure). This is important because the update process will overwrite these files with the default versions from the repository and can save you time rewriting all your LLMs choices.
307
 
308
- ![Update initialize.py](res/setup/update-initialize.png)
309
 
310
- Beware of indentations when pasting the model selection code back into the `initialize.py` file after the update.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
311
 
312
- - **Manual Update:** Alternatively, you can manually download the latest version of Agent Zero from the [releases page](https://github.com/frdel/agent-zero/releases). The only folders that you must save to retain custom data are the following: `/memory`, `/knowledge`. If you have created custom `instruments` or `prompts` you must save their dirs as well.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
 
314
  > [!IMPORTANT]
315
- > If you update manually, beware: save your .env file with the API keys, and look
316
- > for new dependencies in requirements.txt. If any changes are made in the updated
317
- > version, you have to execute this command inside the a0 conda env after activating it:
318
-
319
- pip install -r requirements.txt
 
 
320
 
321
- # How to create executable files for Agent Zero in Windows, macOS and Linux
322
- Two scripts allows you to easily create executable files for Windows, macOS and Linux, including all the necessary dependencies to run Agent Zero without the need for Python, Conda, or additional steps:
323
- 1. **Navigate to Bundle folder:** Navigate to /agent-zero/bundle.
324
- 2. **Run the script:** Run the bundling of Agent Zero by running `macos_bundle.sh` (macOS and Linux) or `windows_bundle.bat` (Windows) in your terminal window. The process usually takes about 2 to 5 minutes depending on the platform.
325
- 3. **Edit your Files:** Now you can configure API keys and edit `initialize.py` for [Choosing Your LLMs](#choosing-your-llms).
326
- 4. **Run Agent Zero:** Run Agent Zero by running the .exe file just created (Windows), or by running `./agent-zero` in your terminal window.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
327
 
328
- > [!WARNING]
329
- > The 2 scripts will create executable files valid only for the machine where they
330
- > are run. If you want to run Agent Zero on another machine, you will need to run
331
- > the scripts on that machine as well to have executable files.
332
 
333
  ### Conclusion
334
- After following the instructions for your specific operating system, you should have Agent Zero successfully installed and running. You can now start exploring the framework's capabilities and experimenting with creating your own intelligent agents. If you encounter any issues during the installation process, please consult the Troubleshooting section of this documentation or refer to the Agent Zero community for assistance.
 
 
 
 
1
+ # Users installation guide for Windows, macOS and Linux
2
 
3
+ [![Setup Guide](res/setup/thumb_setup.png)](https://www.youtube.com/watch?v=wWAqJpl3uQE)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
+ The following user guide provides instructions for installing and running Agent Zero using Docker, which is the primary runtime environment for the framework. For developers and contributors, we also provide instructions for setting up the [full development environment](#in-depth-guide-for-full-binaries-installation).
 
6
 
7
+ ### Maybe you're looking for this? 👉[How to update Agent Zero](#how-to-update-agent-zero)
 
 
 
 
 
 
 
 
 
 
8
 
9
+ ## Windows, macOS and Linux Setup Guide
10
 
11
+ 1. **Install Docker Desktop:**
12
+ - Docker Desktop provides the runtime environment for Agent Zero, ensuring consistent behavior and security across platforms
13
+ - The entire framework runs within a Docker container, providing isolation and easy deployment
14
+ - Available as a user-friendly GUI application for all major operating systems
15
 
16
+ 1.1. Go to the download page of Docker Desktop [here](https://www.docker.com/products/docker-desktop/). If the link does not work, just search the web for "docker desktop download".
 
 
 
 
17
 
18
+ 1.2. Download the version for your operating system. For Windows users, the Intel/AMD version is the main download button.
 
19
 
20
  <img src="res/setup/image-8.png" alt="docker download" width="200"/>
21
  <br><br>
22
 
23
+ > [!NOTE]
24
+ > **Linux Users:** You can install either Docker Desktop or docker-ce (Community Edition).
25
+ > For Docker Desktop, follow the instructions for your specific Linux distribution [here](https://docs.docker.com/desktop/install/linux-install/).
26
+ > For docker-ce, follow the instructions [here](https://docs.docker.com/engine/install/).
27
+ >
28
+ > If you're using docker-ce, you'll need to add your user to the `docker` group:
29
+ > ```bash
30
+ > sudo usermod -aG docker $USER
31
+ > ```
32
+ > Log out and back in, then run:
33
+ > ```bash
34
+ > docker login
35
+ > ```
36
+
37
+ 1.3. Run the installer with default settings. On macOS, drag and drop the application to your Applications folder.
38
 
39
  <img src="res/setup/image-9.png" alt="docker install" width="300"/>
40
  <img src="res/setup/image-10.png" alt="docker install" width="300"/>
 
42
  <img src="res/setup/image-12.png" alt="docker install" width="300"/>
43
  <br><br>
44
 
45
+ 1.4. Once installed, launch Docker Desktop:
 
46
 
47
  <img src="res/setup/image-11.png" alt="docker installed" height="100"/>
48
  <img src="res/setup/image-13.png" alt="docker installed" height="100"/>
49
  <br><br>
50
 
51
+ 1.5. Create a Docker Hub account when prompted and sign in. This is required to pull the Agent Zero container image.
 
52
 
53
  > [!IMPORTANT]
54
+ > **macOS Configuration:** In Docker Desktop's preferences (Docker menu) → Settings →
55
+ > Advanced, enable "Allow the default Docker socket to be used (requires password)."
 
 
56
 
57
  ![docker socket macOS](res/setup/macsocket.png)
58
 
59
+ 2. **Run Agent Zero:**
 
60
 
61
+ 2.1. Pull the Agent Zero Docker image:
62
+ - Search for `frdel/agent-zero-run` in Docker Desktop
63
+ - Click the `Pull` button
64
+ - The image will be downloaded to your machine in a few minutes
65
+
66
+ ![docker pull](res/setup/1-docker-image-search.png)
67
+
68
+ > [!TIP]
69
+ > Alternatively, run the following command in your terminal:
70
+ >
71
+ > ```bash
72
+ > docker pull frdel/agent-zero-run
73
+ > ```
74
+
75
+ 2.2. Create a data directory for persistence:
76
+ - Choose or create a directory on your machine where you want to store Agent Zero's data
77
+ - This can be any location you prefer (e.g., `C:/agent-zero-data` or `/home/user/agent-zero-data`)
78
+ - This directory will contain all your Agent Zero files, like the legacy root folder structure:
79
+ - `/memory` - Agent's memory and learned information
80
+ - `/knowledge` - Knowledge base
81
+ - `/instruments` - Instruments and functions
82
+ - `/prompts` - Prompt files
83
+ - `/work_dir` - Working directory
84
+ - `.env` - Your API keys
85
+ - `settings.json` - Your Agent Zero settings
86
+
87
+ > [!TIP]
88
+ > Choose a location that's easy to access and backup. All your Agent Zero data
89
+ > will be directly accessible in this directory.
90
 
91
+ 2.3. Run the container:
92
+ - In Docker Desktop, go back to the "Images" tab
93
+ - Click the `Run` button next to the `frdel/agent-zero-run` image
94
+ - Open the "Optional settings" menu
95
+ - Set the port to `0` in the second "Host port" field (for automatic port assignment)
96
+ - Under "Volumes", configure:
97
+ - Host path: Your chosen directory (e.g., `C:\agent-zero-data`)
98
+ - Container path: `/a0`
99
 
100
+ ![docker port mapping](res/setup/3-docker-port-mapping.png)
101
 
102
+ - Click the `Run` button in the "Images" tab.
103
+ - The container will start and show in the "Containers" tab
104
 
105
+ ![docker containers](res/setup/4-docker-container-started.png)
 
106
 
107
+ > [!TIP]
108
+ > Alternatively, run the following command in your terminal:
109
+ > ```bash
110
+ > docker run -p $PORT:80 -v /path/to/your/data:/a0 frdel/agent-zero-run
111
+ > ```
112
+ > - Replace `$PORT` with the port you want to use (e.g., `50080`)
113
+ > - Replace `/path/to/your/data` with your chosen directory path
114
 
115
+ 2.4. Access the Web UI:
116
+ - The framework will take a few seconds to initialize and the Docker logs will look like the image below.
117
+ - Find the mapped port in Docker Desktop (shown as `<PORT>:80`) or click the port right under the container ID as shown in the image below
118
 
119
+ ![docker logs](res/setup/5-docker-click-to-open.png)
 
 
 
120
 
121
+ - Open `http://localhost:<PORT>` in your browser
122
+ - The Web UI will open. Agent Zero is ready for configuration!
 
 
 
123
 
124
+ ![docker ui](res/setup/6-docker-a0-running.png)
 
 
125
 
126
+ > [!TIP]
127
+ > You can also access the Web UI by clicking the ports right under the container ID in Docker Desktop.
 
128
 
129
+ > [!NOTE]
130
+ > After starting the container, you'll find all Agent Zero files in your chosen
131
+ > directory. You can access and edit these files directly on your machine, and
132
+ > the changes will be immediately reflected in the running container.
 
133
 
134
+ 3. Configure Agent Zero
135
+ - Refer to the following sections for a full guide on how to configure Agent Zero.
136
 
137
+ ## Settings Configuration
138
+ Agent Zero provides a comprehensive settings interface to customize various aspects of its functionality. Access the settings by clicking the "Settings"button with a gear icon in the sidebar.
 
139
 
140
+ ### Agent Configuration
141
+ - **Prompts Subdirectory:** Choose the subdirectory within `/prompts` for agent behavior customization. The 'default' directory contains the standard prompts.
142
+ - **Memory Subdirectory:** Select the subdirectory for agent memory storage, allowing separation between different instances.
143
+ - **Knowledge Subdirectory:** Specify the location of custom knowledge files to enhance the agent's understanding.
144
 
145
+ ![settings](res/setup/settings/1-agentConfig.png)
 
146
 
147
+ ### Chat Model Settings
148
+ - **Provider:** Select the chat model provider (e.g., Ollama)
149
+ - **Model Name:** Choose the specific model (e.g., llama3.2)
150
+ - **Temperature:** Adjust response randomness (0 for deterministic, higher values for more creative responses)
151
+ - **Context Length:** Set the maximum token limit for context window
152
+ - **Context Window Space:** Configure how much of the context window is dedicated to chat history
153
 
154
+ ![chat model settings](res/setup/settings/2-chat-model.png)
 
155
 
156
+ ### Utility Model Configuration
157
+ - **Provider & Model:** Select a smaller, faster model for utility tasks like memory organization and summarization
158
+ - **Temperature:** Adjust the determinism of utility responses
159
+
160
+ ### Embedding Model Settings
161
+ - **Provider:** Choose the embedding model provider (e.g., OpenAI)
162
+ - **Model Name:** Select the specific embedding model (e.g., text-embedding-3-small)
163
+
164
+ ### Speech to Text Options
165
+ - **Model Size:** Choose the speech recognition model size
166
+ - **Language Code:** Set the primary language for voice recognition
167
+ - **Silence Settings:** Configure silence threshold, duration, and timeout parameters for voice input
168
+
169
+ ### API Keys
170
+ - Configure API keys for various service providers directly within the Web UI
171
+ - Click `Save` to confirm your settings
172
+
173
+ ### Authentication
174
+ - **UI Login:** Set username for web interface access
175
+ - **UI Password:** Configure password for web interface security
176
+ - **Root Password:** Manage Docker container root password for SSH access
177
 
178
+ ![settings](res/setup/settings/3-auth.png)
 
179
 
180
+ ### Development Settings
181
+ - **RFC Parameters (local instances only):** configure URLs and ports for remote function calls between instances
182
+ - **RFC Password:** Configure password for remote function calls
183
+ Learn more about Remote Function Calls and their purpose [here](#7-configure-agent-zero-rfc).
184
 
185
+ > [!IMPORTANT]
186
+ > Always keep your API keys and passwords secure.
 
187
 
188
  # Choosing Your LLMs
189
+ The Settings page is the control center for selecting the Large Language Models (LLMs) that power Agent Zero. You can choose different LLMs for different roles:
190
 
191
  | LLM Role | Description |
192
  | --- | --- |
 
195
  | `embedding_llm` | This LLM is responsible for generating embeddings used for memory retrieval and knowledge base lookups. Changing the `embedding_llm` will re-index all of A0's memory. |
196
 
197
  **How to Change:**
198
+ 1. Open Settings page in the Web UI.
199
+ 2. Choose the provider for the LLM for each role (Chat model, Utility model, Embedding model) and write the model name.
200
+ 3. Click "Save" to apply the changes.
 
 
 
 
201
 
202
  ## Important Considerations
203
 
 
206
  > requires clearing the `memory` folder to avoid errors, as the embeddings can't be
207
  > mixed in the vector database. Note that this will DELETE ALL of Agent Zero's memory.
208
 
 
 
209
  ## Installing and Using Ollama (Local Models)
210
  If you're interested in Ollama, which is a powerful tool that allows you to run various large language models locally, here's how to install and use it:
211
 
 
236
  ollama pull <model-name>
237
  ```
238
 
239
+ 1. Replace `<model-name>` with the name of the model you want to use. For example, to pull the Mistral Large model, you would use the command `ollama pull mistral-large`.
240
+
241
+ 2. A CLI message should confirm the model download on your system
242
+
243
+ #### Selecting your model within Agent Zero
244
+ 1. Once you've downloaded your model(s), you must select it in the Settings page of the GUI.
245
+
246
+ 2. Within the Chat model, Utility model, or Embedding model section, choose Ollama as provider.
247
+
248
+ 3. Write your model code as expected by Ollama, in the format `llama3.2` or `qwen2.5:7b`
249
+
250
+ 4. Click `Save` to confirm your settings.
251
+
252
+ ![ollama](res/setup/settings/4-local-models.png)
253
 
254
  #### Managing your downloaded models
255
  Once you've downloaded some models, you might want to check which ones you have available or remove any you no longer need.
 
265
  ollama rm <model-name>
266
  ```
267
 
 
 
 
 
268
 
269
+ - Experiment with different model combinations to find the balance of performance and cost that best suits your needs. E.g., faster and lower latency LLMs will help, and you can also use `faiss_gpu` instead of `faiss_cpu` for the memory.
270
 
271
+ ## Using Agent Zero on your mobile device
272
+ Agent Zero's Web UI is accessible from any device on your network through the Docker container:
273
+
274
+ 1. The Docker container automatically exposes the Web UI on all network interfaces
275
+ 2. Find the mapped port in Docker Desktop:
276
+ - Look under the container name (usually in the format `<PORT>:80`)
277
+ - For example, if you see `32771:80`, your port is `32771`
278
+ 3. Access the Web UI from any device using:
279
+ - Local access: `http://localhost:<PORT>`
280
+ - Network access: `http://<YOUR_COMPUTER_IP>:<PORT>`
281
+
282
+ > [!TIP]
283
+ > - Your computer's IP address is usually in the format `192.168.x.x` or `10.0.x.x`
284
+ > - You can find your external IP address by running `ipconfig` (Windows) or `ifconfig` (Linux/Mac)
285
+ > - The port is automatically assigned by Docker unless you specify one
286
+
287
+ > [!NOTE]
288
+ > If you're running Agent Zero directly on your system (legacy approach) instead of
289
+ > using Docker, you'll need to configure the host manually in `run_ui.py` to run on all interfaces using `host="0.0.0.0"`.
290
+
291
+ For developers or users who need to run Agent Zero directly on their system,see the [In-Depth Guide for Full Binaries Installation](#in-depth-guide-for-full-binaries-installation).
292
+
293
+ ### How to update Agent Zero
294
+
295
+ 1. **If you come from the previous version of Agent Zero (pre-0.7.1):**
296
+ - Your data is safely stored across various directories and files inside the Agent Zero folder.
297
+ - To update to the new Docker runtime version, you need to save the following files and directories:
298
+ - `/memory` - Agent's memory
299
+ - `/knowledge` - Custom knowledge base
300
+ - `/instruments` - Custom instruments and functions
301
+ - `/prompts` - Custom prompts files (if any has been created)
302
+ - `/work_dir` - Working directory
303
+ - `.env` - Your API keys
304
+ - `/tmp/settings.json` - Your Agent Zero settings
305
+ - Once you have saved these files and directories, you can proceed with the Docker runtime [installation instructions above](#windows-macos-and-linux-setup-guide) setup guide.
306
+ - Reach for the folder where you saved your data and copy it to the new Agent Zero folder set during the installation process.
307
+ - Agent Zero will automatically detect your saved data and use it across memory, knowledge, instruments, prompts and settings.
308
+
309
+ > [!IMPORTANT]
310
+ > Make sure to use the same embedding model you were using before, otherwise
311
+ > you will have to re-index all of Agent Zero's memory, therefore deleting all
312
+ > your custom knowledge and memory.
313
+
314
+ > [!NOTE]
315
+ > If you have issues loading your settings, you can try to delete the `/tmp/settings.json`
316
+ > file and let Agent Zero generate a new one.
317
+
318
+ 2. **Update Process (Docker Desktop)**
319
+ - Go to Docker Desktop and stop the container from the "Containers" tab
320
+ - Right-click and select "Remove" to remove the container
321
+ - Go to "Images" tab and remove the `frdel/agent-zero-run` image
322
+
323
+ ![docker delete image](res/setup/docker-delete-image-1.png)
324
+
325
+ - Search and pull the new image
326
+ - Run the new container with the same volume settings as the old one
327
+
328
+ > [!IMPORTANT]
329
+ > Make sure to use the same volume mount path when running the new
330
+ > container to preserve your data. The exact path depends on where you stored
331
+ > your Agent Zero data directory (the chosen directory on your machine).
332
+
333
+ > [!TIP]
334
+ > Alternatively, run the following commands in your terminal:
335
+ >
336
+ > ```bash
337
+ > # Stop the current container
338
+ > docker stop agent-zero
339
+ >
340
+ > # Remove the container (data is safe in the folder)
341
+ > docker rm agent-zero
342
+ >
343
+ > # Remove the old image
344
+ > docker rmi frdel/agent-zero-run
345
+ >
346
+ > # Pull the latest image
347
+ > docker pull frdel/agent-zero-run
348
+ >
349
+ > # Run new container with the same volume mount
350
+ > docker run -p $PORT:80 -v /path/to/your/data:/a0 frdel/agent-zero-run
351
+ > ```
352
+
353
+ 3. **Full Binaries**
354
+ - Using Git/GitHub: Pull the latest version of the Agent Zero repository.
355
+ - The custom knowledge, solutions, memory, and other data will get ignored, so you don't need to worry about losing any of your custom data. The same goes for your .env file with all of your API keys and settings.json.
356
 
357
+ > [!WARNING]
358
+ > - If you update manually, beware: save your .env file with the API keys, and look for new dependencies in requirements.txt.
359
+ > - If any changes are made to the requirements of the updated version, you have to execute this command inside the a0 conda env after activating it:
360
+ > ```bash
361
+ > pip install -r requirements.txt
362
+
363
+ # In-Depth Guide for Full Binaries Installation
364
+ - Agent Zero is a framework. It's made to be customized, edited, enhanced. Therefore you need to install the necessary components to run it when downloading its full binaries. This guide will help you to do so.
365
+ - The following step by step instructions can be followed along with a video for this tutorial on how to make Agent Zero work with its full development environment.
366
+
367
+ [![Video](res/setup/thumb_play.png)](https://youtu.be/8H7mFsvxKYQ)
368
+
369
+ ## Reminders:
370
+ 1. There's no need to install Python, Conda will manage that for you.
371
+ 2. You don't necessarily need API keys: Agent Zero can run with local models. For this tutorial though, we will leave it to the default OpenAI API. A guide for downloading Ollama along with local models is available [here](#installing-and-using-ollama-local-models).
372
+ 3. Visual Studio Code or any other code editor is not mandatory, but it makes it easier to navigate and edit files.
373
+ 4. Git/GitHub is not mandatory, you can download the framework files through your browser. We will not be showing how to use Git in this tutorial.
374
+ 5. Docker is not mandatory for the full binaries installation, since the framework will run on your machine connecting to the Docker container through the Web UI RFC functionality.
375
+ 6. Running Agent Zero without Docker makes the process more complicated and it's thought for developers and contributors.
376
 
377
  > [!IMPORTANT]
378
+ > Linux instructions are provided as general instructions for any Linux distribution. If you're using a distribution other than Debian/Ubuntu, you may need to adjust the instructions accordingly.
379
+ >
380
+ > For Debian/Ubuntu, just follow the macOS instructions, as they are the same.
381
+
382
+ ## 1. Install Conda (miniconda)
383
+ - Conda is a Python environment manager, it will help you keep your projects and installations separated.
384
+ - It's a lightweight version of Anaconda that includes only conda, Python, the packages they depend on, and a small number of other useful packages, including pip, zlib and a few others.
385
 
386
+ 1. Go to the download page of miniconda [here](https://docs.anaconda.com/miniconda/#miniconda-latest-installer-links). If the link does not work, just search the web for "miniconda download".
387
+ 2. Based on your operating system, download the right installer of miniconda. For macOS select the version with "pkg" at the end.
388
+
389
+ <img src="res/setup/image-1.png" alt="miniconda download win" width="500"/>
390
+ <img src="res/setup/image-5.png" alt="miniconda download macos" width="500"/>
391
+ <br><br>
392
+
393
+ 3. Run the installer and go through the installation process, here you can leave everything to default and just click Next, Next... The same goes for macOS with the "pkg" graphical installer.
394
+
395
+ <img src="res/setup/image.png" alt="miniconda install" width="200"/>
396
+ <img src="res/setup/image-2.png" alt="miniconda install" width="200"/>
397
+ <img src="res/setup/image-3.png" alt="miniconda install" width="200"/>
398
+ <img src="res/setup/image-4.png" alt="miniconda install" width="200"/>
399
+ <br><br>
400
+
401
+ 4. After the installation is complete, you should have "Anaconda Powershell Prompt" installed on your Windows machine. On macOS, when you open the Terminal application in your Applications folder and type "conda --version", you should see the version installed.
402
+
403
+ <img src="res/setup/image-6.png" alt="miniconda installed" height="100"/>
404
+ <img src="res/setup/image-7.png" alt="miniconda installed" height="100"/>
405
+ <br><br>
406
+
407
+
408
+ ## 2. Download Agent Zero
409
+ - You can clone the Agent Zero repository (https://github.com/frdel/agent-zero) from GitHub if you know how to use Git. In this tutorial I will just show how to download the files.
410
+
411
+ 1. Go to the Agent Zero releases [here](https://github.com/frdel/agent-zero/releases).
412
+ 2. The latest release is on the top of the list, click the "Source Code (zip)" button under "Assets" to download it.
413
+
414
+ <img src="res/setup/image-14-u.png" alt="agent zero download" width="500"/>
415
+ <br><br>
416
+
417
+ 3. Extract the downloaded archive where you want to have it. I will extract them to "agent-zero" folder on my Desktop - "C:\Users\frdel\Desktop\agent-zero" on Windows and "/Users/frdel/Desktop/agent-zero" on macOS.
418
+
419
+ ## 3. Set up Conda environment
420
+ - Now that we have the project files and Conda, we can create **virtual Python environment** for this project, activate it and install requirements.
421
+
422
+ 1. Open your **"Anaconda Powershell Prompt"** application on windows or **"Terminal"** application on macOS.
423
+ 2. In the terminal, navigate to your Agent Zero folder using **"cd"** command. Replace the path with your actual Agent Zero folder path.
424
+ ~~~
425
+ cd C:\Users\frdel\Desktop\agent-zero
426
+ ~~~
427
+ You should see your folder has changed on the next terminal line.
428
+
429
+ <img src="res/setup/image-15.png" alt="agent zero cd" height="100"/>
430
+ <img src="res/setup/image-16.png" alt="agent zero cd" height="100"/>
431
+ <br><br>
432
+
433
+ 3. Create Conda environment using command **"conda create"**. After **"-n"** is your environment name, you can choose your own, i will use **"a0"** - short for Agent Zero. After **"python"** is the Python version that Conda will install for you into this environment, right now, 3.12 works fine. **-y** skips confirmations.
434
+ ~~~
435
+ conda create -n a0 python=3.12 -y
436
+ ~~~
437
+
438
+ 4. Once done, activate the new environment for this terminal window by another command:
439
+ ~~~
440
+ conda activate a0
441
+ ~~~
442
+ And you should see that the **(base)** on the left has changed to **(a0)**. This means that this terminal now uses the new **a0** virtual environment and all packages will be installed into this environment.
443
+
444
+ <img src="res/setup/image-17.png" alt="conda env" height="200"/>
445
+ <img src="res/setup/image-18.png" alt="conda env" height="200"/>
446
+ <br><br>
447
+
448
+ > [!IMPORTANT]
449
+ > If you open a new terminal window, you will need to activate the environment with
450
+ > "conda activate a0" again for that window.
451
+
452
+ 5. Install requirements using **"pip"**. Pip is a Python package manager. We can install all required packages from requirements.txt file using command:
453
+ ~~~
454
+ pip install -r requirements.txt
455
+ ~~~
456
+ This might take some time. If you get any errors regarding version conflicts and compatibility, double check that your environment is activated and that you created that environment with the correct Python version.
457
+
458
+ <img src="res/setup/image-19.png" alt="conda reqs" height="200"/>
459
+ <br><br>
460
+
461
+ ## 4. Install Docker (Docker Desktop application)
462
+ Simply put, Docker is a way of running virtual computers on your machine. These are lightweight, disposable and isolated from your operating system, so it is a way to sandbox Agent Zero.
463
+ - Agent Zero only connects to the Docker container when it needs to execute code and commands. The frameworks itself runs on your machine.
464
+ - Docker has a desktop application with GUI for all major operating system, which is the recommended way to install it.
465
+
466
+ 1. Go to the download page of Docker Desktop [here](https://www.docker.com/products/docker-desktop/). If the link does not work, just search the web for "docker desktop download".
467
+ 2. Download the version for your operating system. Don't be tricked by the seemingly missing windows intel/amd version, it's the button itself, not in the dropdown menu.
468
+
469
+ <img src="res/setup/image-8.png" alt="docker download" width="200"/>
470
+ <br><br>
471
+
472
+ 3. Run the installer and go through the installation process. It should be even shorter than Conda installation, you can leave everything to default. On macOS, the installer is a "dmg" image, so just drag and drop the application to your Applications folder like always.
473
+
474
+ <img src="res/setup/image-9.png" alt="docker install" width="300"/>
475
+ <img src="res/setup/image-10.png" alt="docker install" width="300"/>
476
+
477
+ <img src="res/setup/image-12.png" alt="docker install" width="300"/>
478
+ <br><br>
479
+
480
+
481
+ 4. Once installed, you should see Docker Desktop application on your Windows/Mac machine.
482
+
483
+ <img src="res/setup/image-11.png" alt="docker installed" height="100"/>
484
+ <img src="res/setup/image-13.png" alt="docker installed" height="100"/>
485
+ <br><br>
486
+
487
+ 5. Create account in the application.
488
+ - It's required to be signed in to the Docker Hub, so create a free account in the Docker Desktop application, you will be prompted when the application first runs.
489
+
490
+ > [!IMPORTANT]
491
+ > **Important macOS-only Docker Configuration:** In Docker Desktop's preferences
492
+ > (Docker menu) go to Settings, navigate to "Advanced" and check "Allow the default
493
+ > Docker socket to be used (requires password)." This allows Agent Zero to
494
+ > communicate with the Docker daemon.
495
+
496
+ ![docker socket macOS](res/setup/macsocket.png)
497
+
498
+ > [!NOTE]
499
+ > **Linux Users:** You can install both Docker Desktop or docker-ce (Community Edition).
500
+ > For Docker Desktop, follow the instructions for your specific Linux distribution [here](https://docs.docker.com/desktop/install/linux-install/).
501
+ > For docker-ce, follow the instructions [here](https://docs.docker.com/engine/install/).
502
+ >
503
+ > If you're using docker-ce, you will need to add your user to the `docker` group to be able to run docker commands without sudo. You can do this by running the following command in your terminal: `sudo usermod -aG docker $USER`. Then log out and log back in for the changes to take effect.
504
+ >
505
+ > Login in the Docker CLI with `docker login` and provide your Docker Hub credentials.
506
+
507
+ 6. Pull the Docker image
508
+ - Agent Zero needs a Docker image to be pulled from the Docker Hub to be run, even when using the full binaries.
509
+ You can refer to the [installation instructions above](#windows-macos-and-linux-setup-guide) to run the Docker container and then resume from the next step. There are two differences:
510
+ - You need to map two ports instead of one:
511
+ - 55022 in the first field to run the Remote Function Call SSH
512
+ - 0 in the second field to run the Web UI in automatic port assignment
513
+ - You need to map the `/a0` volume to the location of your local Agent Zero folder.
514
+ - Run the Docker container following the instructions.
515
+
516
+ ## 5. Run the local Agent Zero instance
517
+ Run the Agent Zero with Web UI:
518
+ ~~~
519
+ python run_ui.py
520
+ ~~~
521
+
522
+ <img src="res/setup/image-21.png" alt="run ui" height="110"/>
523
+ <br><br>
524
+
525
+ - Open the URL shown in terminal in your web browser. You should see the Agent Zero interface.
526
+
527
+ ## 6. Configure Agent Zero
528
+ Now we can configure Agent Zero - select models, settings, API Keys etc. Refer to the [Usage](usage.md#agent-configuration) guide for a full guide on how to configure Agent Zero.
529
+
530
+ ## 7. Configure Agent Zero RFC
531
+ Agent Zero needs to be configured further to redirect some functions to the Docker container. This is crucial for development as A0 needs to run in a standardized environment to support all features.
532
+ 1. Go in "Settings" page in the Web UI of your local instance and go in the "Development" section.
533
+ 2. Set "RFC Destination URL" to `http://localhost`
534
+ 3. Set the two ports (HTTP and SSH) to the ones used when creating the Docker container
535
+ 4. Click "Save"
536
+
537
+ ![rfc local settings](res/setup/9-rfc-devpage-on-local-sbs-1.png)
538
+
539
+ 5. Go in "Settings" page in the Web UI of your Docker instance and go in the "Development" section.
540
+
541
+ ![rfc docker settings](res/setup/9-rfc-devpage-on-docker-instance-1.png)
542
+
543
+ 6. This time the page has only the password field, set it to the same password you used when creating the Docker container.
544
+ 7. Click "Save"
545
+ 8. Use the Development environment
546
+ 9. Now you have the full development environment to work on Agent Zero.
547
+
548
+ <img src="res/setup/image-22-1.png" alt="run ui" width="400"/>
549
+ <img src="res/setup/image-23-1.png" alt="run ui" width="400"/>
550
+ <br><br>
551
 
 
 
 
 
552
 
553
  ### Conclusion
554
+ After following the instructions for your specific operating system, you should have Agent Zero successfully installed and running. You can now start exploring the framework's capabilities and experimenting with creating your own intelligent agents.
555
+
556
+ If you encounter any issues during the installation process, please consult the [Troubleshooting section](troubleshooting.md) of this documentation or refer to the Agent Zero [Skool](https://www.skool.com/agent-zero) or [Discord](https://discord.gg/Z2tun2N3) community for assistance.
557
+
docs/res/arch-01.svg CHANGED
docs/res/setup/1-docker-image-search.png ADDED

Git LFS Details

  • SHA256: 566a1a695a1c24556664dd7ebd4a267af9936e740671226bb32c262d8696d7be
  • Pointer size: 131 Bytes
  • Size of remote file: 158 kB
docs/res/setup/2-docker-image-run.png ADDED

Git LFS Details

  • SHA256: c37208f9135d7cbaaad9889b2fc6244d8d7d274c932a4134d99df6c45c0b111d
  • Pointer size: 130 Bytes
  • Size of remote file: 33.7 kB
docs/res/setup/3-docker-port-mapping.png ADDED

Git LFS Details

  • SHA256: 127afd16bb6bf8a96a30dfc1b609f10199caef14c11f129e786c59be9429a171
  • Pointer size: 131 Bytes
  • Size of remote file: 113 kB
docs/res/setup/4-docker-container-started.png ADDED

Git LFS Details

  • SHA256: 73b8dc806ce7a45d033d0b118c93bb601d2834435931f596eb0326113774ef00
  • Pointer size: 131 Bytes
  • Size of remote file: 146 kB
docs/res/setup/5-docker-click-to-open.png ADDED

Git LFS Details

  • SHA256: 770bbe6db3e3676f24c12496277ffcd9dda12c0a8cbafa63468e71978f023155
  • Pointer size: 131 Bytes
  • Size of remote file: 220 kB
docs/res/setup/6-docker-a0-running.png ADDED

Git LFS Details

  • SHA256: d49b402a97e5a529c33ccfebf21b78b4db58e10c3258adf0d7bec0adb9b23708
  • Pointer size: 130 Bytes
  • Size of remote file: 27 kB
docs/res/setup/9-rfc-devpage-on-docker-instance-1.png ADDED

Git LFS Details

  • SHA256: 84163bf1e39981802bda3bcaab5cc73e1326c37fd60db605063945115d750603
  • Pointer size: 130 Bytes
  • Size of remote file: 47.5 kB
docs/res/setup/9-rfc-devpage-on-local-sbs-1.png ADDED

Git LFS Details

  • SHA256: 999adb6df7d69d627036c178a295306e87e932038a6c0ef58dea931a7179750a
  • Pointer size: 131 Bytes
  • Size of remote file: 268 kB
docs/res/setup/docker-delete-image-1.png ADDED

Git LFS Details

  • SHA256: 89dae2200d05bc900621bade401a71489efe3a5be294b16e4a68ac4c57f54ce9
  • Pointer size: 131 Bytes
  • Size of remote file: 101 kB
docs/res/setup/image-14-u.png ADDED

Git LFS Details

  • SHA256: 0b1d4f57d8d7da87692557270140ee976841bb9278dc62b301f249a5fcfe82b2
  • Pointer size: 130 Bytes
  • Size of remote file: 53.7 kB
docs/res/setup/image-22-1.png CHANGED

Git LFS Details

  • SHA256: 6600b1780675af91472d3803ad3d3d428ad7fadb5360b24e6ac107bfda2aa9c6
  • Pointer size: 130 Bytes
  • Size of remote file: 86.8 kB

Git LFS Details

  • SHA256: 470ca3891d8da3c53ab0e3bdecb0b29748fb4d56275fdd2e6990bcb6ddc24b99
  • Pointer size: 131 Bytes
  • Size of remote file: 145 kB
docs/res/setup/image-23-1.png CHANGED

Git LFS Details

  • SHA256: 1a989f918e3fa94f8fbfe575f52cb88e6393d0b84e008072baacbaaa25ec4278
  • Pointer size: 130 Bytes
  • Size of remote file: 90.3 kB

Git LFS Details

  • SHA256: 95fb97ca26106d9aaa95b0e0a89ab498e6b2e3cdf744ed47a463afc31b7360f0
  • Pointer size: 131 Bytes
  • Size of remote file: 152 kB
docs/res/setup/settings/1-agentConfig.png ADDED

Git LFS Details

  • SHA256: cf382b83bad3455418b961b050a33cf34d036f785ab25dd51ff6c5505443161d
  • Pointer size: 131 Bytes
  • Size of remote file: 125 kB
docs/res/setup/settings/2-chat-model.png ADDED

Git LFS Details

  • SHA256: 35e621db7fbc93b17036a4cbc014f90de0c4ae0c2177f38a96c3573d0cacd078
  • Pointer size: 131 Bytes
  • Size of remote file: 135 kB
docs/res/setup/settings/3-auth.png ADDED

Git LFS Details

  • SHA256: c79857552c046dff9ea66e950758b77f6bfe9d20b37f64b25a0d7719ac716672
  • Pointer size: 130 Bytes
  • Size of remote file: 51.8 kB
docs/res/setup/settings/4-local-models.png ADDED

Git LFS Details

  • SHA256: 533b2faec9a86cb02b9d90a98ebddc40ab05149c5ed697a8a93da49c069eaade
  • Pointer size: 130 Bytes
  • Size of remote file: 54.4 kB
docs/res/setup/thumb_setup.png ADDED

Git LFS Details

  • SHA256: e56ee845d0d5f1817a0df15116f561310e417154cde9bd21540b0bb9d663238a
  • Pointer size: 131 Bytes
  • Size of remote file: 365 kB
docs/res/ui-actions.png ADDED

Git LFS Details

  • SHA256: 58faa451ef21e6d518c8631e11ed7d225cb0e67795880bd31618b664990bec8f
  • Pointer size: 130 Bytes
  • Size of remote file: 15.8 kB
docs/res/ui-attachments-2.png ADDED

Git LFS Details

  • SHA256: 358c033afb78e2f0954bfddc8d8b692f7164b96db01e30901543cf347fdd85b8
  • Pointer size: 131 Bytes
  • Size of remote file: 119 kB
docs/res/ui-attachments.png ADDED

Git LFS Details

  • SHA256: 1fb76a5bfc2491044c6897f084177760325cdbdc23bd228bf8c3f222a161f2ec
  • Pointer size: 130 Bytes
  • Size of remote file: 90.9 kB
docs/res/ui-behavior-change-chat.png ADDED

Git LFS Details

  • SHA256: 1b914502675375eb42e5bba11c654701f252b8c61a31cfc8615032c1b011d4c7
  • Pointer size: 130 Bytes
  • Size of remote file: 90.7 kB
docs/res/ui-context.png ADDED

Git LFS Details

  • SHA256: 46d2c034e5f732ac03c3c524f5d662e808786c3739648c895116e0df3174e1ae
  • Pointer size: 131 Bytes
  • Size of remote file: 139 kB
docs/res/ui-file-browser.png ADDED

Git LFS Details

  • SHA256: 748952a09ee60818698c3051d912b9e26e6ea48c2a8cff32aad71bf867feb1ab
  • Pointer size: 130 Bytes
  • Size of remote file: 79.8 kB
docs/res/ui-history.png ADDED

Git LFS Details

  • SHA256: 0a68c1aa2fbb3e717c5ebea25954af0e984d76679127b8e1544371e1bcb9384e
  • Pointer size: 130 Bytes
  • Size of remote file: 96.5 kB
docs/res/ui-katex-1.png ADDED

Git LFS Details

  • SHA256: 690ed875d6519290300e90e676acfe8738fa7fc0268677e9c3b3c25081ccc948
  • Pointer size: 130 Bytes
  • Size of remote file: 14.1 kB
docs/res/ui-katex-2.png ADDED

Git LFS Details

  • SHA256: e6773278278856d70893e4808a025717219fb7e95bf84916cee58b8b546c9ff6
  • Pointer size: 130 Bytes
  • Size of remote file: 45.2 kB
docs/res/ui-nudge.png ADDED

Git LFS Details

  • SHA256: 69e8c5139a72f3e4f58789e924234f0e995bdb849087768e266a7ad98d805225
  • Pointer size: 130 Bytes
  • Size of remote file: 40.1 kB
docs/res/ui-restarting.png ADDED

Git LFS Details

  • SHA256: 617add027faa9546b56dc2d847dcee6ef2e023f5ad8a8c1f56d3dd0546bdc020
  • Pointer size: 130 Bytes
  • Size of remote file: 61.7 kB
docs/res/ui-screen.png ADDED

Git LFS Details

  • SHA256: 626d103fb596823693bcca5d6dba0ff5d35312506cdbabb6e02a8e22f57946da
  • Pointer size: 131 Bytes
  • Size of remote file: 134 kB
docs/res/ui-settings-5-speech-to-text.png ADDED

Git LFS Details

  • SHA256: 6f31f3be82912474dac9b684b588c033895a035d0dcb13dee069dfce5096b857
  • Pointer size: 130 Bytes
  • Size of remote file: 64.4 kB
docs/res/ui-tts-stop-speech.png ADDED

Git LFS Details

  • SHA256: ac71138db37666e8bfa83f2ff3dc2139dd8d9d15d5c67997a319e1986697bf07
  • Pointer size: 129 Bytes
  • Size of remote file: 4.66 kB
docs/res/ui_newchat1.png CHANGED

Git LFS Details

  • SHA256: 0452c8dfa12c145cc4e50aa683fb069c7dcb24b6a24f0228e65f95feb9c85e03
  • Pointer size: 130 Bytes
  • Size of remote file: 61.9 kB

Git LFS Details

  • SHA256: 631a7124a069a6d0e306764d877a20f8ccc97a5508dcb36330b165bfd65886a6
  • Pointer size: 130 Bytes
  • Size of remote file: 57.3 kB
docs/res/web-ui.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2f689416c8938a6e649224e2a56b2d7d7235338e046969df71fc09a65391590c
3
+ size 2371652
docs/troubleshooting.md CHANGED
@@ -2,54 +2,42 @@
2
  This page addresses frequently asked questions (FAQ) and provides troubleshooting steps for common issues encountered while using Agent Zero.
3
 
4
  ## Frequently Asked Questions
5
- **1. How do I set up and activate a Python virtual environment?**
6
- Use the `venv` module or `conda` (recommended).
7
- * **`venv`:**
8
- ```bash
9
- python -m venv .venv # Create the environment
10
- source .venv/bin/activate # Activate (Linux/macOS)
11
- .venv\Scripts\activate # Activate (Windows)
12
- ```
13
- * **`conda`:**
14
- ```bash
15
- conda create -n agent-zero python=3.12 # Create
16
- conda activate agent-zero # Activate
17
- ```
18
- **2. How do I resolve `ModuleNotFoundError` errors (e.g., for `ansio`, `pyflakes`, `Flask`)?**
19
- Ensure your virtual environment is activated *before* installing requirements:
20
-
21
- ```bash
22
- pip install -r requirements.txt
23
- ```
24
 
25
  **3. How do I integrate open-source models with Agent Zero?**
26
- Refer to the [Choosing your LLMs](installation.md#installing-and-using-ollama-local-models) section of the documentation for detailed instructions and examples for configuring different LLMs in `initialize.py`. Local models can be run using Ollama or LM Studio.
27
 
28
- > [!TIP]
29
  > Some LLM providers offer free usage of their APIs, for example Groq, Mistral or SambaNova.
30
 
31
- **4. How can I make Agent Zero retain memory between sessions?**
32
- Auto memory automatically saves and loads solutions and informations from previous sessions.
33
 
34
- **5. Where can I find more documentation or tutorials?**
35
- * Join the Agent Zero [Skool](https://www.skool.com/agent-zero) or [Discord](https://discord.gg/Z2tun2N3) community for support and discussions.
36
 
37
- **6. How do I adjust API rate limits?**
38
  Modify the `rate_limit_seconds` and `rate_limit_requests` parameters in the `AgentConfig` class within `initialize.py`.
39
 
40
- **7. Can Agent Zero interact with external APIs or services (e.g., WhatsApp)?**
 
 
 
 
41
  Extending Agent Zero to interact with external APIs is possible by creating custom tools or solutions. Refer to the documentation on creating them.
42
 
43
  ## Troubleshooting
44
 
45
  **Installation**
46
- * **Dependency Conflicts:** If encountering version conflicts during installation, try creating a fresh virtual environment and reinstalling the requirements.
47
- * **Docker Issues:** If Docker containers fail to start or Agent Zero can't connect to Docker, consult the Docker documentation and verify your Docker installation and configuration. On macOS, ensure you've granted Docker access to your project files in Docker Desktop's settings as described in the [Installation guide](installation.md#2-install-docker-docker-desktop-application).
48
 
49
  **Usage**
50
- * **"Nothing happens" when sending a message:** This often indicates a tool execution issue, an API connection problem, or rate limiting. Check your API keys, internet connection, and ensure any required services (like Docker) are running. Examine the logs for more details.
51
 
52
- * **Terminal commands not executing:** If using Docker for code execution, ensure the Docker container is running and properly configured. Check SSH settings if applicable.
53
 
54
  * **Error Messages:** Pay close attention to the error messages displayed in the Web UI or terminal. They often provide valuable clues for diagnosing the issue. Refer to the specific error message in online searches or community forums for potential solutions.
55
 
 
2
  This page addresses frequently asked questions (FAQ) and provides troubleshooting steps for common issues encountered while using Agent Zero.
3
 
4
  ## Frequently Asked Questions
5
+ **1. How do I ask Agent Zero to work directly on my files or dirs?**
6
+ - Place the files/dirs in the `work_dir` directory. Agent Zero will be able to perform tasks on them. The `work_dir` directory is located in the root directory of the Docker Container.
7
+
8
+ **2. When I input something in the chat, nothing happens. What's wrong?**
9
+ - Check if you have set up API keys in the Settings page. If not, the application will not be able to communicate with the endpoints it needs to run LLMs and to perform tasks.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  **3. How do I integrate open-source models with Agent Zero?**
12
+ Refer to the [Choosing your LLMs](installation.md#installing-and-using-ollama-local-models) section of the documentation for detailed instructions and examples for configuring different LLMs. Local models can be run using Ollama or LM Studio.
13
 
14
+ > [!TIP]
15
  > Some LLM providers offer free usage of their APIs, for example Groq, Mistral or SambaNova.
16
 
17
+ **6. How can I make Agent Zero retain memory between sessions?**
18
+ Refer to the [How to update Agent Zero](installation.md#how-to-update-agent-zero) section of the documentation for instructions on how to update Agent Zero while retaining memory and data.
19
 
20
+ **7. Where can I find more documentation or tutorials?**
21
+ - Join the Agent Zero [Skool](https://www.skool.com/agent-zero) or [Discord](https://discord.gg/Z2tun2N3) community for support and discussions.
22
 
23
+ **8. How do I adjust API rate limits?**
24
  Modify the `rate_limit_seconds` and `rate_limit_requests` parameters in the `AgentConfig` class within `initialize.py`.
25
 
26
+ **9. My code_execution_tool doesn't work, what's wrong?**
27
+ - Ensure you have Docker installed and running. If using Docker Desktop on macOS, grant it access to your project files in Docker Desktop's settings. Check the [Installation guide](installation.md#4-install-docker-docker-desktop-application) for more details.
28
+ - Verify that the Docker image is updated.
29
+
30
+ **10. Can Agent Zero interact with external APIs or services (e.g., WhatsApp)?**
31
  Extending Agent Zero to interact with external APIs is possible by creating custom tools or solutions. Refer to the documentation on creating them.
32
 
33
  ## Troubleshooting
34
 
35
  **Installation**
36
+ - **Docker Issues:** If Docker containers fail to start or Agent Zero can't connect to Docker, consult the Docker documentation and verify your Docker installation and configuration. On macOS, ensure you've granted Docker access to your project files in Docker Desktop's settings as described in the [Installation guide](installation.md#4-install-docker-docker-desktop-application). Verify that the Docker image is updated.
 
37
 
38
  **Usage**
 
39
 
40
+ - **Terminal commands not executing:** If using Docker for code execution, ensure the Docker container is running and properly configured. Check SSH settings if applicable. Check if the Docker image is updated by removing it from Docker Desktop app, and subsequently prompting Agent Zero to `run an Hello World in Python`.
41
 
42
  * **Error Messages:** Pay close attention to the error messages displayed in the Web UI or terminal. They often provide valuable clues for diagnosing the issue. Refer to the specific error message in online searches or community forums for potential solutions.
43
 
docs/usage.md CHANGED
@@ -1,20 +1,106 @@
1
  # Usage Guide
2
- This guide explores more advanced usage scenarios for Agent Zero, building upon the basics covered in the [Quick Start](quickstart.md).
3
 
4
  ![Utility Message with Solutions](res/memory-man.png)
5
 
6
- ## Tool Usage
7
- Agent Zero's power comes from its ability to use [tools](architecture.md#tools). Here's how to leverage them effectively:
8
 
9
- - **Understand Tools:** Agent Zero typically includes default tools like knowledge, webpage content, code execution, and communication. Understand the capabilities of these tools and how to invoke them.
 
10
 
11
- ## Prompt Engineering
12
- Effective prompt engineering is crucial for getting the most out of Agent Zero. Here are some tips and techniques:
13
 
14
- * **Be Clear and Specific:** Clearly state your desired outcome. The more specific you are, the better Agent Zero can understand and fulfill your request. Avoid vague or ambiguous language.
15
- * **Provide Context:** If necessary, provide background information or context to help the agent understand the task better. This might include relevant details, constraints, or desired format for the response.
16
- * **Break Down Complex Tasks:** For complex tasks, break them down into smaller, more manageable sub-tasks. This makes it easier for the agent to reason through the problem and generate a solution.
17
- * **Iterative Refinement:** Don't expect perfect results on the first try. Experiment with different prompts, refine your instructions based on the agent's responses, and iterate until you achieve the desired outcome. To achieve a full-stack, web-app development task, for example, you might need to iterate for a few hours for 100% success.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  ## Example of Tools Usage: Web Search and Code Execution
20
  Let's say you want Agent Zero to perform some financial analysis tasks. Here's a possible prompt:
@@ -28,12 +114,10 @@ Agent Zero might then:
28
  3. Use the `code_execution_tool` to execute a Python script that performs the graph creation and key points highlighting, using the extracted data and the news dates as inputs.
29
  4. Return the final chart that you'll find in `/work_dir`, responding to the user with the `response_tool`.
30
 
31
- This example demonstrates how to combine multiple tools to achieve an analysis task. By mastering prompt engineering and tool usage, you can unlock the full potential of Agent Zero to solve complex problems.
 
32
 
33
- ## Memory Management
34
- * **Persistence:** Agent Zero's memory persists across sessions, allowing agents to learn from past interactions.
35
- * **Memory Retrieval:** Agents can access their [memory](architecture.md#memory-system) to retrieve relevant information and experiences.
36
- * **Knowledge Base:** You can augment the agent's knowledge by providing [external knowledge files](architecture.md#knowledge).
37
 
38
  ## Multi-Agent Cooperation
39
  One of Agent Zero's unique features is multi-agent cooperation.
@@ -45,51 +129,126 @@ One of Agent Zero's unique features is multi-agent cooperation.
45
  ![](res/physics.png)
46
  ![](res/physics-2.png)
47
 
48
- ## Agent Behavior
49
- * **System Prompt:** The core of Agent Zero's behavior is defined in the system prompt. Experiment with different system prompts to customize the agent's personality, biases, and reasoning approach.
50
- * **Prompts Directory:** The `prompts` directory contains various prompt templates used by the framework. You can modify these templates to customize the agent's communication style, instructions, and responses. See [Prompt Customization](architecture.md#custom-prompts) for more information.
51
- * **Creating New Tools and Instruments:** Extend Agent Zero's capabilities with custom tools and instruments. This allows you to add new features, modify existing behavior, and integrate with other systems. See [Adding Tools](architecture.md#adding-tools) and [Adding Instruments](architecture.md#adding-instruments) for more information.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
- ## Using Agent Zero on your mobile device
54
- To access the Agent Zero Web UI from other devices on your network and run it on all hosts, such as your smartphones or tablets:
55
 
56
- 1. In `run_ui.py`, add `host="0.0.0.0"` (or your private IP) to the `app.run()` command before the `port` argument (end of `run_ui.py`). The edited line of code should look like this:
57
- ```python
58
- app.run(request_handler=NoRequestLoggingWSGIRequestHandler, host="0.0.0.0", port=port)
59
- ```
60
- 2. Access the Web UI from other devices using `http://$YOUR_PRIVATE_IP:50001`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
  > [!TIP]
63
- > On local networks, the private address is usually 192.168.x.x or 10.0.x.x.
64
- > If you're using a VPN, you may need to use your public IP address instead of your
65
- > private IP. You can find your public IP address by visiting a website like
66
- > [https://www.whatismyip.com/](https://www.whatismyip.com/).
67
- >
68
- > If you're using a cloud server, you can use the server's public IP address instead
69
- > of your private IP. You may need to configure your server's firewall to allow
70
- > incoming traffic on port 50001.
71
- > If you're using a remote server, you may need to use a service like [ngrok]
72
- > (https://ngrok.com/) to create a secure tunnel to your server. This allows you to
73
- > access the Web UI from other devices using a public URL.
74
-
75
- ## Using code_execution_tool outside of the Docker Container
76
- > [!CAUTION]
77
- > We believe in safe and ethical AI development, and highly
78
- > suggest you to use the Docker container designed for running Agent Zero.
79
- > However, we understand that some users may want to use the code_execution_tool outside of the Docker container.
80
- >
81
- > This is a dangerous and untested feature, and we are not responsible for any damage
82
- > or illegal activities or legal liabilities caused by the use of this feature.
83
- > As you are responsible for your own actions, use this feature only if 100% sure of what you're doing.
84
-
85
- - If you accept the risks, follow these steps:
86
-
87
- ![Code Execution Jailbreak](res/code_exec_jailbreak.png)
88
-
89
- 1. After the installation and configuration of your Agent Zero instance, go in `initialize.py` and set the `code_exec_docker_enabled` to `False` (line 47). This will disable the code_execution_tool for your Agent Zero instance to communicate with the Docker container. The tool will search for an SSH connection at this point.
90
-
91
- 2. Comment out lines 56, 57, 58 and 59 in `initialize.py` that sets the `code_execution_tool` SSH connection parameters. Point them to your machine accordingly. This will enable the code_execution_tool for your Agent Zero instance.
92
-
93
- > [!IMPORTANT]
94
- > The `code_exec_ssh_pass` parameter (root user password) has to be provided to
95
- > `initialize.py` for the code_execution_tool to be able to connect to the machine.
 
1
  # Usage Guide
2
+ This guide explores usage and configuration scenarios for Agent Zero. You can consider this as a reference post-installation guide.
3
 
4
  ![Utility Message with Solutions](res/memory-man.png)
5
 
6
+ ## Basic Operations
7
+ Agent Zero provides several basic operations through its interface:
8
 
9
+ ### Restart Framework
10
+ The Restart button allows you to quickly restart the Agent Zero framework without using the terminal:
11
 
12
+ ![Restart Framework](res/ui-restarting.png)
 
13
 
14
+ * Click the "Restart" button in the sidebar
15
+ * A blue notification will appear indicating "Restarting..."
16
+ * Once complete, a green success message "Restarted" will be shown
17
+ * The framework will reinitialize while maintaining your current chat history and context
18
+
19
+ > [!TIP]
20
+ > Use the Restart function when you want to:
21
+ > - Reset the framework if you encounter unexpected behavior
22
+ > - Reinitialize the system when agents become unresponsive
23
+
24
+ ### Action Buttons
25
+ Located beneath the chat input box, Agent Zero provides a set of action buttons for enhanced control and visibility:
26
+
27
+ ![Action Buttons](res/ui-actions.png)
28
+ #### Chat Flow Control
29
+ * **Pause/Resume Agent:** Toggle button to pause and resume chat flow
30
+ - Click to pause ongoing agent operations
31
+ - Changes to "Resume Agent" when paused
32
+ - Click again to resume chat flow and command execution
33
+
34
+ #### Knowledge and File Management
35
+ * **Import Knowledge:** Import external files into the agent's knowledge base
36
+ - Supports `.txt`, `.pdf`, `.csv`, `.html`, `.json`, and `.md` formats
37
+ - Files are stored in `\knowledge\custom\main`
38
+ - Success message confirms successful import
39
+ - See [knowledge](architecture.md#knowledge) for more details
40
+
41
+ ### File Browser: Manage files in the Agent Zero environment
42
+ - Upload new files and folders
43
+ - Download files (click filename) or folders (as zip archives)
44
+ - Delete files and folders
45
+ - Navigate directories using the "Up" button
46
+ - Support for file renaming and search coming soon
47
+ - See [File Browser](#file-browser) section for detailed features
48
+
49
+ #### Debugging and Monitoring
50
+ * **Context:** View the complete context window sent to the LLM
51
+ - Includes system prompts
52
+ - Shows current conversation context
53
+ - Displays active instructions and parameters
54
+
55
+ ![Context](res/ui-context.png)
56
+
57
+ ### History:
58
+ Access the chat history in JSON format
59
+ - View the conversation as processed by the LLM
60
+ - Useful for debugging and understanding agent behavior
61
+
62
+ ![History](res/ui-history.png)
63
+
64
+ * **Nudge:** Restart the agent's last process
65
+ - Useful when agents become unresponsive
66
+ - Retries the last operation
67
+ - Helps recover from stuck states
68
+
69
+ ![Nudge](res/ui-nudge.png)
70
+
71
+ > [!TIP]
72
+ > Use the Context and History buttons to understand how the agent interprets your instructions and debug any unexpected behavior.
73
+
74
+ ### File Attachments
75
+ Agent Zero supports direct file attachments in the chat interface for seamless file operations:
76
+
77
+ #### Attaching Files
78
+ * Click the attachment icon (📎) on the left side of the chat input box
79
+ * Select one or multiple files to attach
80
+ * Preview attached files before sending:
81
+ - File names are displayed with their types (HTML, PDF, JPG, etc.)
82
+ - Images show thumbnails when available
83
+ - Files are listed in the chat input area waiting to be sent
84
+
85
+ ![File Attachments](res/ui-attachments.png)
86
+
87
+ #### Working with Attached Files
88
+ * Files can be referenced directly in your messages
89
+ * Agent Zero can:
90
+ - Process attached files
91
+ - Move files to specific directories
92
+ - Perform operations on multiple files simultaneously
93
+ - Confirm successful file operations with detailed responses
94
+
95
+ ![Working with Attachments](res/ui-attachments-2.png)
96
+
97
+ > [!TIP]
98
+ > When working with multiple files, you can attach them all at once and then give instructions about what to do with them. The agent will handle them as a batch while keeping you informed of the progress.
99
+
100
+ ## Tool Usage
101
+ Agent Zero's power comes from its ability to use [tools](architecture.md#tools). Here's how to leverage them effectively:
102
+
103
+ - **Understand Tools:** Agent Zero includes default tools like knowledge (powered by SearXNG), webpage content, code execution, and communication. Understand the capabilities of these tools and how to invoke them.
104
 
105
  ## Example of Tools Usage: Web Search and Code Execution
106
  Let's say you want Agent Zero to perform some financial analysis tasks. Here's a possible prompt:
 
114
  3. Use the `code_execution_tool` to execute a Python script that performs the graph creation and key points highlighting, using the extracted data and the news dates as inputs.
115
  4. Return the final chart that you'll find in `/work_dir`, responding to the user with the `response_tool`.
116
 
117
+ > [!NOTE]
118
+ > The first run of `code_execution_tool` may take a while as it downloads and builds the Agent Zero Docker image. Subsequent runs will be faster.
119
 
120
+ This example demonstrates how to combine multiple tools to achieve an analysis task. By mastering prompt engineering and tool usage, you can unlock the full potential of Agent Zero to solve complex problems.
 
 
 
121
 
122
  ## Multi-Agent Cooperation
123
  One of Agent Zero's unique features is multi-agent cooperation.
 
129
  ![](res/physics.png)
130
  ![](res/physics-2.png)
131
 
132
+ ## Prompt Engineering
133
+ Effective prompt engineering is crucial for getting the most out of Agent Zero. Here are some tips and techniques:
134
+
135
+ * **Be Clear and Specific:** Clearly state your desired outcome. The more specific you are, the better Agent Zero can understand and fulfill your request. Avoid vague or ambiguous language.
136
+ * **Provide Context:** If necessary, provide background information or context to help the agent understand the task better. This might include relevant details, constraints, or desired format for the response.
137
+ * **Break Down Complex Tasks:** For complex tasks, break them down into smaller, more manageable sub-tasks. This makes it easier for the agent to reason through the problem and generate a solution.
138
+ * **Iterative Refinement:** Don't expect perfect results on the first try. Experiment with different prompts, refine your instructions based on the agent's responses, and iterate until you achieve the desired outcome. To achieve a full-stack, web-app development task, for example, you might need to iterate for a few hours for 100% success.
139
+
140
+ ## Voice Interface
141
+ Agent Zero provides both Text-to-Speech (TTS) and Speech-to-Text (STT) capabilities for natural voice interaction:
142
+
143
+ ### Text-to-Speech
144
+ Enable voice responses from agents:
145
+ * Toggle the "Speech" switch in the Preferences section of the sidebar
146
+ * Agents will use your system's built-in voice synthesizer to speak their messages
147
+ * Click the "Stop Speech" button above the input area to immediately stop any ongoing speech
148
+
149
+ ![TTS Stop Speech](res/ui-tts-stop-speech.png)
150
 
151
+ - The interface allows users to stop speech at any time if a response is too lengthy or if they wish to intervene during the conversation.
 
152
 
153
+ The TTS uses a standard voice interface provided by modern browsers, which may sound robotic but is effective and does not require complex AI models. This ensures low latency and quick responses across various platforms, including mobile devices.
154
+
155
+
156
+ > [!TIP]
157
+ > The Text-to-Speech feature is great for:
158
+ > - Multitasking while receiving agent responses
159
+ > - Accessibility purposes
160
+ > - Creating a more interactive experience
161
+
162
+ ### Speech-to-Text
163
+ Send voice messages to agents using OpenAI's Whisper model (does not require OpenAI API key!):
164
+
165
+ 1. Click the microphone button in the input area to start recording
166
+ 2. The button color indicates the current status:
167
+ - Grey: Inactive
168
+ - Red: Listening
169
+ - Green: Recording
170
+ - Teal: Waiting
171
+ - Cyan (pulsing): Processing
172
+
173
+ Users can adjust settings such as silence threshold and message duration before sending to optimize their interaction experience.
174
+
175
+ Configure STT settings in the Settings page:
176
+ * **Model Size:** Choose between Base (74M, English) or other models
177
+ - Note: Only Large and Turbo models support multiple languages
178
+ * **Language Code:** Set your preferred language (e.g., 'en', 'fr', 'it', 'cz')
179
+ * **Silence Detection:**
180
+ - Threshold: Adjust sensitivity (lower values are more sensitive)
181
+ - Duration: Set how long silence should last before ending recording
182
+ - Timeout: Set maximum waiting time before closing the microphone
183
+
184
+ ![Speech to Text Settings](res/ui-settings-5-speech-to-text.png)
185
+
186
+ > [!IMPORTANT]
187
+ > All STT and TTS functionalities operate locally within the Docker container,
188
+ > ensuring that no data is transmitted to external servers or OpenAI APIs. This
189
+ > enhances user privacy while maintaining functionality.
190
+
191
+ ### Mathematical Expressions
192
+ Agent Zero supports KaTeX for beautiful mathematical typesetting:
193
+
194
+ * **Inline Math:** Use single dollars `$...$` for inline expressions
195
+ - Example: Type `The area of a circle is $A = πr^2$`
196
+ - Renders as: The area of a circle is $A = πr^2$
197
+
198
+ * **Display Math:** Use double dollars `$$...$$` for centered display equations
199
+ - Example: Type `$$F = G\frac{m_1m_2}{r^2}$$`
200
+ - Renders as a centered equation
201
+
202
+ ![KaTeX](res/ui-katex-1.png)
203
+
204
+ * **Complex Mathematics:** Supports full KaTeX syntax for:
205
+ - Fractions, exponents, and roots
206
+ - Matrices and arrays
207
+ - Greek letters and mathematical symbols
208
+ - Integrals, summations, and limits
209
+ - Mathematical alignments and equations
210
+
211
+ ![KaTeX display](res/ui-katex-2.png)
212
+
213
+ > [!TIP]
214
+ > When asking the agent to solve mathematical problems, it will automatically respond using KaTeX formatting for clear and professional-looking mathematical expressions.
215
+
216
+ ### File Browser
217
+ Agent Zero provides a powerful file browser interface for managing your workspace:
218
+
219
+ #### Interface Overview
220
+ - **Navigation Bar**: Shows current directory path with "Up" button for parent directory
221
+ - **File List**: Displays files and directories with key information:
222
+ - Name (sortable)
223
+ - Size in bytes
224
+ - Last modified timestamp
225
+ - **Action Icons**: Each file/directory has:
226
+ - Download button
227
+ - Delete button (with confirmation)
228
+
229
+ ![File Browser](res/ui-file-browser.png)
230
+
231
+ #### Features
232
+ - **Directory Navigation**:
233
+ - Click directories to enter them
234
+ - Use "Up" button to move to parent directory
235
+ - Current path always visible for context
236
+
237
+ > [!NOTE]
238
+ > The files browser allows the user to go in the Agent Zero root folder if you click the `Up` button, but the working directory of Agents will always be `/work_dir`
239
+ >
240
+ - **File Operations**:
241
+ - Create new files and directories
242
+ - Delete existing files and directories
243
+ - Download files to your local system
244
+ - Upload files from your local system
245
+ - **File Information**:
246
+ - Visual indicators for file types (folders, code files, documents)
247
+ - Size information in human-readable format
248
+ - Last modification timestamps
249
+ - **Bulk Operations**:
250
+ - Upload multiple files simultaneously
251
+ - Select and manage multiple files at once
252
 
253
  > [!TIP]
254
+ > The File Browser integrates seamlessly with Agent Zero's capabilities. You can reference files directly in your conversations, and the agent can help you manage, modify, and organize your files.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
knowledge/default/main/about/github_readme.md CHANGED
@@ -3,15 +3,15 @@
3
  [![Join our Skool Community](https://img.shields.io/badge/Skool-Join%20our%20Community-4A90E2?style=for-the-badge&logo=skool&logoColor=white)](https://www.skool.com/agent-zero) [![Join our Discord](https://img.shields.io/badge/Discord-Join%20our%20server-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/B8KZKNsPpj) [![Subscribe on YouTube](https://img.shields.io/badge/YouTube-Subscribe-red?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@AgentZeroFW) [![Connect on LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/jan-tomasek/) [![Follow on X.com](https://img.shields.io/badge/X.com-Follow-1DA1F2?style=for-the-badge&logo=x&logoColor=white)](https://x.com/JanTomasekDev)
4
 
5
 
6
- [![Intro Video](/docs/res/intro_vid.jpg)](https://www.youtube.com/watch?v=C9n8zFpaV3I)
7
 
8
  **Personal and organic AI framework**
9
  - Agent Zero is not a predefined agentic framework. It is designed to be dynamic, organically growing, and learning as you use it.
10
  - Agent Zero is fully transparent, readable, comprehensible, customizable and interactive.
11
  - Agent Zero uses the computer as a tool to accomplish its (your) tasks.
12
 
13
- ## Now with UI:
14
- ![UI prototype](/docs/res/ui_screen1.png)
15
 
16
  ## Key concepts
17
  1. **General-purpose assistant**
@@ -23,6 +23,10 @@
23
  - 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.
24
  - Tool usage functionality has been developed from scratch to be the most compatible and reliable, even with very small models.
25
 
 
 
 
 
26
  3. **Multi-agent cooperation**
27
  - Every agent has a superior agent giving it tasks and instructions. Every agent then reports back to its superior.
28
  - In the case of the first agent in the chain (Agent 0), the superior is the human user; the agent sees no difference.
@@ -51,9 +55,11 @@
51
  - No coding is required, only prompting and communication skills.
52
  - With a solid system prompt, the framework is reliable even with small models, including precise tool usage.
53
 
 
 
54
  ## Keep in mind
55
  1. **Agent Zero can be dangerous!**
56
- 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.
57
 
58
  2. **Agent Zero is not pre-programmed; it is prompt-based.**
59
  The whole framework contains only a minimal amount of code and does not guide the agent in any way.
@@ -64,26 +70,63 @@ If your agent fails to communicate properly, use tools, reason, use memory, find
64
  Agent Zero is made to be used in an isolated virtual environment (for safety) with some tools preinstalled and configured.
65
  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.
66
 
67
-
68
  [![David Ondrej video](/docs/res/david_vid.jpg)](https://www.youtube.com/watch?v=_Pionjv4hGc)
69
 
70
  ## Known problems
71
  1. The system prompt sucks. You can do better. If you do, help me please :)
72
- 2. The communication between agent 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.
73
- 3. 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.
74
 
75
  ## Ideal environment
76
- - **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).
77
  - **Python**: Python has to be installed on the system to run the framework.
78
  - **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.
79
 
80
  ![Time example](/docs/res/time_example.jpg)
81
 
82
  ## Setup
83
-
84
- A detailed setup guide with a video can be found here: [/docs/installation](https://github.com/frdel/agent-zero/tree/main/docs/installation). Scroll down to see the readme file.
85
-
86
- > ⚠️ **Changes to launch files since v0.6:**
87
- > main.py file has been replaced with run_ui.py (webui) and run_cli.py (terminal) launch files.
88
- > configuration has been moved to initialize.py for both webui and terminal launch files.
89
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  [![Join our Skool Community](https://img.shields.io/badge/Skool-Join%20our%20Community-4A90E2?style=for-the-badge&logo=skool&logoColor=white)](https://www.skool.com/agent-zero) [![Join our Discord](https://img.shields.io/badge/Discord-Join%20our%20server-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/B8KZKNsPpj) [![Subscribe on YouTube](https://img.shields.io/badge/YouTube-Subscribe-red?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@AgentZeroFW) [![Connect on LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/jan-tomasek/) [![Follow on X.com](https://img.shields.io/badge/X.com-Follow-1DA1F2?style=for-the-badge&logo=x&logoColor=white)](https://x.com/JanTomasekDev)
4
 
5
 
6
+ [![Intro Video](/docs/res/new_vid.jpg)](https://www.youtube.com/watch?v=U_Gl0NPalKA)
7
 
8
  **Personal and organic AI framework**
9
  - Agent Zero is not a predefined agentic framework. It is designed to be dynamic, organically growing, and learning as you use it.
10
  - Agent Zero is fully transparent, readable, comprehensible, customizable and interactive.
11
  - Agent Zero uses the computer as a tool to accomplish its (your) tasks.
12
 
13
+ ## Now fully Dockerized, fully UI, with TTS and STT:
14
+ ![Web UI](/docs/res/win_webui2.gif)
15
 
16
  ## Key concepts
17
  1. **General-purpose assistant**
 
23
  - 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.
24
  - Tool usage functionality has been developed from scratch to be the most compatible and reliable, even with very small models.
25
 
26
+ * **Default Tools:** Agent Zero includes tools like knowledge, webpage content, code execution, and communication.
27
+ * **Creating Custom Tools:** Extend Agent Zero's functionality by creating your own custom tools.
28
+ * **Instruments:** Instruments are a new type of tool that allow you to create custom functions and procedures that can be called by Agent Zero.
29
+
30
  3. **Multi-agent cooperation**
31
  - Every agent has a superior agent giving it tasks and instructions. Every agent then reports back to its superior.
32
  - In the case of the first agent in the chain (Agent 0), the superior is the human user; the agent sees no difference.
 
55
  - No coding is required, only prompting and communication skills.
56
  - With a solid system prompt, the framework is reliable even with small models, including precise tool usage.
57
 
58
+ ![Agent 1 System Load](/docs/res/ui_screen.png)
59
+
60
  ## Keep in mind
61
  1. **Agent Zero can be dangerous!**
62
+ 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 one provided with Docker) and be careful what you wish for.
63
 
64
  2. **Agent Zero is not pre-programmed; it is prompt-based.**
65
  The whole framework contains only a minimal amount of code and does not guide the agent in any way.
 
70
  Agent Zero is made to be used in an isolated virtual environment (for safety) with some tools preinstalled and configured.
71
  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.
72
 
 
73
  [![David Ondrej video](/docs/res/david_vid.jpg)](https://www.youtube.com/watch?v=_Pionjv4hGc)
74
 
75
  ## Known problems
76
  1. The system prompt sucks. You can do better. If you do, help me please :)
77
+ 2. 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.
78
+ 3. 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.
79
 
80
  ## Ideal environment
81
+ - **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).
82
  - **Python**: Python has to be installed on the system to run the framework.
83
  - **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.
84
 
85
  ![Time example](/docs/res/time_example.jpg)
86
 
87
  ## Setup
88
+ A detailed setup guide for Windows, macOS and Linux with a video can be found in the new Agent Zero Documentation at [this page](docs/installation.md#windows-macos-and-linux-setup-guide).
89
+
90
+ You can download the executable for your system from the [releases page](https://github.com/frdel/agent-zero/releases).
91
+
92
+ ## Consult the Documentation
93
+ 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](docs/README.md) to see the Documentation.
94
+
95
+ ## Coming up
96
+ - **User interaction refinements**
97
+ - **Browser use and RAG tools**
98
+
99
+ ### Changelog [since version 0.7]
100
+
101
+ #### v0.7.1
102
+ - **Preinstalled binaries and bundler scripts**
103
+ - **Persistent Chats** - Serialized to /tmp/chats and automatically loaded in run_ui.py on startup
104
+ - **Documentation stack merged into the repository**
105
+ - **Bug Fixes**
106
+
107
+ > [!NOTE]
108
+ > **Changes to frdel/agent-zero Docker image since v0.8:**
109
+ > - In version 0.8, the Docker image has changed to frdel/agent-zero-run using the new Dockerfile.
110
+
111
+ #### v0.8
112
+ - **Docker runtime**
113
+ - **New messages history and summarization system**
114
+ - **Agent behavior change and management**
115
+ - **Text-to-Speech (TTS) and Speech-to-Text (STT)**
116
+ - **Settings page in Web UI**
117
+ - **SearXNG integration replacing Perplexity + DuckDuckGo knowledge_tool**
118
+ - **File browser functionality**
119
+ - **KaTeX math visualization support**
120
+ - **In-chat file attachments**
121
+
122
+ #### v0.7
123
+ - **Automatic memory**
124
+ - **UI improvements**
125
+ - **Instruments**
126
+ - **Extensions framework**
127
+ - **Reflection prompts**
128
+ - **Bugfixes**
129
+
130
+ > [!NOTE]
131
+ > **Changes to launch files since v0.7:**
132
+ > - the Docker image has been changed to frdel/agent-zero-run from the legacy installation process.
knowledge/default/main/about/installation.md CHANGED
@@ -1,95 +1,371 @@
1
- # How to install Agent Zero on Windows and MacOS
2
- - Agent Zero is not an app. It's a framework. It's made to be customized, edited, enhanced. Therefore you need to install the necessary components to run it.
3
- - I will provide step by step instructions along with a video for this tutorial on how to make Agent Zero work on Windows and MacOS.
4
 
5
- [![Video](thumb_play.png)](https://youtu.be/8H7mFsvxKYQ)
6
 
7
- ## Reminders:
8
- 1. You don't need to install Python, Conda will take care of that for you.
9
- 2. You don't need API keys, Agent Zero can run with local models, but for this tutorial I will leave it to the default OpenAI API. Local models will be covered in another tutorial.
10
- 3. You don't need Visual Studio Code or any other code editor, but it's easier to navigate and edit files if you have one.
11
- 4. Docker is not mandatory, but running Agent Zero without docker is actually more complicated and can be very dangerous, so I will be showing the easier and recommended way to do it - with Docker Desktop application.
12
- 5. Git/Github is not mandatory, you can download the framework files in browser. I will not be showing how to use Git in this tutorial.
13
 
 
14
 
15
- ## 1. Install Conda (miniconda)
16
- - Conda is a python environment manager, it will help you keep your projects and installations separated. Full Conda has many more features, but you only need "miniconda".
17
 
18
- 1. Go to the download page of miniconda [here](https://docs.anaconda.com/miniconda/#miniconda-latest-installer-links). If the link does not work, just search the web for "miniconda download".
19
- 2. Based on your operating system, download the right installer of miniconda. For MacOS select the version with "pkg" at the end.
 
 
20
 
21
- <img src="image-1.png" alt="miniconda download win" width="500"/>
22
- <img src="image-5.png" alt="miniconda download macos" width="500"/>
23
- <br><br>
24
 
25
- 3. Run the installer and go through the installation process, here you can leave everything to default and just click Next, Next... The same goes for MacOS with the "pkg" graphical installer.
26
 
27
- <img src="image.png" alt="miniconda install" width="200"/>
28
- <img src="image-2.png" alt="miniconda install" width="200"/>
29
- <img src="image-3.png" alt="miniconda install" width="200"/>
30
- <img src="image-4.png" alt="miniconda install" width="200"/>
31
  <br><br>
32
 
33
- 4. After the installation is complete, you should have "Anaconda Powershell Prompt" installed on your Windows machine. On MacOS, when you open the Terminal application in your Applications folder and type "conda --version", you should see the version installed.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
- <img src="image-6.png" alt="miniconda installed" height="100"/>
36
- <img src="image-7.png" alt="miniconda installed" height="100"/>
 
 
37
  <br><br>
38
 
39
- ## 2. Install Docker (Docker Desktop application)
40
- - Simply put, Docker is a way of running virtual computers on your machine. These are lightweight, disposable and isolated from your operating system, so it is a way to sandbox Agent Zero.
41
- - Agent Zero only connects to the Docker container when it needs to execute code and commands. The frameworks itself runs on your machine.
42
- - Running Agent Zero without docker is possible, but more complicated and dangerous, I will not be covering that in this tutorial.
43
- - Docker has a desktop application with GUI for all major operating system, so I will be using that.
44
 
45
- 1. Go to the download page of Docker Desktop [here](https://www.docker.com/products/docker-desktop/). If the link does not work, just search the web for "docker desktop download".
46
- 2. Download the version for your operating system. Don't be tricked by the seemingly missing windows intel/amd version, it's the button itself, not in the dropdown menu.
 
47
 
48
- <img src="image-8.png" alt="docker download" width="200"/>
49
- <br><br>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
- 3. Run the installer and go through the installattion process. It should be even shorter than Conda installation, you can leave everything to default. On MacOS, the installer is a "dmg" image, so just drag and drop the application to your Applications folder like always.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
- <img src="image-9.png" alt="docker install" width="300"/>
54
- <img src="image-10.png" alt="docker install" width="300"/>
55
 
56
- <img src="image-12.png" alt="docker install" width="300"/>
 
57
  <br><br>
58
 
 
59
 
60
- 4. Once installed, you should see Docker Desktop application on your Windows/Mac machine.
 
 
 
 
61
 
62
- <img src="image-11.png" alt="docker installed" height="100"/>
63
- <img src="image-13.png" alt="docker installed" height="100"/>
 
 
64
  <br><br>
65
 
66
- 5. Create account in the application.
67
- No need to create images or containers, the framework will do that for you. However, this requires you to be signed in to the Docker Hub, so create a free account in the Docker Desktop application, you will be prompted when the application first runs.
68
 
69
- ## 3. Download Agent Zero
70
- - You can clone the Agent Zero repository (https://github.com/frdel/agent-zero) from GitHub if you know how to use git. In this tutorial I will just show how to download the files.
71
 
72
  1. Go to the Agent Zero releases [here](https://github.com/frdel/agent-zero/releases).
73
  2. The latest release is on the top of the list, click the "Source Code (zip)" button under "Assets" to download it.
74
 
75
- <img src="image-14.png" alt="agent zero download" width="500"/>
76
  <br><br>
77
 
78
- 3. Extract the downloaded archive where you want to have it. I will extract them to "agent-zero" folder on my Desktop - "C:\Users\frdel\Desktop\agent-zero" on Windows and "/Users/frdel/Desktop/agent-zero" on MacOS.
79
 
80
-
81
- ## 4. Set up Conda environment
82
  - Now that we have the project files and Conda, we can create **virtual Python environment** for this project, activate it and install requirements.
83
 
84
- 1. Open your **"Anaconda Powershell Prompt"** application on windows or **"Terminal"** application on MacOS.
85
  2. In the terminal, navigate to your Agent Zero folder using **"cd"** command. Replace the path with your actual Agent Zero folder path.
86
  ~~~
87
  cd C:\Users\frdel\Desktop\agent-zero
88
  ~~~
89
  You should see your folder has changed on the next terminal line.
90
 
91
- <img src="image-15.png" alt="agent zero cd" height="100"/>
92
- <img src="image-16.png" alt="agent zero cd" height="100"/>
93
  <br><br>
94
 
95
  3. Create Conda environment using command **"conda create"**. After **"-n"** is your environment name, you can choose your own, i will use **"a0"** - short for Agent Zero. After **"python"** is the Python version that Conda will install for you into this environment, right now, 3.12 works fine. **-y** skips confirmations.
@@ -103,11 +379,13 @@ conda activate a0
103
  ~~~
104
  And you should see that the **(base)** on the left has changed to **(a0)**. This means that this terminal now uses the new **a0** virtual environment and all packages will be installed into this environment.
105
 
106
- <img src="image-17.png" alt="conda env" height="200"/>
107
- <img src="image-18.png" alt="conda env" height="200"/>
108
  <br><br>
109
 
110
- > ⚠️ If you open a new terminal window, you will need to activate the environment with "conda activate a0" again for that window.
 
 
111
 
112
  5. Install requirements using **"pip"**. Pip is a Python package manager. We can install all required packages from requirements.txt file using command:
113
  ~~~
@@ -115,40 +393,148 @@ pip install -r requirements.txt
115
  ~~~
116
  This might take some time. If you get any errors regarding version conflicts and compatibility, double check that your environment is activated and that you created that environment with the correct Python version.
117
 
118
- <img src="image-19.png" alt="conda reqs" height="200"/>
119
  <br><br>
120
 
121
- ## 5. Configure Agent Zero
122
- - Now we can configure Agent Zero - select models, settings, API Keys etc.
123
- - I will leave the default configuration using OpenAI API and I will just provide my OpenAI API key in the **.env** file.
 
124
 
125
- 1. Find the **"example.env"** file in your Agent Zero folder and edit the contents. I will put my OpenAI API key after **"API_KEY_OPENAI="**. If you have API keys for other service providers, add them as needed.
126
- 2. Rename the **"example.env"** file to **".env"**. This is important, only this exact "**.env**" file name is valid.
127
 
128
- <img src="image-20.png" alt="conda reqs" height="200"/>
129
  <br><br>
130
 
131
- 3. (Optional) Change models or setting in **"initialize.py"** file if needed.
132
 
133
- ## 6. Run Agent Zero
134
- - Setup done. It's time to test Agent Zero. Let's double check:
135
 
136
- 1. Make sure you have the **"a0"** Conda environment still active in your current terminal window. You can see that on the left of each terminal line like **(a0)** or **(base)**. If not, activate again with **"conda activate a0"** command again.
137
- 2. Make sure your terminal is looking into the Agent Zero folder. If not, navigate to it with **"cd"** command again with your path.
138
- 3. Run the **Docker Desktop application** you installed and just leave it running in the background. No need to create images or containers, the framework will do that for you. However, this requires you to be signed in to the Docker Hub, so sign in in the Docker Desktop application, if you haven't already.
139
- 4. Run the Agent Zero with Web UI:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  ~~~
141
  python run_ui.py
142
  ~~~
143
 
144
- <img src="image-21.png" alt="run ui" height="200"/>
145
  <br><br>
146
 
147
- 5. Open the URL shown in terminal in your web browser. You should see the Agent Zero interface. The first time it needs to execute code, Docker image will be downloaded and deployed, this might take some time. Be patient when seeing "Initializing docker container agent-zero-exe for safe code execution...".
148
 
149
- <img src="image-22.png" alt="run ui" width="400"/>
150
- <img src="image-23.png" alt="run ui" width="400"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  <br><br>
152
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
 
 
 
154
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Users installation guide for Windows, macOS and Linux
 
 
2
 
3
+ [![Setup Guide](res/setup/thumb_setup.png)](https://www.youtube.com/watch?v=wWAqJpl3uQE)
4
 
5
+ The following user guide provides instructions for installing and running Agent Zero using Docker, which is the primary runtime environment for the framework. For developers and contributors, we also provide instructions for setting up the [full development environment](#in-depth-guide-for-full-binaries-installation).
 
 
 
 
 
6
 
7
+ ### Maybe you're looking for this? 👉[How to update Agent Zero](#how-to-update-agent-zero)
8
 
9
+ ## Windows, macOS and Linux Setup Guide
 
10
 
11
+ 1. **Install Docker Desktop:**
12
+ - Docker Desktop provides the runtime environment for Agent Zero, ensuring consistent behavior and security across platforms
13
+ - The entire framework runs within a Docker container, providing isolation and easy deployment
14
+ - Available as a user-friendly GUI application for all major operating systems
15
 
16
+ 1.1. Go to the download page of Docker Desktop [here](https://www.docker.com/products/docker-desktop/). If the link does not work, just search the web for "docker desktop download".
 
 
17
 
18
+ 1.2. Download the version for your operating system. For Windows users, the Intel/AMD version is the main download button.
19
 
20
+ <img src="res/setup/image-8.png" alt="docker download" width="200"/>
 
 
 
21
  <br><br>
22
 
23
+ > [!NOTE]
24
+ > **Linux Users:** You can install either Docker Desktop or docker-ce (Community Edition).
25
+ > For Docker Desktop, follow the instructions for your specific Linux distribution [here](https://docs.docker.com/desktop/install/linux-install/).
26
+ > For docker-ce, follow the instructions [here](https://docs.docker.com/engine/install/).
27
+ >
28
+ > If you're using docker-ce, you'll need to add your user to the `docker` group:
29
+ > ```bash
30
+ > sudo usermod -aG docker $USER
31
+ > ```
32
+ > Log out and back in, then run:
33
+ > ```bash
34
+ > docker login
35
+ > ```
36
+
37
+ 1.3. Run the installer with default settings. On macOS, drag and drop the application to your Applications folder.
38
+
39
+ <img src="res/setup/image-9.png" alt="docker install" width="300"/>
40
+ <img src="res/setup/image-10.png" alt="docker install" width="300"/>
41
+
42
+ <img src="res/setup/image-12.png" alt="docker install" width="300"/>
43
+ <br><br>
44
 
45
+ 1.4. Once installed, launch Docker Desktop:
46
+
47
+ <img src="res/setup/image-11.png" alt="docker installed" height="100"/>
48
+ <img src="res/setup/image-13.png" alt="docker installed" height="100"/>
49
  <br><br>
50
 
51
+ 1.5. Create a Docker Hub account when prompted and sign in. This is required to pull the Agent Zero container image.
 
 
 
 
52
 
53
+ > [!IMPORTANT]
54
+ > **macOS Configuration:** In Docker Desktop's preferences (Docker menu) Settings
55
+ > Advanced, enable "Allow the default Docker socket to be used (requires password)."
56
 
57
+ ![docker socket macOS](res/setup/macsocket.png)
58
+
59
+ 2. **Run Agent Zero:**
60
+
61
+ 2.1. Pull the Agent Zero Docker image:
62
+ - Search for `frdel/agent-zero-run` in Docker Desktop
63
+ - Click the `Pull` button
64
+ - The image will be downloaded to your machine in a few minutes
65
+
66
+ ![docker pull](res/setup/1-docker-image-search.png)
67
+
68
+ > [!TIP]
69
+ > Alternatively, run the following command in your terminal:
70
+ >
71
+ > ```bash
72
+ > docker pull frdel/agent-zero-run
73
+ > ```
74
+
75
+ 2.2. Create a data directory for persistence:
76
+ - Choose or create a directory on your machine where you want to store Agent Zero's data
77
+ - This can be any location you prefer (e.g., `C:/agent-zero-data` or `/home/user/agent-zero-data`)
78
+ - This directory will contain all your Agent Zero files, like the legacy root folder structure:
79
+ - `/memory` - Agent's memory and learned information
80
+ - `/knowledge` - Knowledge base
81
+ - `/instruments` - Instruments and functions
82
+ - `/prompts` - Prompt files
83
+ - `/work_dir` - Working directory
84
+ - `.env` - Your API keys
85
+ - `settings.json` - Your Agent Zero settings
86
+
87
+ > [!TIP]
88
+ > Choose a location that's easy to access and backup. All your Agent Zero data
89
+ > will be directly accessible in this directory.
90
+
91
+ 2.3. Run the container:
92
+ - In Docker Desktop, go back to the "Images" tab
93
+ - Click the `Run` button next to the `frdel/agent-zero-run` image
94
+ - Open the "Optional settings" menu
95
+ - Set the port to `0` in the second "Host port" field (for automatic port assignment)
96
+ - Under "Volumes", configure:
97
+ - Host path: Your chosen directory (e.g., `C:\agent-zero-data`)
98
+ - Container path: `/a0`
99
 
100
+ ![docker port mapping](res/setup/3-docker-port-mapping.png)
101
+
102
+ - Click the `Run` button in the "Images" tab.
103
+ - The container will start and show in the "Containers" tab
104
+
105
+ ![docker containers](res/setup/4-docker-container-started.png)
106
+
107
+ > [!TIP]
108
+ > Alternatively, run the following command in your terminal:
109
+ > ```bash
110
+ > docker run -p $PORT:80 -v /path/to/your/data:/a0 frdel/agent-zero-run
111
+ > ```
112
+ > - Replace `$PORT` with the port you want to use (e.g., `50080`)
113
+ > - Replace `/path/to/your/data` with your chosen directory path
114
+
115
+ 2.4. Access the Web UI:
116
+ - The framework will take a few seconds to initialize and the Docker logs will look like the image below.
117
+ - Find the mapped port in Docker Desktop (shown as `<PORT>:80`) or click the port right under the container ID as shown in the image below
118
+
119
+ ![docker logs](res/setup/5-docker-click-to-open.png)
120
+
121
+ - Open `http://localhost:<PORT>` in your browser
122
+ - The Web UI will open. Agent Zero is ready for configuration!
123
+
124
+ ![docker ui](res/setup/6-docker-a0-running.png)
125
+
126
+ > [!TIP]
127
+ > You can also access the Web UI by clicking the ports right under the container ID in Docker Desktop.
128
+
129
+ > [!NOTE]
130
+ > After starting the container, you'll find all Agent Zero files in your chosen
131
+ > directory. You can access and edit these files directly on your machine, and
132
+ > the changes will be immediately reflected in the running container.
133
+
134
+ 3. Configure Agent Zero
135
+ - Refer to the following sections for a full guide on how to configure Agent Zero.
136
+
137
+ ## Settings Configuration
138
+ Agent Zero provides a comprehensive settings interface to customize various aspects of its functionality. Access the settings by clicking the "Settings"button with a gear icon in the sidebar.
139
+
140
+ ### Agent Configuration
141
+ - **Prompts Subdirectory:** Choose the subdirectory within `/prompts` for agent behavior customization. The 'default' directory contains the standard prompts.
142
+ - **Memory Subdirectory:** Select the subdirectory for agent memory storage, allowing separation between different instances.
143
+ - **Knowledge Subdirectory:** Specify the location of custom knowledge files to enhance the agent's understanding.
144
+
145
+ ![settings](res/setup/settings/1-agentConfig.png)
146
+
147
+ ### Chat Model Settings
148
+ - **Provider:** Select the chat model provider (e.g., Ollama)
149
+ - **Model Name:** Choose the specific model (e.g., llama3.2)
150
+ - **Temperature:** Adjust response randomness (0 for deterministic, higher values for more creative responses)
151
+ - **Context Length:** Set the maximum token limit for context window
152
+ - **Context Window Space:** Configure how much of the context window is dedicated to chat history
153
+
154
+ ![chat model settings](res/setup/settings/2-chat-model.png)
155
+
156
+ ### Utility Model Configuration
157
+ - **Provider & Model:** Select a smaller, faster model for utility tasks like memory organization and summarization
158
+ - **Temperature:** Adjust the determinism of utility responses
159
+
160
+ ### Embedding Model Settings
161
+ - **Provider:** Choose the embedding model provider (e.g., OpenAI)
162
+ - **Model Name:** Select the specific embedding model (e.g., text-embedding-3-small)
163
+
164
+ ### Speech to Text Options
165
+ - **Model Size:** Choose the speech recognition model size
166
+ - **Language Code:** Set the primary language for voice recognition
167
+ - **Silence Settings:** Configure silence threshold, duration, and timeout parameters for voice input
168
+
169
+ ### API Keys
170
+ - Configure API keys for various service providers
171
+
172
+ ### Authentication
173
+ - **UI Login:** Set username for web interface access
174
+ - **UI Password:** Configure password for web interface security
175
+ - **Root Password:** Manage Docker container root password for SSH access
176
+
177
+ ![settings](res/setup/settings/3-auth.png)
178
+
179
+ ### Development Settings
180
+ - **RFC Parameters (local instances only):** configure URLs and ports for remote function calls between instances
181
+ - **RFC Password:** Configure password for remote function calls
182
+ Learn more about Remote Function Calls and their purpose [here](#7-configure-agent-zero-rfc).
183
+
184
+ > [!IMPORTANT]
185
+ > Always keep your API keys and passwords secure.
186
+
187
+ # Choosing Your LLMs
188
+ The Settings page is the control center for selecting the Large Language Models (LLMs) that power Agent Zero. You can choose different LLMs for different roles:
189
+
190
+ | LLM Role | Description |
191
+ | --- | --- |
192
+ | `chat_llm` | This is the primary LLM used for conversations and generating responses. |
193
+ | `utility_llm` | This LLM handles internal tasks like summarizing messages, managing memory, and processing internal prompts. Using a smaller, less expensive model here can improve efficiency. |
194
+ | `embedding_llm` | This LLM is responsible for generating embeddings used for memory retrieval and knowledge base lookups. Changing the `embedding_llm` will re-index all of A0's memory. |
195
+
196
+ **How to Change:**
197
+ 1. Open Settings page in the Web UI.
198
+ 2. Change the LLM for each role (Chat model, Utility model, Embedding model).
199
+ 3. Click "Save" to apply the changes.
200
+
201
+ ## Important Considerations
202
+
203
+ > [!CAUTION]
204
+ > Changing the `embedding_llm` will re-index all the memory and knowledge, and
205
+ > requires clearing the `memory` folder to avoid errors, as the embeddings can't be
206
+ > mixed in the vector database. Note that this will DELETE ALL of Agent Zero's memory.
207
+
208
+ - Experiment with different model combinations to find the balance of performance and cost that best suits your needs. E.g., faster and lower latency LLMs will help, and you can also use `faiss_gpu` instead of `faiss_cpu` for the memory.
209
+
210
+ ## Using Agent Zero on your mobile device
211
+ Agent Zero's Web UI is accessible from any device on your network through the Docker container:
212
+
213
+ 1. The Docker container automatically exposes the Web UI on all network interfaces
214
+ 2. Find the mapped port in Docker Desktop:
215
+ - Look under the container name (usually in the format `<PORT>:80`)
216
+ - For example, if you see `32771:80`, your port is `32771`
217
+ 3. Access the Web UI from any device using:
218
+ - Local access: `http://localhost:<PORT>`
219
+ - Network access: `http://<YOUR_COMPUTER_IP>:<PORT>`
220
+
221
+ > [!TIP]
222
+ > - Your computer's IP address is usually in the format `192.168.x.x` or `10.0.x.x`
223
+ > - You can find your external IP address by running `ipconfig` (Windows) or `ifconfig` (Linux/Mac)
224
+ > - The port is automatically assigned by Docker unless you specify one
225
+
226
+ > [!NOTE]
227
+ > If you're running Agent Zero directly on your system (legacy approach) instead of
228
+ > using Docker, you'll need to configure the host manually in `run_ui.py` to run on all interfaces using `host="0.0.0.0"`.
229
+
230
+ For developers or users who need to run Agent Zero directly on their system,see the [In-Depth Guide for Full Binaries Installation](#in-depth-guide-for-full-binaries-installation).
231
+
232
+ ### How to update Agent Zero
233
+
234
+ 1. **If you come from the previous version of Agent Zero (pre-0.7.1):**
235
+ - Your data is safely stored across various directories and files inside the Agent Zero folder.
236
+ - To update to the new Docker runtime version, you need to save the following files and directories:
237
+ - `/memory` - Agent's memory
238
+ - `/knowledge` - Custom knowledge base
239
+ - `/instruments` - Custom instruments and functions
240
+ - `/prompts` - Custom prompts files (if any has been created)
241
+ - `/work_dir` - Working directory
242
+ - `.env` - Your API keys
243
+ - `/tmp/settings.json` - Your Agent Zero settings
244
+ - Once you have saved these files and directories, you can proceed with the Docker runtime [installation instructions above](#windows-macos-and-linux-setup-guide) setup guide.
245
+ - Reach for the folder where you saved your data and copy it to the new Agent Zero folder set during the installation process.
246
+ - Agent Zero will automatically detect your saved data and use it across memory, knowledge, instruments, prompts and settings.
247
+
248
+ > [!IMPORTANT]
249
+ > Make sure to use the same embedding model you were using before, otherwise
250
+ > you will have to re-index all of Agent Zero's memory, therefore deleting all
251
+ > your custom knowledge and memory.
252
+
253
+ > [!NOTE]
254
+ > If you have issues loading your settings, you can try to delete the `/tmp/settings.json`
255
+ > file and let Agent Zero generate a new one.
256
+
257
+ 2. **Update Process (Docker Desktop)**
258
+ - Go to Docker Desktop and stop the container from the "Containers" tab
259
+ - Right-click and select "Remove" to remove the container
260
+ - Go to "Images" tab and remove the `frdel/agent-zero-run` image
261
+
262
+ ![docker delete image](res/setup/docker-delete-image-1.png)
263
+
264
+ - Search and pull the new image
265
+ - Run the new container with the same volume settings as the old one
266
+
267
+ > [!IMPORTANT]
268
+ > Make sure to use the same volume mount path when running the new
269
+ > container to preserve your data. The exact path depends on where you stored
270
+ > your Agent Zero data directory (the chosen directory on your machine).
271
+
272
+ > [!TIP]
273
+ > Alternatively, run the following commands in your terminal:
274
+ >
275
+ > ```bash
276
+ > # Stop the current container
277
+ > docker stop agent-zero
278
+ >
279
+ > # Remove the container (data is safe in the folder)
280
+ > docker rm agent-zero
281
+ >
282
+ > # Remove the old image
283
+ > docker rmi frdel/agent-zero-run
284
+ >
285
+ > # Pull the latest image
286
+ > docker pull frdel/agent-zero-run
287
+ >
288
+ > # Run new container with the same volume mount
289
+ > docker run -p $PORT:80 -v /path/to/your/data:/a0 frdel/agent-zero-run
290
+ > ```
291
+
292
+ 3. **Full Binaries**
293
+ - Using Git/GitHub: Pull the latest version of the Agent Zero repository with. The custom knowledge, solutions, memory, and other data will get ignored, so you don't need to worry about losing any of your custom data. The same goes for your .env file with all of your API keys and settings.json.
294
+
295
+ > [!WARNING]
296
+ > - If you update manually, beware: save your .env file with the API keys, and look for new dependencies in requirements.txt.
297
+ > - If any changes are made to the requirements of the updated version, you have to execute this command inside the a0 conda env after activating it:
298
+ > ```bash
299
+ > pip install -r requirements.txt
300
+
301
+ # In-Depth Guide for Full Binaries Installation
302
+ - Agent Zero is a framework. It's made to be customized, edited, enhanced. Therefore you need to install the necessary components to run it when downloading its full binaries. This guide will help you to do so.
303
+ - The following step by step instructions can be followed along with a video for this tutorial on how to make Agent Zero work with its full development environment.
304
+
305
+ [![Video](res/setup/thumb_play.png)](https://youtu.be/8H7mFsvxKYQ)
306
+
307
+ ## Reminders:
308
+ 1. There's no need to install Python, Conda will manage that for you.
309
+ 2. You don't necessarily need API keys: Agent Zero can run with local models. For this tutorial though, we will leave it to the default OpenAI API. A guide for downloading Ollama along with local models is available [here](#installing-and-using-ollama-local-models).
310
+ 3. Visual Studio Code or any other code editor is not mandatory, but it makes it easier to navigate and edit files.
311
+ 4. Git/GitHub is not mandatory, you can download the framework files through your browser. We will not be showing how to use Git in this tutorial.
312
+ 5. Docker is not mandatory for the full binaries installation, since the framework will run on your machine connecting to the Docker container through the Web UI RFC functionality.
313
+ 6. Running Agent Zero without Docker makes the process more complicated and it's thought for developers and contributors.
314
+
315
+ > [!IMPORTANT]
316
+ > Linux instructions are provided as general instructions for any Linux distribution. If you're using a distribution other than Debian/Ubuntu, you may need to adjust the instructions accordingly.
317
+ >
318
+ > For Debian/Ubuntu, just follow the macOS instructions, as they are the same.
319
+
320
+ ## 1. Install Conda (miniconda)
321
+ - Conda is a Python environment manager, it will help you keep your projects and installations separated.
322
+ - It's a lightweight version of Anaconda that includes only conda, Python, the packages they depend on, and a small number of other useful packages, including pip, zlib and a few others.
323
 
324
+ 1. Go to the download page of miniconda [here](https://docs.anaconda.com/miniconda/#miniconda-latest-installer-links). If the link does not work, just search the web for "miniconda download".
325
+ 2. Based on your operating system, download the right installer of miniconda. For macOS select the version with "pkg" at the end.
326
 
327
+ <img src="res/setup/image-1.png" alt="miniconda download win" width="500"/>
328
+ <img src="res/setup/image-5.png" alt="miniconda download macos" width="500"/>
329
  <br><br>
330
 
331
+ 3. Run the installer and go through the installation process, here you can leave everything to default and just click Next, Next... The same goes for macOS with the "pkg" graphical installer.
332
 
333
+ <img src="res/setup/image.png" alt="miniconda install" width="200"/>
334
+ <img src="res/setup/image-2.png" alt="miniconda install" width="200"/>
335
+ <img src="res/setup/image-3.png" alt="miniconda install" width="200"/>
336
+ <img src="res/setup/image-4.png" alt="miniconda install" width="200"/>
337
+ <br><br>
338
 
339
+ 4. After the installation is complete, you should have "Anaconda Powershell Prompt" installed on your Windows machine. On macOS, when you open the Terminal application in your Applications folder and type "conda --version", you should see the version installed.
340
+
341
+ <img src="res/setup/image-6.png" alt="miniconda installed" height="100"/>
342
+ <img src="res/setup/image-7.png" alt="miniconda installed" height="100"/>
343
  <br><br>
344
 
 
 
345
 
346
+ ## 2. Download Agent Zero
347
+ - You can clone the Agent Zero repository (https://github.com/frdel/agent-zero) from GitHub if you know how to use Git. In this tutorial I will just show how to download the files.
348
 
349
  1. Go to the Agent Zero releases [here](https://github.com/frdel/agent-zero/releases).
350
  2. The latest release is on the top of the list, click the "Source Code (zip)" button under "Assets" to download it.
351
 
352
+ <img src="res/setup/image-14-u.png" alt="agent zero download" width="500"/>
353
  <br><br>
354
 
355
+ 3. Extract the downloaded archive where you want to have it. I will extract them to "agent-zero" folder on my Desktop - "C:\Users\frdel\Desktop\agent-zero" on Windows and "/Users/frdel/Desktop/agent-zero" on macOS.
356
 
357
+ ## 3. Set up Conda environment
 
358
  - Now that we have the project files and Conda, we can create **virtual Python environment** for this project, activate it and install requirements.
359
 
360
+ 1. Open your **"Anaconda Powershell Prompt"** application on windows or **"Terminal"** application on macOS.
361
  2. In the terminal, navigate to your Agent Zero folder using **"cd"** command. Replace the path with your actual Agent Zero folder path.
362
  ~~~
363
  cd C:\Users\frdel\Desktop\agent-zero
364
  ~~~
365
  You should see your folder has changed on the next terminal line.
366
 
367
+ <img src="res/setup/image-15.png" alt="agent zero cd" height="100"/>
368
+ <img src="res/setup/image-16.png" alt="agent zero cd" height="100"/>
369
  <br><br>
370
 
371
  3. Create Conda environment using command **"conda create"**. After **"-n"** is your environment name, you can choose your own, i will use **"a0"** - short for Agent Zero. After **"python"** is the Python version that Conda will install for you into this environment, right now, 3.12 works fine. **-y** skips confirmations.
 
379
  ~~~
380
  And you should see that the **(base)** on the left has changed to **(a0)**. This means that this terminal now uses the new **a0** virtual environment and all packages will be installed into this environment.
381
 
382
+ <img src="res/setup/image-17.png" alt="conda env" height="200"/>
383
+ <img src="res/setup/image-18.png" alt="conda env" height="200"/>
384
  <br><br>
385
 
386
+ > [!IMPORTANT]
387
+ > If you open a new terminal window, you will need to activate the environment with
388
+ > "conda activate a0" again for that window.
389
 
390
  5. Install requirements using **"pip"**. Pip is a Python package manager. We can install all required packages from requirements.txt file using command:
391
  ~~~
 
393
  ~~~
394
  This might take some time. If you get any errors regarding version conflicts and compatibility, double check that your environment is activated and that you created that environment with the correct Python version.
395
 
396
+ <img src="res/setup/image-19.png" alt="conda reqs" height="200"/>
397
  <br><br>
398
 
399
+ ## 4. Install Docker (Docker Desktop application)
400
+ Simply put, Docker is a way of running virtual computers on your machine. These are lightweight, disposable and isolated from your operating system, so it is a way to sandbox Agent Zero.
401
+ - Agent Zero only connects to the Docker container when it needs to execute code and commands. The frameworks itself runs on your machine.
402
+ - Docker has a desktop application with GUI for all major operating system, which is the recommended way to install it.
403
 
404
+ 1. Go to the download page of Docker Desktop [here](https://www.docker.com/products/docker-desktop/). If the link does not work, just search the web for "docker desktop download".
405
+ 2. Download the version for your operating system. Don't be tricked by the seemingly missing windows intel/amd version, it's the button itself, not in the dropdown menu.
406
 
407
+ <img src="res/setup/image-8.png" alt="docker download" width="200"/>
408
  <br><br>
409
 
410
+ 3. Run the installer and go through the installation process. It should be even shorter than Conda installation, you can leave everything to default. On macOS, the installer is a "dmg" image, so just drag and drop the application to your Applications folder like always.
411
 
412
+ <img src="res/setup/image-9.png" alt="docker install" width="300"/>
413
+ <img src="res/setup/image-10.png" alt="docker install" width="300"/>
414
 
415
+ <img src="res/setup/image-12.png" alt="docker install" width="300"/>
416
+ <br><br>
417
+
418
+
419
+ 4. Once installed, you should see Docker Desktop application on your Windows/Mac machine.
420
+
421
+ <img src="res/setup/image-11.png" alt="docker installed" height="100"/>
422
+ <img src="res/setup/image-13.png" alt="docker installed" height="100"/>
423
+ <br><br>
424
+
425
+ 5. Create account in the application.
426
+ - It's required to be signed in to the Docker Hub, so create a free account in the Docker Desktop application, you will be prompted when the application first runs.
427
+
428
+ > [!IMPORTANT]
429
+ > **Important macOS-only Docker Configuration:** In Docker Desktop's preferences
430
+ > (Docker menu) go to Settings, navigate to "Advanced" and check "Allow the default
431
+ > Docker socket to be used (requires password)." This allows Agent Zero to
432
+ > communicate with the Docker daemon.
433
+
434
+ ![docker socket macOS](res/setup/macsocket.png)
435
+
436
+ > [!NOTE]
437
+ > **Linux Users:** You can install both Docker Desktop or docker-ce (Community Edition).
438
+ > For Docker Desktop, follow the instructions for your specific Linux distribution [here](https://docs.docker.com/desktop/install/linux-install/).
439
+ > For docker-ce, follow the instructions [here](https://docs.docker.com/engine/install/).
440
+ >
441
+ > If you're using docker-ce, you will need to add your user to the `docker` group to be able to run docker commands without sudo. You can do this by running the following command in your terminal: `sudo usermod -aG docker $USER`. Then log out and log back in for the changes to take effect.
442
+ >
443
+ > Login in the Docker CLI with `docker login` and provide your Docker Hub credentials.
444
+
445
+ 6. Pull the Docker image
446
+ - Agent Zero needs a Docker image to be pulled from the Docker Hub to be run, even when using the full binaries.
447
+ You can refer to the [installation instructions above](#windows-macos-and-linux-setup-guide) to run the Docker container and then resume from the next step. There are two differences:
448
+ - You need to map two ports instead of one:
449
+ - 55022 in the first field to run the Remote Function Call SSH
450
+ - 0 in the second field to run the Web UI in automatic port assignment
451
+ - You need to map the `/a0` volume to the location of your local Agent Zero folder.
452
+ - Run the Docker container following the instructions.
453
+
454
+ ## 5. Run the local Agent Zero instance
455
+ Run the Agent Zero with Web UI:
456
  ~~~
457
  python run_ui.py
458
  ~~~
459
 
460
+ <img src="res/setup/image-21.png" alt="run ui" height="110"/>
461
  <br><br>
462
 
463
+ - Open the URL shown in terminal in your web browser. You should see the Agent Zero interface.
464
 
465
+ ## 6. Configure Agent Zero
466
+ Now we can configure Agent Zero - select models, settings, API Keys etc. Refer to the [Usage](usage.md#agent-configuration) guide for a full guide on how to configure Agent Zero.
467
+
468
+ ## 7. Configure Agent Zero RFC
469
+ Agent Zero needs to be configured further to redirect some functions to the Docker container. This is crucial for development as A0 needs to run in a standardized environment to support all features.
470
+ 1. Go in "Settings" page in the Web UI of your local instance and go in the "Development" section.
471
+ 2. Set "RFC Destination URL" to `http://localhost`
472
+ 3. Set the two ports (HTTP and SSH) to the ones used when creating the Docker container
473
+ 4. Click "Save"
474
+
475
+ ![rfc local settings](res/setup/9-rfc-devpage-on-local-sbs-1.png)
476
+
477
+ 5. Go in "Settings" page in the Web UI of your Docker instance and go in the "Development" section.
478
+
479
+ ![rfc docker settings](res/setup/9-rfc-devpage-on-docker-instance-1.png)
480
+
481
+ 6. This time the page has only the password field, set it to the same password you used when creating the Docker container.
482
+ 7. Click "Save"
483
+ 8. Use the Development environment
484
+ 9. Now you have the full development environment to work on Agent Zero.
485
+
486
+ <img src="res/setup/image-22-1.png" alt="run ui" width="400"/>
487
+ <img src="res/setup/image-23-1.png" alt="run ui" width="400"/>
488
  <br><br>
489
 
490
+
491
+ ### Conclusion
492
+ After following the instructions for your specific operating system, you should have Agent Zero successfully installed and running. You can now start exploring the framework's capabilities and experimenting with creating your own intelligent agents.
493
+
494
+ If you encounter any issues during the installation process, please consult the [Troubleshooting section](troubleshooting.md) of this documentation or refer to the Agent Zero [Skool](https://www.skool.com/agent-zero) or [Discord](https://discord.gg/Z2tun2N3) community for assistance.
495
+
496
+ ## Installing and Using Ollama (Local Models)
497
+ If you're interested in Ollama, which is a powerful tool that allows you to run various large language models locally, here's how to install and use it:
498
+
499
+ #### First step: installation
500
+ **On Windows:**
501
+
502
+ Download Ollama from the official website and install it on your machine.
503
+
504
+ <button>[Download Ollama Setup](https://ollama.com/download/OllamaSetup.exe)</button>
505
+
506
+ **On macOS:**
507
+ ```
508
+ brew install ollama
509
+ ```
510
+ Otherwise choose macOS installer from the [official website](https://ollama.com/).
511
+
512
+ **On Linux:**
513
+ ```bash
514
+ curl -fsSL https://ollama.com/install.sh | sh
515
+ ```
516
+
517
+ **Finding Model Names:**
518
+ Visit the [Ollama model library](https://ollama.com/library) for a list of available models and their corresponding names. The format is usually `provider/model-name` (or just `model-name` in some cases).
519
+
520
+ #### Second step: pulling the model
521
+ **On Windows, macOS, and Linux:**
522
+ ```
523
+ ollama pull <model-name>
524
+ ```
525
+
526
+ Replace `<model-name>` with the name of the model you want to use. For example, to pull the Mistral Large model, you would use the command `ollama pull mistral-large`.
527
 
528
+ #### Managing your downloaded models
529
+ Once you've downloaded some models, you might want to check which ones you have available or remove any you no longer need.
530
 
531
+ - **Listing downloaded models:**
532
+ To see a list of all the models you've downloaded, use the command:
533
+ ```
534
+ ollama list
535
+ ```
536
+ - **Removing a model:**
537
+ If you need to remove a downloaded model, you can use the `ollama rm` command followed by the model name:
538
+ ```
539
+ ollama rm <model-name>
540
+ ```