LangChain separates functionality into three abstraction levels: tools, chains, and agents. A tool is a single callable function, such as a search API or database query. A chain combines multiple steps in a fixed order—prompting, model calls, parsing—and behaves like a reusable pipeline. Agents are higher-level entities that decide which chain or tool to invoke based on reasoning.
This separation improves modularity and reusability. Developers can build libraries of small tools, compose them into task-specific chains, and let agents orchestrate them dynamically. Each abstraction layer adds autonomy: tools execute, chains process, agents plan.
In more advanced systems like LangGraph, agents use graph-based execution to choose paths conditionally. When integrated with Milvus or Zilliz, agents can also select tools based on retrieved semantic context, effectively blending symbolic planning with data-driven recall.
