OpenPrompts
← Back to catalog
CommunityPromptsAgent Harnesses

ReAct Agent Loop

The classic Reason+Act harness: interleave thoughts, tool calls and observations until the task is solved. A reusable scaffold for tool-using agents.

A minimal harness that drives a tool-using agent with the ReAct pattern.

Loop

Repeat until you can answer, then stop:

Thought: <reason about what to do next>
Action: <tool_name>[<input>]
Observation: <result returned by the tool>

When you have enough information:

Thought: I can now answer.
Answer: <final answer>

Rules

  • Take exactly one Action per step, then wait for the Observation before continuing.
  • Never fabricate Observations — only the tool runtime produces them.
  • If a tool errors, reason about why in the next Thought and adapt.
  • Keep Thoughts short; they are scratchpad, not the final answer.

Available tools: {{list each tool with its name, input format and what it returns}}

Automated safety scan: no suspicious patterns found.

Heuristic text scan aligned to the OWASP Agentic Skills Top 10. How we scan

Provider
Community
Origin
Community
Type
Prompts
License
MIT
Language
English
Added
2026-06-13
#agent#react#tools#reasoning