File size: 404 Bytes
8496edd
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from prompt.constants import TASK_PROMPT

class Workflow:
    def __init__(self):
        self.agents = []

    def add_agent(self, agent):
        self.agents.append(agent)

    def execute_workflow(self, task_description: str):
        prompt = TASK_PROMPT.format(task_description=task_description)
        for agent in self.agents:
            agent.receive_prompt(prompt)
            agent.execute()