Autonomous-AI / orchestrator.py
Leonydis137's picture
Update orchestrator.py
fe65c02 verified
raw
history blame
565 Bytes
from agents.planner import plan_task
from agents.executor import execute_step
from agents.critic import review_result
from memory import add_to_memory
def run_agents(goal, memory):
plan = plan_task(goal, memory)
add_to_memory(f"Planner: {plan}", memory)
outputs = []
for step in plan:
result = execute_step(step)
add_to_memory(f"Executor: {step} -> {result}", memory)
review = review_result(step, result)
add_to_memory(f"Critic: {review}", memory)
outputs.append((step, result, review))
return outputs