Agent framework (LangChain, LangGraph and others)
A library for building AI agents and LLM workflows: model calls, tools, state, retries and tracing, so you do not write the loop yourself.
An agent framework is a library for building AI agents and LLM workflows: model calls, tools, state, retries and tracing, so you do not write the loop yourself. LangChain and LangGraph, LlamaIndex, CrewAI and the model vendors’ own agent SDKs are common choices.
They speed up prototypes and give checkpoints, human approval steps and tracing out of the box. Many also ship multi-agent building blocks: a supervisor that routes to workers (orchestrator-workers), agent handoffs and graphs of steps (agent graph). The cost is abstraction you have to debug through and upgrades that change APIs. An agent loop itself is a few dozen lines; the hard parts are tools, limits and evals, which no framework writes for you.
A framework differs from an agent harness: the framework is the library, the harness is the finished runtime around a model (loop, tools, permissions, hooks) that a coding tool or your product ships. Before choosing one, ask what you will need in a year: durable checkpoints, traces in your observability stack, or the freedom to swap models. Pick the framework for that feature, or none.
Related terms
- Agentic loop: The cycle of model call, tool call and result that an agent repeats until it stops.
- Agent harness (harness engineering): Everything around the model that makes it an agent: the loop, tools, permissions, instructions, saved state, checks and session handoff.
- Durable execution: Running a long process so its progress is saved after every step, letting it survive crashes and pause for hours or days, then resume.
- Agent graph (state graph): Modeling an agent as explicit nodes, edges and shared state, with checkpoints, so each step can be paused, resumed, inspected and tested.
- Orchestrator-workers pattern (supervisor): One model plans the task, hands parts of it to worker models or subagents, and combines their results.
- Agent handoff: One agent passes control of a conversation, together with its context, to a specialist agent or to a person.
- LLM observability: Tracing every model call with inputs, outputs, latency, tokens, cost and the user outcome.
