readme update, docker update, small changes

frdel committed Jul 25, 2024 at 20:57 UTC 76fe115aeb6ad73f565a427773ae9af3d48d471c
10 files changed +20 -7
README.md
+3 -2
@@ -2,14 +2,13 @@
2
3 [![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)
4
5 +[![Intro Video](/docs/intro_vid.jpg)](https://www.youtube.com/watch?v=C9n8zFpaV3I)
6
7 **Personal and organic AI framework**
8 - Agent Zero is not a predefined agentic framework. It is designed to be dynamic, organically growing, and learning as you use it.
9 - Agent Zero is fully transparent, readable, comprehensible, and interactive.
10 - Agent Zero uses the computer as a tool to accomplish its tasks.
11
11 -![Agent Zero](docs/splash_wide.png)
12 -
12 ## Key concepts
13 1. **General-purpose assistant**
14 - 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 @@
38 - 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.
39 - 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.
40
41 +![Agent Zero](docs/splash_wide.png)
42 +
43 ## Nice features to have
44 - Output is very clean, colorful, and readable; nothing is hidden.
45 - The same colorful output you see in the terminal is automatically saved to HTML file in **logs/** folder for every session.
docker/Dockerfile
+1 -1
@@ -1,5 +1,5 @@
1 # Use the latest slim version of Debian
2 -FROM --platform=$TARGETPLATFORM debian:testing-slim
2 +FROM --platform=$TARGETPLATFORM debian:bookworm-slim
3
4 # Set ARG for platform-specific commands
5 ARG TARGETPLATFORM
docker/build.txt new
+1
@@ -0,0 +1 @@
1 +docker buildx build --platform linux/amd64,linux/arm64 -t frdel/agent-zero-exe:latest --push .
\ No newline at end of file
docker/initialize.sh
+2
@@ -12,5 +12,7 @@ if [ ! -f /root/.profile ]; then
12 chmod 444 /root/.profile
13 fi
14
15 +apt-get update
16 +
17 # Start SSH service
18 exec /usr/sbin/sshd -D
docs/intro_vid.jpg
Binary files /dev/null and b/docs/intro_vid.jpg differ
prompts/agent.tools.md
+2 -1
@@ -134,6 +134,7 @@ IMPORTANT: Never use implicit print or implicit output, it does not work! If you
134 When tool outputs error, you need to change your code accordingly before trying again. knowledge_tool can help analyze errors.
135 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.
136 Do not use in combination with other tools except for thoughts. Wait for response before using other tools.
137 +When writing own code, ALWAYS put print/log statements inside and at the end of your code to get results!
138 **Example usages:**
139 1. Execute python code
140 ~~~json
@@ -146,7 +147,7 @@ Do not use in combination with other tools except for thoughts. Wait for respons
147 "tool_name": "code_execution_tool",
148 "tool_args": {
149 "runtime": "python",
149 - "code": "import os\nreturn os.getcwd()",
150 + "code": "import os\nprint(os.getcwd())",
151 }
152 }
153 ~~~
python/helpers/docker.py
+3 -1
@@ -34,6 +34,8 @@ class DockerContainerManager:
34 print(f"Starting existing container: {self.name} for safe code execution...")
35 existing_container.start()
36 self.container = existing_container
37 + time.sleep(2) # this helps to get SSH ready
38 +
39 else:
40 self.container = existing_container
41 # print(f"Container with name '{self.name}' is already running with ID: {existing_container.id}")
@@ -48,4 +50,4 @@ class DockerContainerManager:
50 )
51 atexit.register(self.cleanup_container)
52 print(f"Started container with ID: {self.container.id}")
51 - time.sleep(1) # this helps to get SSH ready
53 + time.sleep(2) # this helps to get SSH ready
python/tools/code_execution_tool.py
+1 -1
@@ -79,7 +79,7 @@ class CodeExecution(Tool):
79 def terminal_session(self, command):
80 self.state.shell.send_command(command)
81
82 - PrintStyle(background_color="white",font_color="#85C1E9",bold=True).print(f"{self.agent.agent_name} code execution output:")
82 + PrintStyle(background_color="white",font_color="#1B4F72",bold=True).print(f"{self.agent.agent_name} code execution output:")
83 return self.get_terminal_output()
84
85 def get_terminal_output(self):
python/tools/response.py
+4 -1
@@ -13,5 +13,8 @@ class ResponseTool(Tool):
13 self.agent.set_data("timeout", self.agent.config.response_timeout_seconds)
14 return Response(message=self.args["text"], break_loop=True)
15
16 + def before_execution(self, **kwargs):
17 + pass # do not add anything to the history or output
18 +
19 def after_execution(self, response, **kwargs):
17 - pass # do add anything to the history or output
\ No newline at end of file
20 + pass # do not add anything to the history or output
\ No newline at end of file
python/tools/task_done.py
+3
@@ -13,5 +13,8 @@ class TaskDone(Tool):
13 self.agent.set_data("timeout", 0)
14 return Response(message=self.args["text"], break_loop=True)
15
16 + def before_execution(self, **kwargs):
17 + pass # do not add anything to the history or output
18 +
19 def after_execution(self, response, **kwargs):
20 pass # do add anything to the history or output
\ No newline at end of file