AI instructions are the natural-language text an AI agent follows at run time: a workflow step's Directions, the instructions that implement a custom AI tool, and the directions a step follows when it does scheduled work. They are the biggest single lever you have over how reliably your thunk behaves.
This article has two parts. Concepts explains what the platform already does around your instructions, which tells you what is left for them to say. Details gives the guidelines for writing that part well. The same guidelines apply wherever an instruction lives: a step, a custom AI tool, or anywhere else an agent runs.
For the parts of a step's AI Instructions other than the text (properties, tools, examples, settings), see AI Instructions.
Concepts
Your instructions describe the work, not the machinery
When a step runs, the agent does not start from a blank page. Before it reads a word you wrote, the platform has already given it:
How to work on a step. Built-in platform instructions explain what a step is and how to finish one, and every tool — including the one for asking a person for help — comes with its own description. You do not need to explain any of that.
The work item's current data. The values of the step's input properties, and on later runs the output values recorded so far, are in front of the agent. You do not need to tell it to look them up.
Where results go. The step's output properties tell the agent what to produce, and the platform records the values it produces into them. You do not need to tell it to store or save anything.
What it can do. The tools enabled on the step are the agent's capabilities, each with its own description and inputs. You do not need to explain how to call them.
When to run and when to move on. The step's Step Run Condition and Step Finish Condition decide when the step runs and when the work item proceeds. See Control when a step runs and proceeds.
So your instructions only need to carry the logic of your workflow: what this step is for, the order the work happens in, and the business rules and decisions that are specific to you. Everything else is better expressed somewhere the platform can enforce it.
Put each kind of rule where it can be enforced
Instructions are read and interpreted. Properties, tools and step settings are applied exactly. A rule that can live in one of those places is more reliable there than in prose:
The rule is about… | Put it in… |
What a value may be (allowed options, a format, a required field) | The property's type and constraints |
A fixed calculation, date arithmetic, or a sequence of deterministic logic | A tool |
Which actions are available at all | The step's tool configuration — see Control which tools a step can use |
When the step runs or finishes | Workflow Options |
A pattern that is easier to show than to describe | Positive and negative Examples |
The reasoning behind this split is in AI reliability mechanisms.
Work is set-oriented, and there are two kinds of people
Two more things about the run-time model shape how instructions should read:
The agent works on sets. When a step deals with a list of items, the agent handles the list as a whole and calls tools in batches. Instructions describe what happens to each item, not a loop that the agent steps through one item at a time.
There is no single "user". A thunk is a process automation, not a personal assistant. Two kinds of people can be involved in a run: the end user who submitted the inputs, who can only be reached through a conversation property or by email, and the human service agent the AI agent escalates to for clarification, help or error handling. Escalating to a human service agent usually stops the agent's processing until they answer; it is not the same as finishing the step.
Details
The guidelines
Each guideline states a rule; most add the reason for it or a short example.
Lead with the objective, then the process
Start with a clear Objective statement, then describe the Process. The objective tells the agent what success looks like, so it can make sensible choices the process does not spell out.
Objective: Assess the vendor's security posture.
Process: 1. Read the vendor's questionnaire answers. 2. …
Number the process
Write the process as a numbered list. An entry can have further detail as sub-items; make sub-items bulleted and indented. A numbered list reads as an order to follow; the same steps buried in a paragraph do not.
Read and prepare first, then act
Present the instructions in the order the work happens: consume the inputs, then process, prepare or analyze them, then act on the result. Do not interleave these. Transform the data first, then give clean instructions on what to do with the transformed data — do not mix details of how to transform the data into the details of where to send it.
Write commands
Describe actions in the imperative: "Extract the invoice total", "Send the summary to the requester". Avoid passive phrasing such as "the total should be extracted" or "it is recommended that".
Say what should happen, not which tool to call
Describe an action by its logical intent ("send an email to the requester"), not by its mechanical implementation ("call the send-email tool"). Do not name tools in instructions. When the method matters, describe it by what it does ("look the shop up in a places directory") and choose the mechanism by enabling the right tools on the step, disabling the ones it should not use.
Write "for each" for sets of items
When the process deals with a set of items, write it as an explicit for-each instruction:
For each customer in Customers: a) collect their usage history, b) classify them as High or Low usage.
Work on sets, not one item at a time
Never instruct the agent to run a loop one item at a time — the work is set-oriented and happens in batches. Leave out pseudo-code such as "keep this value in memory" or "add one to this counter for each item". "For each" says what happens to every item; it does not ask for a sequential loop.
Don't say where to store results
Do not tell the agent to "store" or "persist" values into particular variables; recording results is implicit. It is fine to say which properties should be filled in — "record Title, Salary, and Age" — to make clear which outputs a part of the process produces.
Describe the intent, not the mechanics
Do not describe low-level API or tool-calling protocol: retries, HTTP error handling, parsing a response, or which field of a response to read ("read data.score from the JSON"). Say what should happen, not how the agent should invoke it: "get the applicant's credit score" is enough. Business rules are not mechanics: "if the invoice has no purchase-order number, record it as unmatched" belongs in the instructions; "if the API call fails, retry three times and then write the error into Notes" does not.
Describe spreadsheet work by its content
Describe spreadsheet work as lookup, append, update or upsert against a named sheet — never by row numbers, header parsing or moving between tabs. Those four operations are lookup (find matching rows), append (add a row), update (find a row by its key columns and change other columns), and upsert (update the row with this key, or add it if it is not there). Write instructions in those terms:
Say "upsert the order by Order ID", not "look up the order; if you find it, update it, otherwise add a new row".
Never refer to row numbers. They are unstable as soon as anything else writes to the sheet.
Do not explain how to read header rows.
For a workbook with several tabs, name the tab with the file ("in Forecast.xlsx, sheet Q2, look up…") rather than telling the agent to open the file and then go to a tab. See Working with spreadsheets for pinning a tab with
#sheetName=on the link.
Name the person, never just "the user"
Never leave a bare "user" in instructions. Wherever the instructions ask someone for something or send something to someone, name the party: the end user who submitted the inputs, by their role ("the requester", "the submitter"), or the human service agent. Remember that the end user can only be reached through a conversation property or by email. Asking the human service agent for help usually stops the agent's processing until they answer; it does not finish the step.
Move fixed logic into a tool
If a step's logic runs past about 20 lines, it should almost certainly be broken up — either into sequential steps (linear decomposition) or by moving parts of it into tools (hierarchical decomposition). Be aggressive about the second: any sequence of deterministic logic belongs in a tool. See the two worked examples below.
Move arithmetic into a tool
Any arithmetic beyond something trivial belongs in a tool, and that includes date arithmetic — do not ask the agent to work out dates. Several instructions that each do some arithmetic can be combined into a single tool.
Put validation on the property
Do not validate inputs in the instructions ("if Region is not one of North America, Europe or Asia, stop with an error"). Remove such instructions, and put the constraint on the property's type instead. The instructions can then assume they are given valid data, or at least data that meets the property's constraints — without saying so: do not restate the allowed values, even as an assumption.
Two worked examples
Linear decomposition: split a step in two
A step's input is often a list in which every entry needs a lot of transformation and filtering, and then an action. You could write that as one for-each with all the logic nested inside it. It is better as two steps: the first takes the input list, transforms and filters it, and produces a transformed output list; the second takes that list and carries out the actions.
Hierarchical decomposition: carve logic out into tools
Take pieces of the logic and move them into tools. A tool is a way of scoping a concern, like a function call; it does not have to be deterministic or written in code — a custom AI tool written in English is still a tool. Logic that is plainly deterministic is the best candidate.
Keep tools coarse: many tiny tool calls are slow. You would not build a tool to add two numbers; you would build one that takes a list of entries, adds or updates them in a spreadsheet, and returns a summary of what changed. A tool can take a whole list, or handle one entry and be applied to every entry in a list — the agent calls it as one batch either way.
Move the physical details into the tool. Its inputs and outputs are logical, and its implementation holds the specifics: for a tool that writes to a spreadsheet, the column mapping and formatting live inside the tool, not in the step's instructions.
Practical advice
Start simple, then make it specific
You do not have to write perfect instructions in one pass. Start with a plain description of the task, test the step on real work items, and tighten the instructions wherever the agent went off course. The biggest improvement is usually specificity: say exactly what to do and, where the method matters, describe the method (and enable the tools that carry it out).
Say what to do when something is missing
Cover the awkward cases, not just the happy path. Say what the agent should do when a value is absent, a document is incomplete, or the inputs disagree — for example, "if the invoice has no purchase-order number, record it as unmatched rather than guessing one." Being explicit stops the agent from filling a gap with a confident but wrong answer.
Point at the material the instructions need
Reference the specific file or example to use — for instance, "map each expense to a category using the accounting-codes spreadsheet linked here." Linking the exact reference material is more reliable than describing it. When a pattern is easier to show than to describe (a sample input, an annotated document, an exact output format), add it as a positive or negative Example.
Keep chat replies out of internal steps
If a step only does internal work, do not use its instructions to describe messages to a person. Whether a chat step replies at all is controlled by its output properties and the conversation's settings. See AI Instructions for how a step sends a message on a chat workflow.
Custom AI tools follow the same rules
A custom AI tool's instructions are written to the same guidelines as a step's Directions. The tool's name, description, inputs and outputs play the part a step's properties and tools play for a step. Refer to the tool's inputs and outputs by their names, and make sure the instructions still produce every declared output.
A quick checklist
Before you move on, check that the instructions:
open with an objective, followed by a numbered process;
read the inputs and prepare the data before acting on it;
use commands, and describe actions by intent rather than by tool name;
say "for each" for sets, with no one-at-a-time loops or pseudo-code;
name the properties to fill in where that helps, without telling the agent to store anything;
name the person — requester, submitter or human service agent — instead of "the user";
leave arithmetic, deterministic logic and input validation to tools and property types;
say what to do when a value is missing or the inputs conflict; and
link the exact file or example the work relies on.
