# Langchain

> LangChain LLM application framework with chains and agents. Use for LLM orchestration. Use when this capability is needed.

- Skill: `tomevault-io/langchain-6` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/langchain-6`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/langchain-6/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/langchain-6

---


# LangChain

LangChain is the standard framework for chaining LLM components. In 2025, the focus shifted to **LangGraph** for building stateful, cyclic agents.

## When to Use

- **Orchestration**: Chaining "Prompt -> LLM -> Parser".
- **Agents**: Using LangGraph to build agents that can loop, retry, and keep state.
- **Integrations**: 1000+ connectors for vector DBs, APIs, and tools.

## Core Concepts

### LangGraph

The successor to `AgentExecutor`. A graph-based way to define agent flows with cycles (loops).

### LCEL (LangChain Expression Language)

The declarative pipe syntax: `prompt | llm | output_parser`.

### LangSmith

Observability platform to trace and debug complex chains.

## Best Practices (2025)

**Do**:

- **Use LangGraph**: For any non-trivial agent. `AgentExecutor` is legacy.
- **Use LCEL**: It enables streaming and async out of the box.
- **Trace everything**: Connect to LangSmith to see _why_ your agent failed.

**Don't**:

- **Don't over-abstract**: If a simple Python function works, don't wrap it in a Chain.

## References

- [LangChain Documentation](https://python.langchain.com/docs/get_started/introduction)

---
> Source: [G1Joshi/Agent-Skills](https://github.com/G1Joshi/Agent-Skills) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-16 -->

