Agent Zero AI framework
readme update, docker update, small changes
frdel76fe115aeb6a
diff --git a/README.md b/README.mdindex 500545d64..a1c23760e 100644--- a/README.md+++ b/README.md@@ -2,14 +2,13 @@[](https://discord.gg/B8KZKNsPpj)+[](https://www.youtube.com/watch?v=C9n8zFpaV3I)**Personal and organic AI framework**- Agent Zero is not a predefined agentic framework. It is designed to be dynamic, organically growing, and learning as you use it.- Agent Zero is fully transparent, readable, comprehensible, and interactive.- Agent Zero uses the computer as a tool to accomplish its tasks.--## Key concepts1. **General-purpose assistant**- Agent Zero is not pre-programmed for specific tasks (but can be). It is meant to be a general-purpose personal assistant. Give it a task, and it will gather information, execute commands and code, cooperate with other instances, and do its best to accomplish it.@@ -39,6 +38,8 @@- The terminal interface is real-time streamed and interactive. You can stop and intervene at any point. If you see your agent heading in the wrong direction, just stop and tell it right away.- There is a lot of freedom in this framework. You can instruct your agents to regularly report back to superiors asking for permission to continue. You can instruct them to use point-scoring systems when deciding when to delegate subtasks. Superiors can double-check subordinates' results and dispute. The possibilities are endless.++## Nice features to have- Output is very clean, colorful, and readable; nothing is hidden.- The same colorful output you see in the terminal is automatically saved to HTML file in **logs/** folder for every session.diff --git a/docker/Dockerfile b/docker/Dockerfileindex f4d73c220..6afc9f2d7 100644--- a/docker/Dockerfile+++ b/docker/Dockerfile@@ -1,5 +1,5 @@# Use the latest slim version of Debian-FROM --platform=$TARGETPLATFORM debian:testing-slim+FROM --platform=$TARGETPLATFORM debian:bookworm-slim# Set ARG for platform-specific commandsARG TARGETPLATFORMdiff --git a/docker/build.txt b/docker/build.txtnew file mode 100644index 000000000..37d76f0cb--- /dev/null+++ b/docker/build.txt@@ -0,0 +1 @@+docker buildx build --platform linux/amd64,linux/arm64 -t frdel/agent-zero-exe:latest --push .\ No newline at end of filediff --git a/docker/initialize.sh b/docker/initialize.shindex 63216db4f..a0a377698 100644--- a/docker/initialize.sh+++ b/docker/initialize.sh@@ -12,5 +12,7 @@ if [ ! -f /root/.profile ]; thenchmod 444 /root/.profilefi+apt-get update+# Start SSH serviceexec /usr/sbin/sshd -Ddiff --git a/docs/intro_vid.jpg b/docs/intro_vid.jpgnew file mode 100644index 000000000..828b95bd2Binary files /dev/null and b/docs/intro_vid.jpg differdiff --git a/prompts/agent.tools.md b/prompts/agent.tools.mdindex 5f155c631..c10d7b49e 100644--- a/prompts/agent.tools.md+++ b/prompts/agent.tools.md@@ -134,6 +134,7 @@ IMPORTANT: Never use implicit print or implicit output, it does not work! If youWhen tool outputs error, you need to change your code accordingly before trying again. knowledge_tool can help analyze errors.IMPORTANT!: Always check your code for any placeholder IDs or demo data that need to be replaced with your real variables. Do not simply reuse code snippets from tutorials.Do not use in combination with other tools except for thoughts. Wait for response before using other tools.+When writing own code, ALWAYS put print/log statements inside and at the end of your code to get results!**Example usages:**1. Execute python code~~~json@@ -146,7 +147,7 @@ Do not use in combination with other tools except for thoughts. Wait for respons"tool_name": "code_execution_tool","tool_args": {"runtime": "python",- "code": "import os\nreturn os.getcwd()",+ "code": "import os\nprint(os.getcwd())",}}~~~diff --git a/python/helpers/docker.py b/python/helpers/docker.pyindex 5afd5ad53..cec5f860d 100644--- a/python/helpers/docker.py+++ b/python/helpers/docker.py@@ -34,6 +34,8 @@ class DockerContainerManager:print(f"Starting existing container: {self.name} for safe code execution...")existing_container.start()self.container = existing_container+ time.sleep(2) # this helps to get SSH ready+else:self.container = existing_container# print(f"Container with name '{self.name}' is already running with ID: {existing_container.id}")@@ -48,4 +50,4 @@ class DockerContainerManager:)atexit.register(self.cleanup_container)print(f"Started container with ID: {self.container.id}")- time.sleep(1) # this helps to get SSH ready+ time.sleep(2) # this helps to get SSH readydiff --git a/python/tools/code_execution_tool.py b/python/tools/code_execution_tool.pyindex d9c2cdc80..e08b3b6ca 100644--- a/python/tools/code_execution_tool.py+++ b/python/tools/code_execution_tool.py@@ -79,7 +79,7 @@ class CodeExecution(Tool):def terminal_session(self, command):self.state.shell.send_command(command)- PrintStyle(background_color="white",font_color="#85C1E9",bold=True).print(f"{self.agent.agent_name} code execution output:")+ PrintStyle(background_color="white",font_color="#1B4F72",bold=True).print(f"{self.agent.agent_name} code execution output:")return self.get_terminal_output()def get_terminal_output(self):diff --git a/python/tools/response.py b/python/tools/response.pyindex f19db34d1..f4c1cdde9 100644--- a/python/tools/response.py+++ b/python/tools/response.py@@ -13,5 +13,8 @@ class ResponseTool(Tool):self.agent.set_data("timeout", self.agent.config.response_timeout_seconds)return Response(message=self.args["text"], break_loop=True)+ def before_execution(self, **kwargs):+ pass # do not add anything to the history or output+def after_execution(self, response, **kwargs):- pass # do add anything to the history or output\ No newline at end of file+ pass # do not add anything to the history or output\ No newline at end of filediff --git a/python/tools/task_done.py b/python/tools/task_done.pyindex f1bec405d..5ee0a38cc 100644--- a/python/tools/task_done.py+++ b/python/tools/task_done.py@@ -13,5 +13,8 @@ class TaskDone(Tool):self.agent.set_data("timeout", 0)return Response(message=self.args["text"], break_loop=True)+ def before_execution(self, **kwargs):+ pass # do not add anything to the history or output+def after_execution(self, response, **kwargs):pass # do add anything to the history or output\ No newline at end of file