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

# Instructions

> The backend of each agent — auto-generated, fully editable

Twin generates and maintains precise instructions for each agent, so autonomous runs stay on track. You can edit them anytime to keep full control.

Think of instructions as **the backend of each agent** — they define exactly what the agent does, how it does it, which tools it uses, and in what order. Twin writes them automatically during build mode, but you always have the final say.

## How Instructions Work

When you describe a goal to the Orchestrator, Twin doesn't just run it blindly. It generates a **structured set of instructions** that the agent follows on every run.

<CardGroup cols={3}>
  <Card title="Auto-generated" icon="wand-magic-sparkles" color="#F4D03F">
    Twin writes the instructions during build mode based on your goal
  </Card>

  <Card title="Fully editable" icon="pen" color="#F4D03F">
    Open and modify them at any time to fine-tune behavior
  </Card>

  <Card title="Persistent" icon="floppy-disk" color="#F4D03F">
    Instructions persist across runs — the agent follows them every time
  </Card>
</CardGroup>

## Accessing Instructions

Every agent has an instructions panel you can open to see exactly what it's doing under the hood.

**Step 1** — Click the instructions icon in the top-right corner of an agent's view:

<Frame caption="Click the document icon in the top-right to open the agent's instructions">
  <img src="https://mintcdn.com/twinlabs/32bkTaA33ltG-5t7/images/instructions-access.png?fit=max&auto=format&n=32bkTaA33ltG-5t7&q=85&s=03f28a56f2519678e23423b5db699704" alt="How to access agent instructions" width="1024" height="711" data-path="images/instructions-access.png" />
</Frame>

**Step 2** — The instructions panel opens, showing the full breakdown: purpose, database schema, workflow steps, and tools used.

<Frame caption="The instructions panel shows everything the agent does — purpose, database, workflow steps, and tools">
  <img src="https://mintcdn.com/twinlabs/32bkTaA33ltG-5t7/images/instructions-detail.png?fit=max&auto=format&n=32bkTaA33ltG-5t7&q=85&s=3b7c322b22594b48f2bdfa9c3314cb32" alt="Agent instructions detail view" width="1024" height="671" data-path="images/instructions-detail.png" />
</Frame>

## What's Inside Instructions

Instructions are structured documents that typically include:

| Section             | What it contains                                           |
| ------------------- | ---------------------------------------------------------- |
| **Purpose**         | A clear description of what the agent does                 |
| **Database**        | Tables and schemas the agent uses to store data            |
| **At Start of Run** | Pre-checks before the workflow begins (e.g. deduplication) |
| **Workflow**        | Step-by-step execution logic with tools and conditions     |
| **Tools**           | The specific tools the agent has access to                 |

## Editing Instructions

You can edit instructions in two ways:

<CardGroup cols={2}>
  <Card title="Through the Orchestrator" icon="message" color="#F4D03F">
    Tell the Orchestrator what to change — "make the agent also extract email addresses" — and it will update the instructions automatically.
  </Card>

  <Card title="Directly in the panel" icon="pen-to-square" color="#F4D03F">
    Click **Edit** in the instructions panel to modify them by hand. Useful for precise tweaks like changing a filter, adjusting a threshold, or fixing a field name.
  </Card>
</CardGroup>

<Tip>Small instruction edits don't require a full rebuild. This is the cheapest way to improve an agent — update the instructions, then run again.</Tip>

## Why Instructions Matter

<AccordionGroup>
  <Accordion title="Consistency across runs" icon="arrows-rotate" color="#F4D03F">
    Without instructions, every run would be a fresh interpretation of your goal. Instructions ensure the agent behaves the same way every time — even when running autonomously on a schedule.
  </Accordion>

  <Accordion title="Full transparency" icon="eye" color="#F4D03F">
    You can always see exactly what an agent is doing and why. No black box — if something goes wrong, open the instructions to understand the logic and fix it.
  </Accordion>

  <Accordion title="Cheaper iteration" icon="coins" color="#F4D03F">
    Editing instructions is much cheaper than rebuilding from scratch. Update a filter, add a step, or change an output format — all without triggering a full build.
  </Accordion>
</AccordionGroup>

<Card title="Open Your Agents" icon="arrow-right" href="https://builder.twin.so/" color="#F4D03F">
  View and edit your agent instructions in Twin
</Card>
