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

# Instructions

> Write instructions an agent follows reliably.

Instructions go in the **What should happen?** box. Write them the way you'd brief a new teammate: what to look for, what to do, and what to do when it doesn't apply. The agent decides each case by reading the ticket, so you don't need to spell out every branch.

## How the agent reads your instructions

Each run, the agent reads your instructions, any [context articles](https://docs.decimal.app/automations/context.md), and the event that started it. Then it follows a few ground rules you don't need to repeat:

* **It reads before it acts.** The event holds IDs, not full details, so it looks up what it needs with its tools.
* **It never makes things up.** Every name, ID, link, and number comes from the event or a tool result. If something is missing, it leaves it out or stops and says so.
* **It stays in its lane.** It takes only the actions you ask for, each one once. If the job needs a tool it doesn't have, it stops and says which.
* **It can do nothing.** If your instructions don't apply to this event, it takes no action and says why.
* **It writes like a teammate.** Slack messages and notes lead with what matters, in one to three sentences, with links instead of pasted data and no headings, bullets, or emoji unless you ask.
* **It reports back.** It ends every run with one or two sentences on what it did, shown in [Run history](https://docs.decimal.app/automations/run-history.md).

## Write good instructions

| Do | Instead of |
| - | - |
| "Post to #support-escalations" | "Post to the escalations channel" |
| "File it in the Linear team **Platform** with the label **Bug**" | "Create a ticket for engineering" |
| "If the customer is on an Enterprise plan…" | "If it's an important customer…" (unless the agent can look that up) |
| "Otherwise, do nothing." | Leaving the other case unsaid |
| "Look at tickets created in the last 24 hours" | "Look at recent tickets" on a schedule |
| "Include the ticket link and the customer's company" | "Include the details" |

A few more habits that help:

* **Start with the condition.** "Only act if…" up front keeps the agent from doing work it will throw away.
* **Describe judgment, not keywords.** "If the customer sounds like they're about to cancel" works better than a list of words to match.
* **Ask for the format you want.** If you want bullets, a heading, or a specific opening line, say so. Otherwise you get one to three plain sentences.
* **Say who to tell.** Name the channel, person, or team, and when to tag someone.
* **Keep one job per automation.** Two short automations are easier to test and read than one that branches five ways.

Instructions can be up to 20,000 characters, but most good ones are under ten lines.

For reference material the automation should follow every time, like a policy or a rotation, attach a knowledge base article as [context](https://docs.decimal.app/automations/context.md) instead of pasting it into the instructions. To change how hard the agent thinks, set its [effort](https://docs.decimal.app/automations/effort.md).


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