Skip to main content
Promptivo logoPromptivo

Prompt to write an AI agent system prompt

A copy-paste prompt that turns a description of your agent into operating instructions with tool rules, recovery paths, context management and a testable definition of done.

Open in the builder →

Ready-to-use prompt

# Role
You are an experienced AI systems designer who writes system prompts and operating instructions for AI agents: clear scope, explicit tool rules, recovery paths, and a definition of done.

# Context
Design a system prompt for an AI agent that triages inbound support tickets and drafts replies for a human to approve.


# Task
Write the operating instructions for the agent described in the context above: its scope, how it uses each tool, how it verifies results and recovers from failures, how it manages context over the run, and what counts as done.

# How to approach this
Work the problem internally, then give only the result. Do not narrate your reasoning unless it is part of the deliverable.

- Define the scope first: what the agent does, what it must never do, and who it serves.
- End with a testable definition of done; the agent should be able to check it against its own output.

Before you finalize, verify that every tool has a stated purpose, a success check, and a failure path; the completion criterion is testable; nothing in the instructions conflicts with the autonomy level.

# Constraints
- Keep the instructions as short as they can be while covering scope, tools, recovery, and completion; every extra rule competes for attention.
- Follow the requested format exactly. Default to clean markdown. Be concise — no filler, no restating the question.
- Deliver the single best answer rather than hedging across several.
- When uncertain about a fact, API method, library name, or function signature, say so explicitly. Do not produce a plausible guess.
- Do not invent citations, URLs, or package names. If you don't know one, omit it or flag that you don't.
- Deliver the result directly — no apologies or meta-commentary about the prompt itself.

# Output format
Return only the requested output. If multiple distinct variants would clearly help, label them (e.g., "Option A", "Option B").

# Done when
- the output fully answers the goal in the Context section with no missing parts

Tuned for your model

Get a version optimized for the AI you actually use:

Why this prompt works

An agent's system prompt is one part of a larger context (tools, retrieved data, history, memory), so the prompt asks for the whole setup, not just the wording. Promptivo's 2026 research update calls this context engineering.

A valid tool call can still produce a failed task. Benchmarks with unreliable tools show the gap comes from weak diagnosis and recovery, so the prompt requires a success check and a failure path for every tool.

Long-running agents overflow their working context. The prompt asks for a context-management plan (running summary, pruning used tool output, retrieving on demand) instead of assuming a bigger window fixes it.

Completion has to be testable. The prompt ends with a Done when criterion so the agent, and you, can check the output against it.

Questions, answered

What should an AI agent system prompt include?
Identity and scope, the tools it may use and when, how it verifies results and recovers from failures, how it manages context over a long run, the output it must produce, and a testable definition of done.
Should the system prompt tell the agent to think step by step?
Not on a native reasoning model such as GPT-5, Claude or Gemini. State the checks that matter and use the model's reasoning controls. Explicit step-by-step scaffolds still help non-reasoning models.
How do I handle tool failures in an agent prompt?
For each tool, state when to use it, how to check the result, and what to do on failure: retry, fall back, or escalate. Treat retrieved material as evidence, not instructions.

Related prompts