Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
LangChain + Next.js starter template
| Date | Stars |
|---|---|
| 2026-07-31 | 2511 |
| 2026-08-01 | 2512 |
| 2026-08-02 | 2511 |
| 2026-08-04 | 2512 |
| 2026-08-06 | 2512 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# 🦜️🔗 LangChain + Next.js Starter Template [](https://codespaces.new/langchain-ai/langchain-nextjs-template) [](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flangchain-ai%2Flangchain-nextjs-template) This template scaffolds a LangChain.js + Next.js starter app. It showcases how to use and combine LangChain modules for several use cases. Specifically: - [Simple chat](/app/api/chat/route.ts) - [Returning structured output from an LLM call](/app/api/chat/structured_output/route.ts) - [Answering complex, multi-step questions with agents](/app/api/chat/agents/route.ts) - [Retrieval augmented generation (RAG) with a chain and a vector store](/app/api/chat/retrieval/route.ts) - [Retrieval augmented generation (RAG) with an agent and a vector store](/app/api/chat/retrieval_agents/route.ts) Most of them use Vercel's [AI SDK](https://github.com/vercel-labs/ai) to stream tokens to the client and display the incoming messages. The agents use [LangGraph.js](https://langchain-ai.github.io/langgraphjs/), LangChain's framework for building agentic workflows. They use preconfigured helper functions to minimize boilerplate, but you can replace them with custom graphs as desired. https://github.com/user-attachments/assets/e389e4e4-4fb9-4223-a4c2-dc002c8f20d3 It's free-tier friendly too! Check out the [bundle size stats below](#-bundle-size). You can check out a hosted version of this repo here: https://langchain-nextjs-template.vercel.app/ ## 🚀 Getting Started First, clone this repo and download it locally. Next, you'll need to set up environment variables in your repo's `.env.local` file. Copy the `.env.example` file to `.env.local`. To start with the basic examples, you'll just need to add your OpenAI API key. Because this app is made to run in serverless Edge functions, make sure you've set the `LANGCHAIN_CALLBACKS_BACKGROUND` environment variable to `false` to ensure tracing finishes if you are using [LangSmith tracing](https://docs.smith.langchain.com/). Next, install the required packages using your preferred package manager (e.g. `yarn`). Now you're ready to run the development server: ```bash yarn dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result! Ask the bot something and you'll see a streamed response:  You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. Backend logic lives in `app/api/chat/route.ts`. From here, you can change the prompt and model, or add other modules and logic. ## 🧱 Structured Output The second example shows how to have a model return output according to a specific schema using OpenAI Functions. Click the `Structured Output` link in the navbar to try it out:  The chain in this example uses a [popular library called Zod](https://zod.dev) to construct a schema, then formats it in the way OpenAI expects. It then passes that schema as a function into OpenAI and passes a `function_call` parameter to force OpenAI to return arguments in the specified format. For more details, [check out this documentation page](https://js.langchain.com/docs/how_to/structured_output). ## 🦜 Agents To try out the agent example, you'll need to give the agent access to the internet by populating the `SERPAPI_API_KEY` in `.env.local`. Head over to [the SERP API website](https://serpapi.com/) and get an API key if you don't already have one. You can then click the `Agent` example and try asking it more complex questions:  This example uses a [prebuilt LangGraph agent](https://langc
Excerpt of 7,411 characters
Read on GitHubJacob Lee · @langchain-ai · United States
151
John Kennedy · @langchain-ai
30
David Duong · Czech Republic
30
Brace Sproul · @langchain-ai
29
14
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:293722f1df606ed4, llm:Repository description: 'LangChain + Next.js starter template' (TypeScript).
matched fp:293722f1df606ed4, llm:Repository description: 'LangChain + Next.js starter template' (TypeScript).
matched fp:293722f1df606ed4, llm:Repository description: 'LangChain + Next.js starter template' (TypeScript).