Skip to content

Agent Zero AI framework

refactor: move input tool and prompt into code execution plugin

linuztx9acbf2537e13
diff --git a/plugins/code_execution/extensions/python/system_prompt/_20_code_execution_prompt.py b/plugins/code_execution/extensions/python/system_prompt/_20_code_execution_prompt.py
index 5917dc6df..afe11541f 100644
--- a/plugins/code_execution/extensions/python/system_prompt/_20_code_execution_prompt.py
+++ b/plugins/code_execution/extensions/python/system_prompt/_20_code_execution_prompt.py
@@ -10,5 +10,5 @@ class CodeExecutionPrompt(Extension):
loop_data: LoopData = LoopData(),
**kwargs,
):
- prompt = self.agent.read_prompt("agent.system.tool.code_exe.md")
- system_prompt.append(prompt)
+ system_prompt.append(self.agent.read_prompt("agent.system.tool.code_exe.md"))
+ system_prompt.append(self.agent.read_prompt("agent.system.tool.input.md"))
diff --git a/prompts/agent.system.tool.input.md b/plugins/code_execution/prompts/agent.system.tool.input.md
similarity index 100%
rename from prompts/agent.system.tool.input.md
rename to plugins/code_execution/prompts/agent.system.tool.input.md
diff --git a/tools/input.py b/plugins/code_execution/tools/input.py
similarity index 93%
rename from tools/input.py
rename to plugins/code_execution/tools/input.py
index 6d91ba0cc..f8b73be29 100644
--- a/tools/input.py
+++ b/plugins/code_execution/tools/input.py
@@ -1,4 +1,3 @@
-from agent import Agent, UserMessage
from helpers.tool import Tool, Response
from plugins.code_execution.tools.code_execution_tool import CodeExecution