Sign in
All library
Library· Prompting

Prompt engineering for agents

What still moves the needle in 2026 — structure, examples, and constraints that make agents behave.

#prompting#beginner
5 min read

Frontier models in 2026 need less coaxing than they used to, but structured prompts still matter for agent reliability.

What still works

  • Be explicit about the role and the goal. One sentence at the top.
  • Show, don't tell. Two or three worked examples beat a paragraph of rules.
  • Use XML or JSON tags to separate instructions, context, and untrusted input. Anthropic recommends XML tags for Claude.
  • Ask for a plan first, then the answer — improves reasoning on hard tasks.
  • Constrain the output. JSON schema, enum, or "respond with exactly one word".

Provider guides

For agents specifically

  • Put tool descriptions where the model actually reads them (system prompt).
  • Include a "when NOT to use this tool" line — halves accidental calls.
  • Add a scratchpad section so the model can think between tool calls.