Skip to content

Agent Zero AI framework

readme update, docker update, small changes

frdel76fe115aeb6a
diff --git a/README.md b/README.md
index 500545d64..a1c23760e 100644
--- a/README.md
+++ b/README.md
@@ -2,14 +2,13 @@
[![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)
+[![Intro Video](/docs/intro_vid.jpg)](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.
-![Agent Zero](docs/splash_wide.png)
-
## Key concepts
1. **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.
+![Agent Zero](docs/splash_wide.png)
+
## 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/Dockerfile
index 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 commands
ARG TARGETPLATFORM
diff --git a/docker/build.txt b/docker/build.txt
new file mode 100644
index 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 file
diff --git a/docker/initialize.sh b/docker/initialize.sh
index 63216db4f..a0a377698 100644
--- a/docker/initialize.sh
+++ b/docker/initialize.sh
@@ -12,5 +12,7 @@ if [ ! -f /root/.profile ]; then
chmod 444 /root/.profile
fi
+apt-get update
+
# Start SSH service
exec /usr/sbin/sshd -D
diff --git a/docs/intro_vid.jpg b/docs/intro_vid.jpg
new file mode 100644
index 000000000..828b95bd2
Binary files /dev/null and b/docs/intro_vid.jpg differ
diff --git a/prompts/agent.tools.md b/prompts/agent.tools.md
index 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 you
When 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.py
index 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 ready
diff --git a/python/tools/code_execution_tool.py b/python/tools/code_execution_tool.py
index 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.py
index 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 file
diff --git a/python/tools/task_done.py b/python/tools/task_done.py
index 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