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

# Create an agent in the workbench

> Use the workbench to draft an agent with tools and save it.

The agent drafter writes an agent file with you. You describe the job, it drafts the file in the workbench's pane, and you save it when it's right.

## Draft the agent

**1. Open the workbench in agent mode**

```bash theme={null}
graph workbench agent
```

**2. Describe the job**

Say what the agent is for, what it should read and what it should produce. The drafter picks tools from your catalog and puts a first draft in the pane.

![The workbench with agent\_drafter active: the request and the drafter's question on the left, and the release\_notes agent draft on the right with its description, model, tools, input, output and system prompt.](https://mintcdn.com/graph/s-Ce0Orb66xMgIkN/images/workbench/agent-drafting.svg?fit=max\&auto=format\&n=s-Ce0Orb66xMgIkN\&q=85\&s=3276a104bc4cbd4e106f375af5903d5d)

**3. Answer its questions**

The drafter asks what it can't settle itself, including whether the agent is for conversation, [plan](/plans/overview) steps, or both.

**4. Draft any missing tools**

When the agent needs a tool that doesn't exist, the drafter offers to draft it. Say yes, and once you save the tool you're back in the agent draft with the tool added.

![The agent drafter in the workbench saying none of the tools can post to the changelog page and asking whether to draft one now, with the agent draft in the pane on the right.](https://mintcdn.com/graph/s-Ce0Orb66xMgIkN/images/workbench/agent-missing-tool.svg?fit=max\&auto=format\&n=s-Ce0Orb66xMgIkN\&q=85\&s=001c2de4af756d9b73d9ac670cba0b37)

**5. Save**

Press <kbd>Ctrl</kbd>+<kbd>S</kbd>. graph writes the file to `./.graph/agents/<name>.yaml`.

## Run the agent

```bash theme={null}
graph ask --agent release_notes \
  "What shipped since v0.15.0?"
```

## Related guides

> **[Agent file](/agents/reference/agent-file)**
>
> Every field an agent file takes.

> **[Talk to an agent](/agents/guides/talk-to-an-agent)**
>
> Use your agent in `graph ask` and `graph chat`.

> **[Create a tool in the workbench](/tools/guides/create-in-workbench)**
>
> Draft a tool on its own with the tool drafter.

> **[Customize a built-in agent](/agents/guides/customize-built-ins)**
>
> Change one of graph's own agents.


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