✦ Practitioner reference

LangChain for agent development

Every concept below is something you'll actually reach for building agents in production. Each subtype is a complete, self-contained example — imports, model setup, and all — pulled from real agent-development contexts: support triage, DevOps tooling, internal document search, and similar.

Running the examples locally

All code below assumes a free, local model via Ollama — no API key needed to follow along.

1. Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
2. Pull the model
ollama pull qwen2.5:7b
3. Install packages
pip install langchain langchain-ollama langgraph langchain-chroma
4. Base setup used below
llm = ChatOllama(model="qwen2.5:7b")