> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-service-account.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fully Python Workflow

> Replace the steps list with a single Python function that controls the whole run.

If you'd rather control the execution flow yourself, pass a single Python function as
the workflow's steps instead of a list. You still get workflow features like storage,
streaming, and session management.

```python fully_python_workflow.py theme={null}
from agno.workflow import Workflow, WorkflowExecutionInput

def custom_workflow_function(workflow: Workflow, execution_input: WorkflowExecutionInput):
    # Custom orchestration logic
    research_result = research_team.run(execution_input.input)
    analysis_result = analysis_agent.run(research_result.content)
    return f"Final: {analysis_result.content}"

workflow = Workflow(
    name="Function-Based Workflow",
    steps=custom_workflow_function  # Single function replaces all steps
)

workflow.print_response("Evaluate the market potential for quantum computing applications", markdown=True)
```

**See Example**:

* [Function-Based Workflow](/workflows/usage/function-instead-of-steps) - Complete function-based workflow

Migrating from v1 workflows? See the [migration guide](/other/v2-migration).
