The prompt
Model the agent below as a state machine.
List: states, the transitions between them (with the trigger condition for each), the terminal states, and the guard on each transition.
Then mark any state where the agent could get stuck in a cycle, and add an escape transition.
Agent description: {{agent}}Replace the {{fields}} with your own context and tighten the rules to match your domain.
More Agents prompts
Bounded Agent Loop Prompt Template
System prompt for an agent that keeps explicit state and stops cleanly.
Agent Tool Description Generator Prompt
Write a tool description a model will actually route to correctly.
Agent Safety Guardrail Specification Prompt
Write explicit safety rules an agent must obey at every turn.



