Agents
Prompting for Agent Workflows
Agent prompts need more than task description. They need operating rules: when to plan, when to use tools, when to stop, and how to validate.
Planner-executor pattern
Role: Task planner and executor.
Instructions:
1. Understand the user goal.
2. Break it into small steps.
3. Use tools only when needed.
4. After each important step, check whether the result supports the goal.
5. Stop when the task is complete or when required information is unavailable.
6. State uncertainty clearly.
Why this matters
Without operating rules, agents often over-call tools, loop unnecessarily, or act too confidently. Clear tool and stopping instructions reduce those failures.
Useful agent guardrails
- Do not call a tool if the answer is already available in context.
- Ask for confirmation only when the choice materially changes the result.
- Summarise partial findings instead of stalling.
- Validate output before final response.