rag-research-agent-template

Report Abuse

Basic Information

This repository is a starter template for developers to build a retrieval-augmented generation (RAG) research agent using LangGraph and LangGraph Studio. It provides ready-made graph definitions and example workflows so developers can prototype a stateful agent that indexes documents, manages chat history, plans research steps, runs parallel document retrievals, and composes responses from retrieved context. The codebase includes an index graph, a retrieval graph, and a researcher subgraph with source files under src/index_graph, src/retrieval_graph, and src/retrieval_graph/researcher_graph. It also includes sample documents used by the indexer when no input is provided. The repo is intended to be run and edited in LangGraph Studio, configured via a .env file, and integrated with external retrievers, embedding providers, and LLMs for experimentation and extension.

Links

App Details

Features
Includes three example graphs: an index graph to ingest and persist documents, a retrieval graph that manages chat history and routes queries, and a researcher subgraph that generates stepwise research plans and parallel query retrieval. Provides a sample documents file so the indexer can be exercised out of the box. Supports multiple retriever backends with setup guidance for Elasticsearch (including Docker), MongoDB Atlas vector search, and Pinecone serverless. Configurable model choices and defaults are provided for response and query models and for embedding models, with examples for Anthropic, OpenAI, and Cohere. Prompts and behavior are customizable via src/retrieval_graph/prompts.py. Designed for iterative development in LangGraph Studio with hot reload, state editing, and guidance for extending nodes and adding tools.
Use Cases
This template accelerates prototyping of RAG research agents by providing a working, extensible example that demonstrates common RAG patterns: indexing, retrieval, query routing, research planning, parallel document fetch, and response generation. It documents how to connect popular vector stores and databases, how to configure embedding and LLM providers, and how to tune search parameters and system prompts. Developers can modify prompts, swap retrievers or models, add new nodes or tools, and debug by replaying past states in LangGraph Studio. The repo also shows operational details such as environment variable configuration, sample index population, and integration options for tracing and collaboration, which reduce setup friction for experiments and production exploration.

Please fill the required fields*