Prompt LibraryAgents

Agent State Machine Designer Prompt

Model an agent as an explicit state machine.

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.

Share this prompt