ReAct is an agent technique that alternates between step-by-step reasoning, tool actions, observations, and continued reasoning before producing a final answer. It lets an agent select tools dynamically instead of requiring examples or task-specific training. section 9.3.1 section 9.4.2
Search agent with LangChain
Configure a SerpAPI key, wrap SerpAPIWrapper in a Tool with a descriptive name and input specification, then pass it to initialize_agent() with ChatOpenAI(model="gpt-4o-mini", temperature=0) and AgentType.ZERO_SHOT_REACT_DESCRIPTION. Invoking a question such as "Who is Wei-Meng Lee?" produces a trace containing a thought, Search action, search observation, and final answer. section 9.3.1
agent_executor = create_react_agent(llm, tools)
Create a minimal LangGraph ReAct agent with create_react_agent(llm, tools); add external tools when current information, computation, or retrieval is required. section 9.4.2










