LangChain
Tool calling, chains, routing, fallbacks, agents.
8 patterns supported.
Patterns this framework supports natively
- Tool Use — Let the LLM produce typed calls against an external toolkit instead of producing free-form text the surrounding system has to parse.
- ReAct — Interleave a single thought, a single tool call, and a single observation per step so the agent reasons over fresh evidence.
- Routing — Classify an incoming request and dispatch it to the specialist (lane / agent / model) best suited to handle it.
- Prompt Chaining — Decompose a task into a fixed sequence of LLM calls where each step's output becomes the next step's input.
- Fallback Chain — Try a primary handler; on failure or low confidence, fall through to a sequence of fallback handlers.
- Structured Output — Constrain the model's output to conform to a JSON Schema (or similar typed shape).
- Parallelization — Run independent LLM calls concurrently and combine results.
- Streaming Typed Events — Push partial results to the client as typed events as they become available, rather than waiting for the full response.