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

# Building a Multi-step Workflow

> Pass supplied information through explicit agent calls

This example turns supplied release notes into an outline and a draft. It uses separate agents and passes each result to the next step.

```python theme={null}
import marvin
from pydantic import BaseModel

class ReleaseNote(BaseModel):
    title: str
    summary: str
    changes: list[str]

outliner = marvin.Agent(instructions="Organize only the facts supplied in context.")
writer = marvin.Agent(instructions="Write concise release notes from the supplied outline.")

source = [
    "Fresh installs work with current model-provider dependencies.",
    "Saved token counts remain readable after upgrading.",
]

with marvin.Thread():
    outline = outliner.run(
        "Outline release notes",
        result_type=list[str],
        context={"changes": source},
    )
    release_note = writer.run(
        "Write the release note",
        result_type=ReleaseNote,
        context={"outline": outline, "changes": source},
    )

print(release_note)
```

The thread shares conversation history. Explicit `context` identifies the data each step should use. Neither agent has a search tool; they work from supplied information.

Use [task dependencies](https://askmarvin.ai/patterns/running-tasks.md) when you need task objects with inspectable states. Use ordinary Python calls when the sequence is already known. A model-generated [plan](https://askmarvin.ai/functions/plan.md) is useful only when you want the model to propose the steps.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.