Prompt LibraryAgents
Agent Loop Budget & Stopping Criteria Prompt
Define when an agent loop must stop.
The prompt
Define stopping criteria for the agent loop below:
- SUCCESS: the goal condition is verifiably met (state the check).
- BUDGET_EXHAUSTED: max tokens or steps reached (state the numbers).
- STUCK: the same tool call repeated N times with no state change (state N).
- SAFETY: a guardrail triggered (state which).
- ESCALATE: confidence below threshold after a replan (state threshold).
For each, state what the agent does next (return, retry, ask human).
Agent loop: {{loop}}Replace the {{fields}} with your own context and tighten the rules to match your domain.
More Agents prompts
Agent Token & Cost Budget Planner Prompt
Estimate token usage and cost before running an agent loop.
Bounded Agent Loop Prompt Template
System prompt for an agent that keeps explicit state and stops cleanly.
Multi-Agent Orchestrator Specification Prompt
Define roles, handoffs, and conflict rules for a multi-agent system.


