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

# Your first agent

> Author and publish an agent in the dashboard. You finish with an agent id, which every Loom call needs.

Every Loom request names an agent by its public id — `agent_` followed by a hex string. That id is produced by publishing, so this is the one step that happens in the dashboard rather than over the API.

## Create it

Open **Agent** in the dashboard and create a new one. The builder has four things that matter and several you can ignore on a first pass.

<ParamField path="Name" type="required">
  Shown to you, and returned on the thread object. Not shown to your users unless you choose to.
</ParamField>

<ParamField path="System prompt" type="required">
  The agent's instructions. This is where most of the behaviour lives — who it is, what it may do, how it should refuse. Write it like you would a brief for a new hire.
</ParamField>

<ParamField path="Model class" type="required">
  `Fast`, `Standard`, or `Frontier`. Start on Standard. Class controls cost and capability; see [Rate limits and credits](/guides/limits).
</ParamField>

<ParamField path="Patches" type="optional">
  The capabilities the agent may use. **You can leave this empty and still have a working agent** — see below.
</ParamField>

## You do not need patches yet

Four primitives are injected into every agent automatically:

| Primitive | What it does |
| - | - |
| `ask_user` | Ask a free-text question and pause for the answer. |
| `ask_choice` | Offer a set of options and pause. |
| `confirm` | Ask for a yes or no. |
| `handoff` | Hand the conversation to your app. |

So an agent with an empty Patches list can already hold a conversation, ask clarifying questions, and hand off. That is enough for the [Quick start](/quickstart), and enough to test your instructions before you wire anything to your backend.

Add patches when you want the agent to *do* something — see [Patches](/guides/patches).

## Permissions

Each wired patch carries a permission, and this is the guardrail worth understanding early:

| Permission | Behaviour |
| - | - |
| **Always allow** | The agent calls it whenever it decides to. |
| **Always ask** | The call is held. The run pauses and waits for a human decision. See [Confirmations](/guides/confirmations). |
| **Always deny** | The agent cannot call it, even though it can see it. |

Set **Always ask** on anything that moves money, sends a message, or changes a record you care about. It is the difference between an agent that drafts and an agent that acts unsupervised.

## Try it before you publish

Open **Playground**. It runs the agent with a persona standing in for a subject, so you can iterate on the system prompt without touching your integration. Every run there produces a [trace](/guides/traces), same as production, and Playground memory is kept apart from live — experimenting will not teach your production agent anything.

It is also where you prove your backend works before writing any client code. See [The Playground](/guides/playground).

## Publish

Publishing mints the `agent_…` id. Copy it — that is what your code passes as `agent`.

<Note>
  An agent id names **one exact version**. There is no "latest" resolution: pinning `agent_4f3c…` means your integration keeps running that version until you change the id. Publishing a new version mints a new id, and you opt in by updating it.
</Note>

## Connections

If any wired patch calls *your* backend, the agent also needs a [connection](/guides/connections) — the host we call and how we authenticate. You can pin one on the agent, or pass one per request.

An agent built only from primitives and workbench products needs no connection at all.

## Next

<CardGroup cols={2}>
  <Card title="Quick start" icon="bolt" href="/quickstart">
    Use the id you just copied.
  </Card>

  <Card title="Patches" icon="puzzle-piece" href="/guides/patches">
    Give the agent something to do.
  </Card>
</CardGroup>


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