> ## Documentation Index
> Fetch the complete documentation index at: https://docs.definable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Basic Workflow

> Build a simple sequential workflow with two agents.

Create a workflow where a researcher feeds into a writer.

<Steps>
  <Step title="Create the workflow">
    ```python basic_workflow.py theme={null}
    import asyncio
    from definable.agent import Agent
    from definable.agent.workflow import Workflow, Step

    researcher = Agent(
        model="gpt-4o",
        instructions="Research the given topic. Provide detailed facts and sources.",
    )
    writer = Agent(
        model="gpt-4o",
        instructions="Write a clear, engaging article based on the research provided.",
    )

    workflow = Workflow(
        name="research-pipeline",
        steps=[
            Step(name="research", agent=researcher),
            Step(name="write", agent=writer),
        ],
    )

    async def main():
        result = await workflow.arun("The impact of AI on healthcare")
        print(result.content)
        print(f"\nCompleted in {result.duration_ms:.0f}ms")
        print(f"Steps: {[s.step_name for s in result.step_outputs]}")

    asyncio.run(main())
    ```
  </Step>

  <Step title="Install and run">
    <Snippet file="install-definable.mdx" />

    ```bash theme={null}
    python basic_workflow.py
    ```

    The researcher gathers information, then the writer produces an article based on those findings.
  </Step>
</Steps>
