#77th of 18 in Chat apps

langchain-nextjs-template

Next.js routes for LangChain.js chat, agents, structured output and RAG

Releases and problems feed (RSS)

Stars
2.6k
License
MIT
Last commit
Nov 2026
Language
TypeScript
Stars, last 34 weeks+153
28 Mar 2026: 2,400 stars4 Apr 2026: 2,411 stars11 Apr 2026: 2,424 stars18 Apr 2026: 2,436 stars25 Apr 2026: 2,446 stars2 May 2026: 2,455 stars9 May 2026: 2,459 stars16 May 2026: 2,463 stars23 May 2026: 2,465 stars30 May 2026: 2,467 stars6 Jun 2026: 2,473 stars13 Jun 2026: 2,475 stars20 Jun 2026: 2,481 stars27 Jun 2026: 2,485 stars4 Jul 2026: 2,488 stars11 Jul 2026: 2,491 stars18 Jul 2026: 2,497 stars25 Jul 2026: 2,500 stars1 Aug 2026: 2,502 stars8 Aug 2026: 2,506 stars15 Aug 2026: 2,508 stars22 Aug 2026: 2,509 stars29 Aug 2026: 2,516 stars5 Sept 2026: 2,517 stars12 Sept 2026: 2,522 stars19 Sept 2026: 2,527 stars26 Sept 2026: 2,527 stars3 Oct 2026: 2,533 stars10 Oct 2026: 2,534 stars17 Oct 2026: 2,539 stars24 Oct 2026: 2,543 stars31 Oct 2026: 2,547 stars7 Nov 2026: 2,547 stars14 Nov 2026: 2,549 stars21 Nov 2026: 2,553 stars

2,400 on 28 Mar 20262,553 on 21 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

LangChain is hiring: 101 open roles

Overview

Five Next.js API routes that each show one LangChain.js pattern: plain chat, Zod structured output, a prebuilt LangGraph.js agent with Tavily search, and RAG as a chain and as an agent over a Supabase pgvector table. Tokens stream to the client through the AI SDK, routes run on Edge functions, and there is no auth or persistence beyond the vector table. For developers learning LangChain.js who want runnable routes to copy.

Who it is for: Developers learning LangChain.js on Next.js

Strengths

  • Each pattern is one route file you can lift into your own app
  • Hosted demo on Vercel
  • Mock-backed integration tests run without API keys or a live database
  • Supabase adapter reuses the documents table and match_documents function; no migration

Weaknesses

  • No auth and no chat history persistence
  • OpenAI only out of the box; other providers need code changes
  • Re-ingesting the same text duplicates vectors; no dedupe
  • Agent and search examples need a Tavily key

What it needs

  • TypeScript, openai, langchain, langgraph, ai-sdk
  • Needs openai-api-key, supabase, tavily-api-key
  • GitHub template
  • env example file

Also in Chat apps

See all 18
Also in Chat apps
RankProjectScore
#5chatbotNext.js chat template with Auth.js, Postgres history and AI Gateway models Live demo ↗ (opens in a new tab)21.1k starsApache-2.066 out of 100
#6boarduiReact component library for agent UIs, installed as source via CLI1.3k starsMIT58 out of 100
#8twitterbioSingle-form Next.js text generator streaming from Together AI Live demo ↗ (opens in a new tab)1.8k starsMIT49 out of 100
#9gemini-chatbotNext.js chatbot template defaulting to Gemini with NextAuth and Postgres Live demo ↗ (opens in a new tab)1.4k starsApache-2.044 out of 100
#10chatNuxt chat app template with GitHub auth, SQLite history and AI SDK streaming Live demo ↗ (opens in a new tab)380 starsMIT41 out of 100