e30e75b5d4
Code Quality / Oxlint + Oxfmt (push) Waiting to run
Code Quality / Template Sync (push) Waiting to run
Code Quality / Build Changed Packages (push) Waiting to run
Code Quality / Test Changed Packages (push) Waiting to run
Deploy Expo Example / Deploy Production (push) Waiting to run
Deploy Ink Example / Deploy Production (push) Waiting to run
Python Tests / pytest (assistant-stream, 3.10) (push) Waiting to run
Python Tests / pytest (assistant-stream, 3.12) (push) Waiting to run
Python Tests / pytest (assistant-ui-sync-server-api, 3.10) (push) Waiting to run
Python Tests / pytest (assistant-ui-sync-server-api, 3.12) (push) Waiting to run
Deploy Shadcn Registry / Deploy Production (push) Waiting to run
Template Metrics / LOC + Bundle Size (push) Waiting to run
Changesets / Create Version PR (push) Has been cancelled
1.3 KiB
1.3 KiB
LangGraph Integration
This example demonstrates how to use LangChain LangGraph with assistant-ui. It is meant to be used with the backend found at LangGraph's Stockbroker example: https://github.com/bracesproul/langgraphjs-examples/tree/main/stockbroker
Quick Start
Using CLI (Recommended)
npx assistant-ui@latest create my-app --example with-langgraph
cd my-app
Environment Variables
Create .env.local:
LANGGRAPH_API_URL=http://localhost:2024
LANGCHAIN_API_KEY=
NEXT_PUBLIC_LANGGRAPH_ASSISTANT_ID=stockbroker
LANGGRAPH_API_URL is the LangGraph deployment URL the bundled /api/[..._path] proxy fetches from. LANGCHAIN_API_KEY is forwarded as x-api-key and can be blank for an unauthenticated dev server. NEXT_PUBLIC_LANGGRAPH_ASSISTANT_ID is the graph id (a key under graphs in your langgraph.json).
Run
npm install
npm run dev
Features
- LangGraph agent integration via
@assistant-ui/react-langchain - Thread list for conversation management
- Custom tool UI for stock price snapshots
- Custom tool UI for stock purchases