Getting Started
Requirements
You need a LangGraph Cloud API server. You can start a server locally via LangGraph Studio or use LangSmith for a hosted version.
The state of the graph you are using must have a messages
key with a list of LangChain-alike messages.
New project from template
Set environment variables
Create a .env.local
file in your project with the following variables:
Installation in existing React project
Setup a proxy backend endpoint (optional, for production)
This example forwards every request to the LangGraph server directly from the browser. For production use-cases, you should limit the API calls to the subset of endpoints that you need and perform authorization checks.
Setup environment variables
Create a .env.local
file in your project with the following variables:
Setup UI components
Follow the UI Components guide to setup the UI components.