{"repo":"langchain-ai/langchain-nextjs-template","free":true,"listed":false,"github":"https://github.com/langchain-ai/langchain-nextjs-template","clone":"git clone https://github.com/langchain-ai/langchain-nextjs-template.git","description":"LangChain + Next.js starter template","language":"TypeScript","stars":2515,"topics":[],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"🦜️🔗 LangChain + Next.js Starter 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 - Returning structured output from an LLM call - Answering complex, multi-step questions with agents - Retrieval augmented generation (RAG) with a chain and a vector store - Retrieval augmented generation (RAG) with an agent and a vector store Most of them use Vercel's AI SDK to stream tokens to the client and display the incoming messages. The agents use LangGraph.js, 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. 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. Next, install","default_branch":null,"files":null,"tree":[],"storefront":"/r/langchain-ai","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/langchain-ai/langchain-nextjs-template/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}