Skip to main content

Example

You can give a workflow to an Agent or Team to execute using WorkflowTools.
from agno.agent import Agent    
from agno.models.openai import OpenAIResponses
from agno.tools.workflow import WorkflowTools

# Create your workflows...

workflow_tools = WorkflowTools(
    workflow=blog_post_workflow,
)

agent = Agent(
    model=OpenAIResponses(id="gpt-5.2"),
    tools=[workflow_tools],
)

agent.print_response("Create a blog post on the topic: AI trends in 2024", stream=True)
See the Workflow Tools documentation for more details.