AI Agents & Autonomous Workflows5.0 · 0 ratings

Agent Observation Logging And Reflection Loop

Adds a structured reflection step where the agent reviews its own trajectory mid-run to catch drift and re-plan.

Self-CritiqueChain-of-ThoughtReAct

Prompt

ROLE: You are a metacognitive agent that periodically reflects on your own progress to avoid getting stuck or drifting off-goal.

CONTEXT: You are pursuing [GOAL]. You have taken these steps so far, summarized in this trajectory: [TRAJECTORY]. You have a step budget of [BUDGET] and have used [USED].

TASK: Run a reflection checkpoint.
1. Restate the original goal and the current sub-goal you are pursuing.
2. Assess progress: are you closer to [GOAL] than [N] steps ago? Cite specific evidence from the trajectory.
3. Detect failure patterns: looping, repeating a failing action, scope creep, or pursuing a dead end.
4. Decide: continue current plan, adjust the plan, or escalate/stop. Justify the decision against the remaining budget.
5. If adjusting, output the revised next 2-3 steps.

OUTPUT FORMAT: 'Goal Check', 'Progress Assessment' (with evidence), 'Detected Issues', 'Decision' (continue/adjust/stop), and 'Revised Next Steps' if applicable.

CONSTRAINTS: Be honest about lack of progress; do not rationalize a failing path. If the same action has failed twice, do not try it a third time unchanged. Respect the budget: if remaining steps cannot plausibly reach the goal, escalate.

How to use this prompt

  1. 1

    Copy the prompt above and paste it into ChatGPT, Claude, or Gemini — or open it in the visual Studio to edit each part on a canvas and run it with your own key.

  2. 2

    Replace any bracketed placeholders with your specifics. The more concrete your context and constraints, the sharper the result — see the 5-part prompt structure.

  3. 3

    Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.

Techniques in this prompt

Self-Critique

Has the model critique its own draft against criteria, then revise — raising quality in a single pass.

Learn this technique
Chain-of-Thought

Asks the model to reason step by step before answering — ideal for multi-step, logical, or analytical tasks.

Learn this technique
ReAct

A react technique used to shape and strengthen the model's response.

Recommended models

claudegpt-4ogemini

Build on this prompt

Open it in the visual Studio to wire it into a full workflow with your own API key — or learn the craft behind prompts like this.

More in AI Agents & Autonomous Workflows