ReAct interleaves Thought (reasoning), Action (tool call), and Observation (result) to solve multi-step problems.
Question: What is Tokyo current population and how has it changed since 2010?
Thought: I need Tokyo current population first.
Action: Search['Tokyo population 2024']
Observation: Tokyo population 2024 is approximately 13.96 million.
Thought: Now I need the 2010 figure for comparison.
Action: Search['Tokyo population 2010']
Observation: Tokyo population 2010 was 13.16 million.
Thought: I can calculate the change.
Action: Calculate[13.96 - 13.16]
Observation: Difference = 0.80 million
Final Answer: Tokyo current population is ~13.96 million,
up from ~13.16 million in 2010, an increase of ~800,000 people.
# ReAct is used in:
# LangChain agents
# Claude tool use
# OpenAI function calling
# AutoGen multi-agent systems