What is a System Prompt?
A system prompt is natural language text that tells the agent:- Who it is - Its role and persona
- What it does - Its responsibilities and goals
- How it works - When to use tools, decision criteria
- What it produces - Output format and tone
Unlike traditional code, agents understand natural language instructions. You don’t write if/then logic - you explain the task like you would to a smart colleague.
Anatomy of a Good Prompt
Effective system prompts typically include these sections:1. Role and Context
Define who the agent is and what domain it operates in.2. Core Responsibilities
List the agent’s main tasks.3. Decision Logic
Explain how the agent should make decisions.4. Output Format
Specify how the agent should structure its response.Complete Example
Here’s a full system prompt for an alert triage agent:View Complete Example Prompt
View Complete Example Prompt
Prompt Engineering Tips
Be Specific, Not Vague
Be Specific, Not Vague
Bad: “Use VirusTotal to check things”Good: “Use VirusTotal to check any file hashes from the alert. If more than 5 vendors flag it as malicious, classify as Critical.”
Provide Examples
Provide Examples
Show the agent what good looks like:
Explain Edge Cases
Explain Edge Cases
Cover scenarios where the agent might get confused:
Set Boundaries
Set Boundaries
Tell the agent what NOT to do:
Use Structured Sections
Use Structured Sections
Break your prompt into clear sections with headers. This helps agents parse and follow instructions better.
Improving Prompts Automatically
Once your agent is deployed, Cotool automatically evaluates every run and suggests improvements when issues are detected:1
Write Initial Prompt
Start with clear instructions covering role, responsibilities, and decision logic
2
Deploy and Monitor
Agent runs are automatically evaluated (scored 0-100)
3
Review Suggestions
When runs score poorly, system detects issues and suggests prompt fixes
4
Accept Improvements
Click “Generate Diff” to see suggested changes, then accept or reject
5
Track Versions
Each accepted improvement creates a new version automatically
Learn About Automatic Evaluations
See how every run is scored and improvement suggestions are generated
Common Pitfalls
Context Documents
In addition to the system prompt, agents can reference external documents:Learn About Context Documents
Provide agents with runbooks, policies, and reference docs from Google Docs or Notion