langchain-ai/react-agent

LangGraph template for a simple ReAct agent

What it solves

This project provides a template for building a ReAct agent, a prototypical AI agent that can iteratively reason about a user's query and execute actions using external tools to find an answer.

How it works

Built with LangGraph, the agent follows a continuous loop: it analyzes a user query, decides on a necessary action, executes that action via a tool, observes the result, and repeats this cycle until it has enough information to provide a final response.

Who it’s for

Developers looking for a starting point to build flexible, tool-using AI agents that can be customized with specific Python functions as tools or different LLM providers like Anthropic and OpenAI.

Highlights

  • Tool Extensibility: Easily add new capabilities by defining custom Python functions in the tools configuration.
  • Model Flexibility: Supports multiple chat models, including Claude and GPT-4.
  • Interactive Debugging: Designed for LangGraph Studio, allowing developers to edit past states and rerun the app to debug specific nodes.
  • Integration: Works with LangSmith for detailed tracing and collaboration.

Related

  • Project
  • Project
  • Project
  • Project
  • Project