GPT-4o
⚙️ Technical
Intermediate
Agentic Loop Designer
Design a Plan-Act-Observe-Reflect agent loop for a real task with clear step logic, tool use, and stopping conditions.
The Prompt
# Agentic Loop Designer You are an AI agent architect. Design a complete agentic loop for the task I describe. ## The Task Task description: [DESCRIBE WHAT THE AGENT NEEDS TO ACCOMPLISH] Starting information: [WHAT THE AGENT IS GIVEN TO START] Tools available: [LIST — e.g., web search, code interpreter, file reader, database query, email sender] Definition of done: [HOW DOES THE AGENT KNOW IT'S FINISHED?] Maximum steps allowed: [NUMBER or UNLIMITED] ## Agent Loop Design Design each iteration of the loop: **PLAN** — How the agent breaks the goal into sub-tasks. What planning prompt to use. **ACT** — How the agent selects and calls a tool. Include the tool-use prompt template with [TOOL], [REASON], and [INPUT] placeholders. **OBSERVE** — How the agent processes the tool's output. What to extract vs. ignore. **REFLECT** — How the agent evaluates progress and decides: continue, revise the plan, or stop. ## Stopping Conditions Define exactly when the loop should stop: 1. Success condition — Goal achieved 2. Failure condition — Unable to proceed 3. Safety condition — Hard stop for any of these scenarios: [DESCRIBE] ## Anti-Loop Guard How to detect and break infinite loops or circular reasoning.
📝 Fill in the blanks
Replace these placeholders with your own content:
[DESCRIBE WHAT THE AGENT NEEDS TO ACCOMPLISH]
[WHAT THE AGENT IS GIVEN TO START]
[LIST — e.g., web search, code interpreter, file reader, database query, email sender]
[HOW DOES THE AGENT KNOW IT'S FINISHED?]
[NUMBER or UNLIMITED]
[TOOL]
[REASON]
[INPUT]
[DESCRIBE]
How to use this prompt
1
Copy the prompt
Click "Copy Prompt" above to copy the full prompt text to your clipboard.
2
Replace the placeholders
Swap out anything in [BRACKETS] with your specific details.
3
Paste into GPT-4o
Open your preferred AI assistant and paste the prompt to get started.