Workflow Automation

Run repeatable processes with workflows, background execution, human review, and schedules.

Engineering and operations teams use workflows to automate processes that need consistent execution and a traceable result. Agno combines model-driven steps with branches, loops, parallel work, approval gates, background execution, schedules, and persisted run history.

from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.workflow import Workflow

triage = Agent(
    name="Triage",
    model="openai:gpt-5.5",
    instructions="Extract the issue, severity, and responsible team.",
)

action_plan = Agent(
    name="Action Plan",
    model="openai:gpt-5.5",
    instructions="Turn the triage result into a short action plan.",
)

incident_workflow = Workflow(
    name="Incident Triage",
    steps=[triage, action_plan],
    db=SqliteDb(db_file="tmp/workflows.db"),
)

incident_workflow.print_response(
    "Checkout requests return HTTP 500 after the latest deployment."
)

Create a virtual environment, install the OpenAI, AgentOS, and SQLite integrations, and set OPENAI_API_KEY before running the workflow:

uv venv --python 3.12
uv pip install -U "agno[openai,os,sqlite]"
uv run python incident_workflow.py

Each step receives the previous step's output. The database stores workflow runs so they can be inspected after execution.

Choose the control model

RequirementUse
One model-driven taskAgent
Dynamic delegation among specialistsTeam
Fixed steps, branches, loops, or parallel groupsWorkflow

Production building blocks

NeedCapability
Continue work after the client disconnectsBackground execution
Pause before sensitive or irreversible workHuman-in-the-loop workflows
Run recurring jobsScheduling
Trigger work from another serviceAgent API
Inspect runs, latency, and failuresObservability

Common patterns

PatternWorkflow shape
Intake and triageExtract input, classify it, route it, and request review when needed.
Data enrichmentFetch records, enrich them in parallel, validate output, and persist results.
Recurring reportsCollect data, analyze it, render a report, and run on a schedule.
Long-running researchStart in the background, persist events, and reconnect to the stream.

Next steps

TaskGuide
Define workflow stepsBuilding workflows
Choose an orchestration patternWorkflow patterns
Run a workflow through AgentOSUsing the AgentOS API