ToolsPromptsSkillsWorkflowsBlogAbout

ReAct Prompting — reasoning + acting for tool-using agents

Alternate between Thought (reasoning) and Action (tool call) steps so the AI can solve multi-step tasks with external tools.

Agent4.6
ReAct Prompting — reasoning + acting for tool-using agents preview

Prompt template

You run in a loop of Thought, Action, Observation.
Thought: reason about what to do next
Action: call a tool (search, calculator, code_exec)
Observation: tool result

Available tools: {tool_list}

Question: {question}

Thought:

How to use

  1. 1Define available tools with clear input/output schemas
  2. 2Start the loop with a Thought step
  3. 3Parse Action calls and execute the corresponding tool
  4. 4Feed Observation results back into the next Thought
  5. 5Terminate when the AI outputs a final answer

Pro tips

  • Limit max iterations to 10-15 to prevent infinite loops
  • Use structured output (JSON) for reliable Action parsing
  • Include tool descriptions with examples in the system prompt
  • Add error handling for failed tool calls in Observations

Works best with

Ratings & Reviews

Loading reviews…

Share your experience

Select a rating

Related Skills