Files
wehub-resource-sync 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
chore: import upstream snapshot with attribution
2026-07-13 13:40:13 +08:00
..

This is the assistant-ui starter project for LangGraph. It ships a minimal Claude-backed agent (backend/agent.ts) plus a Next.js chat UI that streams from it.

Getting Started

  1. Copy env template and fill in secrets:

    cp .env.example .env.local
    

    Required:

    • ANTHROPIC_API_KEY — used by backend/agent.ts

    Optional:

    • ANTHROPIC_MODEL — override the default model id
    • LANGSMITH_TRACING / LANGSMITH_API_KEY / LANGSMITH_PROJECT — tracing
    • LANGCHAIN_API_KEY — only needed when pointing LANGGRAPH_API_URL at LangGraph Platform (cloud)
  2. Install deps and run both the LangGraph backend and the Next.js frontend:

    pnpm install
    pnpm dev
    
    • localhost:2024 — LangGraph dev server (serves the agent graph)
    • localhost:3000 — Next.js app (proxies /api/*LANGGRAPH_API_URL)

    Run them individually with pnpm dev:backend and pnpm dev:frontend.

Project layout

app/                Next.js App Router pages + /api proxy
backend/agent.ts    LangGraph graph exported as `graph`
langgraph.json      LangGraph CLI config (graph id, node version, env file)

app/assistant.tsx builds the runtime with useStreamRuntime({ assistantId, apiUrl }) from @assistant-ui/react-langchain, which wraps useStream from @langchain/react.