Docs/Agent Studio/Prompt Writing

Prompt Writing

Write effective prompts that make your agents perform better.

Prompt Fundamentals

A good prompt clearly defines who the agent is, what it should do, and how it should behave. Think of it as training a new employee.

Key Components

Every effective prompt includes:

  • Identity - Who is the agent? (name, role, company)
  • Purpose - What is the primary goal?
  • Tone - How should it communicate? (friendly, professional, casual)
  • Boundaries - What should it NOT do?
  • Fallbacks - How to handle edge cases

Example Structure

Use this template as a starting point:

  • ## Identity: You are [Name], a [role] for [Company].
  • ## Purpose: Your main goal is to [primary objective].
  • ## Style: Be [tone descriptors]. Keep responses [length guidance].
  • ## Instructions: [Specific behaviors and rules]
  • ## Boundaries: Never [things to avoid].

Common Mistakes

Avoid these prompt pitfalls:

  • Being too vague - 'Be helpful' doesn't give enough direction
  • Being too long - Agents work better with focused prompts
  • Conflicting instructions - Don't say 'be brief' then ask for details
  • Forgetting edge cases - What if the caller asks something unexpected?
  • No personality - Generic agents feel robotic