Lesson 189 · 3 min

Writing instructions for an agent

An agent works alone for many steps, so its instructions need a goal, limits, a definition of done and clear points where it must stop and ask.

In a chat, you can correct the AI after each reply. An agent may take twenty steps before you look again. Vague instructions at the start become twenty steps in the wrong direction.

Write the goal and why it matters: "Find a venue for a 40-person company dinner in Hanoi on 12 December, because we need to book by Friday." The reason helps it make sensible choices you did not spell out.

Set the limits. Budget, area, sources to use or avoid, and actions it must never take, like booking or paying. Then define done: "Give me three options in a table with price per person, capacity, address, a link and one concern for each."

Add stop points: "If you cannot find three under the budget, stop and tell me rather than raising it." And ask it to report what it checked and what it was unsure about, so you can see its path.

Do it now

Use the four-part agent brief

  1. 1. Pick a research or planning task you could give an agent.
  2. 2. Fill in goal, limits, done and stop points in the template below.
  3. 3. Run it in an assistant with agent or research mode, and compare with a one-line request.
Goal: [WHAT AND WHY].
Limits: [BUDGET, AREA, SOURCES, ACTIONS NOT ALLOWED].
Done means: [EXACT OUTPUT FORMAT].
Stop and ask me if: [CONDITIONS].
At the end, list what you checked and anything you were unsure about.

Quick check

Why should agent instructions include stop points?

Why should agent instructions include stop points?

More on this

Words from this lesson

Agent
An AI system that takes several steps on its own, such as searching, clicking or using apps, to finish a goal you set.
Prompt
The instruction or question you give an AI. Clearer prompts with context usually get much better answers.
Context engineering
Choosing which documents, instructions and history to give an AI so it has exactly what it needs for a task.
Human in the loop
Designing a process so a person reviews or approves the AI's work before it has real consequences.