Agentic RAG Lab — A Minimal LangGraph Demo

A single-file version of LangGraph's Agentic RAG tutorial. Useful as a starting point for reading the agentic-RAG pattern end-to-end without wading through a multi-module example.

GitHub: anoop22/agentic-rag-lab

A deliberately small repository: one Python file that implements the agentic-RAG pattern from LangGraph's tutorial. The point is not to ship a product — the point is to have the entire control flow on screen at once when you're trying to understand why the agent retrieves, rewrites, retrieves again, and finally answers.

Running

export OPENAI_API_KEY=<your key>
python agentic_rag.py

The script streams updates from the agent as it answers a demo question, so you can watch each node fire and see how state moves through the graph.

Why a lab repo

Reference implementations are usually split across modules, configs, and docs. That's correct for production. For learning a pattern, the cost is too high — you spend more time chasing imports than understanding the flow. This repo is the opposite trade-off: everything in one file, easy to fork and modify, easy to delete when you've learned what you came for.