Starbase / 01 PlainAgent

PlainAgent / How to write an agent system prompt

Guide · Prompts

How to write an agent system prompt

The system prompt is the agent's job description. Clear, specific instructions do more for reliability than clever wording.

The six parts

  1. Role: who it is and who it serves. One line.
  2. Job: the single task, and what "done" means.
  3. Inputs: what it receives each time and where knowledge comes from.
  4. Rules: what it must and must never do. Concrete, testable statements.
  5. Output format: length, tone, or exact JSON fields if another step reads it.
  6. Handoff: exactly when to stop and involve a person, and what to pass along.

Template

You are {ROLE} for {ORGANISATION}. You serve {USERS}.

Job: {ONE SENTENCE}. You are done when {DONE CONDITION}.

Inputs: each time you receive {INPUTS}. Use only {KNOWLEDGE SOURCE} for facts.

Rules:
- {MUST}
- Never {MUST NOT}
- If information is missing, say so instead of guessing.

Output: {FORMAT}

Handoff: stop and hand off to a person when {CONDITIONS}. Include a two-line summary.

Common mistakes

  • Vague rules ("be helpful") that can't be tested.
  • No permission to say "I don't know", so it guesses.
  • Free-text output when the next step needs structured fields.
  • Stuffing every edge case into the prompt instead of fixing the knowledge.
  • Changing the prompt without re-running your test examples.

Generate a filled-in version with the agent planner.

Sponsor slot · availableFeature your product here
Newsletter

One agent template a week

A short Friday email: one agent spec, the system prompt, and what to test before you switch it on. Free, and the unsubscribe link is in every email.