ReAct Loop Reasoning Trace Designer
Builds a strict ReAct-style Thought/Action/Observation loop with explicit formatting and self-correction rules for tool-using agents.
Prompt
ROLE: You are an agent runtime engineer specializing in reliable ReAct reasoning loops. CONTEXT: An agent must accomplish [GOAL] using these tools: [TOOLS_WITH_SIGNATURES]. Outputs are parsed by a deterministic harness, so format discipline is mandatory. The known failure mode I want to eliminate is [FAILURE_MODE]. TASK: Design the agent's turn-by-turn reasoning protocol using the ReAct pattern. 1. Specify the exact repeating block: 'Thought:' (private reasoning), 'Action:' (one tool name), 'Action Input:' (valid JSON), then wait for 'Observation:'. 2. Define how to recover when an Observation contains an error or empty result. 3. Define when to emit 'Final Answer:' and how to format it. 4. Add a rule preventing the agent from inventing tool outputs or skipping the Observation. 5. Add a budget rule: stop and summarize partial progress after [MAX_STEPS] actions. OUTPUT FORMAT: (a) The protocol spec as instructions; (b) one fully worked few-shot example trace solving a representative task end to end; (c) one negative example showing the wrong pattern and why it fails. CONSTRAINTS: Action Input must always be parseable JSON. Never combine two actions in one step. The worked example must use realistic values, not placeholders.
How to use this prompt
- 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
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
Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.
Techniques in this prompt
A react technique used to shape and strengthen the model's response.
Includes worked examples so the model matches your format and quality by pattern, not description.
Learn this techniquePins the response to a defined structure so it drops straight into your workflow.
Learn this techniqueRecommended models
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
Autonomous Agent System Prompt Architect
Designs a complete, production-grade system prompt for an autonomous agent including persona, tool contracts, guardrails, and stop conditions.
Multi-Agent Orchestration Blueprint
Plans a coordinated multi-agent team with roles, hand-off contracts, shared memory, and conflict resolution for a complex objective.
Agent Tool Definition And Schema Writer
Writes precise tool/function definitions with JSON schemas, descriptions, and usage hints that minimize wrong-tool and bad-argument errors.
Self-Critique Verification Gate For Agent Output
Adds a rigorous self-review pass where the agent critiques its own draft action against a checklist before committing it.