# langchain-ai/langchain-nextjs-template

LangChain + Next.js starter template

Repository: https://github.com/langchain-ai/langchain-nextjs-template
Canonical: https://ross.abutalabs.com/products/langchain-nextjs-template
Homepage: https://langchain-nextjs-template.vercel.app
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2026-08-24T09:32:51+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 35, longevity 80
- inputs: {"age_days": 1132, "days_push": 9, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2521, forks 561 (observed 2026-08-28T04:06:58.273504+00:00)

## What it is
A starter template scaffolding a LangChain.js application in Next.js, with example API routes for chat, structured output, agents, and RAG. It uses LangGraph.js for agentic workflows and the Vercel AI SDK to stream tokens to the client.

## Use cases
- build a chatbot with nextjs and langchain
- streaming llm chat app starter
- rag with vector store in nextjs
- llm agent example with langgraph
- structured output from llm calls
- deploy langchain app to vercel

## When to choose
- you want a ready-made Next.js + LangChain.js starting point with working chat, RAG, and agent examples
- you want serverless-friendly, Vercel-deployable LLM streaming UI
- you want to learn LangGraph.js agent patterns with minimal boilerplate

## When to avoid
- you need a production backend framework rather than a demo scaffold
- you don't use Next.js or the JavaScript/TypeScript ecosystem
- you need non-OpenAI model setup out of the box without changes

## Facets
- artifact type: learning-resource
- maturity: active
- function: rag, chatbot, agent-framework, llm-inference, web-framework, prompt-engineering
- domain: large-language-models, chatbots, web-development, frontend, developer-tools
- platform: serverless, cloud
- tags: langchain, nextjs, vercel-ai-sdk, langgraph, starter-template, streaming, openai, boilerplate, retrieval-augmented-generation, ai-agents, nodejs, typescript, web-server

## Member repositories
- langchain-ai/langchain-nextjs-template (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:58.273504+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T08:31:48.908840+00:00, confidence not recorded.
  - readme: https://github.com/langchain-ai/langchain-nextjs-template (fetched 2026-08-28T04:06:58.273504+00:00, sha 1a6f09d0e3cb)
  - homepage: https://langchain-nextjs-template.vercel.app (fetched 2026-08-29T10:08:19.645570+00:00, sha abf389e0c0da)
- Data as of 2026-08-30T08:39:29.467469+00:00.
