from definable.agent import Agent
from definable.agent.workflow import Workflow, Step
researcher = Agent(model="gpt-4o", instructions="Research the given topic thoroughly.")
writer = Agent(model="gpt-4o", instructions="Write a clear article based on the research provided.")
editor = Agent(model="gpt-4o", instructions="Polish and improve the article.")
workflow = Workflow(
name="content-pipeline",
steps=[
Step(name="research", agent=researcher),
Step(name="write", agent=writer),
Step(name="edit", agent=editor),
],
)
result = await workflow.arun("The future of AI agents")
print(result.content) # Final edited article