LangGraph ReAct Agent: Three-Tool Orchestration with GPT-4o
Intermediate · 30 minutes · 5 tasks, checked automatically · 100 points
Build a LangGraph ReAct agent powered by GPT-4o that is equipped with three distinct tools — a calculator, a unit converter, and a simple in-memory key-value store — then drive it through a multi-step task that forces the model to reason about which tool to call at each step. You will see LangGraph's prebuilt create_react_agent wire the StateGraph, bind the tools, and stream every node transition so you can follow the agent's chain of thought in real time.
What you’ll learn
- Install LangGraph, LangChain-Core, and the OpenAI LangChain integration inside the toolbox container
- Implement three @tool-decorated functions (calculator, unit_converter, kv_store) and register them with create_react_agent
- Invoke the agent with a multi-step prompt that requires all three tools and verify each tool was called during the run
How this lab works
- Start the lab: One click starts a sandbox with a local model and the agent’s toolbox: no API key and no token bill.
- Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work inspects the agent, its config and its output, and says what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Runs: Locally, against a model on your computer: no API key, no tokens
- Model: gpt-4o
- Open source: github.com/langchain-ai/langgraph
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- An OpenAI API key added to the LearnXops Agent Playground (stored in OPENAI_API_KEY inside the toolbox)
- A hosted sandbox created in the Agent Playground (no local model container needed)
Topics: langgraph, react-agent, gpt-4o, tool-calling, multi-step, openai, langchain, streaming
Create a free account to start this lab.
Keep going
- Install, Inspect, and Disable an OpenClaw Plugin from ClawHub
- OpenClaw Message Queue Channel: Agent-Powered Request/Reply
- Shape Agent Behaviour with SOUL.md, USER.md and AGENTS.md
- Hermes Session Memory: Full-Text Search and Fact Recall
- Hierarchical CrewAI: Manager Agent Delegating to Specialists
- CrewAI Memory: Persistent Recall Across Executions