Workflow Tools

Expose a workflow to an Agent or Team through the run_workflow tool.

For the agent example, install dependencies and configure OpenAI in the same terminal:

uv pip install -U "agno[openai]"
export OPENAI_API_KEY="your_openai_api_key"

Give a workflow to an Agent or Team to execute using WorkflowTools.

Example

from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.tools.workflow import WorkflowTools
from agno.workflow import Step, Workflow, StepInput, StepOutput


def create_outline(step_input: StepInput) -> StepOutput:
    return StepOutput(content=f"Outline for: {step_input.input}")


blog_post_workflow = Workflow(
    name="blog_post_workflow",
    steps=[Step(name="create_outline", executor=create_outline)],
)

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)

WorkflowTools enables run_workflow by default.

OptionDefaultEffect
enable_run_workflowTrueRegister the workflow execution tool
enable_thinkFalseRegister the optional think tool
enable_analyzeFalseRegister the optional analyze tool
allFalseRegister all three tools
async_modeFalseRegister async tool implementations

See Workflow Tools for configuration and async usage.