PYAE1994 commited on
Commit
2291861
·
verified ·
1 Parent(s): 316caac

Create executor.py

Browse files
Files changed (1) hide show
  1. app/agent/executor.py +24 -0
app/agent/executor.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from tools_runtime import execute_tool_call
2
+ from agent import Agent
3
+
4
+ agent = Agent()
5
+
6
+
7
+ class Executor:
8
+
9
+ def run_plan(self, plan):
10
+
11
+ results = []
12
+
13
+ for step in plan["steps"]:
14
+
15
+ print(f"🚀 Executing: {step}")
16
+
17
+ response = agent.run(step)
18
+
19
+ results.append({
20
+ "step": step,
21
+ "result": response
22
+ })
23
+
24
+ return results