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.