mirror of
https://github.com/langchain-ai/langgraphjs.git
synced 2026-07-22 17:15:25 -04:00
29f071d826
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Assistant-UI Claude Example
This example combines:
@assistant-ui/reactfor the Claude-style chat surface@langchain/reactfor streaming LangGraph state on the frontend- a basic
langchainagent on the backend
What it shows
- A Claude-inspired assistant-ui thread and composer
- A local single-agent graph powered by
langchain - How to bridge
@langchain/reactstate into assistant-ui withuseExternalStoreRuntime
Setup
Create a local .env file in this folder with:
OPENAI_API_KEY=your_openai_api_key
OPENAI_MODEL=gpt-4.1-mini
Optional overrides:
LANGGRAPH_API_URL=http://localhost:2024
VITE_LANGGRAPH_API_URL=http://localhost:2024
VITE_LANGGRAPH_ASSISTANT_ID=assistant-ui-claude
Run
pnpm --filter @examples/assistant-ui-claude dev
Then open the Vite URL shown in the terminal, usually http://localhost:5173.
The frontend talks directly to the LangGraph dev server at
http://localhost:2024, which serves the local assistant-ui-claude graph from
langgraph.json.