Single agent
ReAct loop
Alternate reasoning and acting until the goal is met.
1 agentCore
How it works
- 1Write a Thought: what to do next and why.
- 2Take one Action: a single tool call.
- 3Observe the result and update the plan.
- 4Repeat until done — always with a max-step limit and a clear success condition.
Use it when
Open-ended tasks where the next move depends on what the last action revealed — exploration, debugging, multi-hop research.
Reach for something else when
The path is known up front (use a chain), or the loop has no stopping rule and can run away.
Where you stay in the loop
You set the goal, the available tools, and the stopping rule; the agent drives the loop. Stay close on open-ended runs — read the Thoughts to catch a plan going sideways before it burns steps.
In the wild
Fixing a failing test: think → run test → read error → edit code → re-run → stop when green.
Hand this to your agent
Run as a ReAct agent. Loop in exactly this format: Thought: <your reasoning> Action: <one tool call> …then stop and wait for me to paste the Observation. Never take more than one action per turn. Give a Final Answer when the goal is met or after 8 steps. Tools: <list> Goal: <...>
Replace the <…> placeholders, paste it into your agent, and it'll scaffold the workflow with you.