Technology
[AI] MCP Utilization: LangChain & LangGraph
A framework for developing applications based on large language models (LLMs). Features Connecting various LLMs, Tools, and Memory in chain format. Supports integration with external data sources. Linear chain structure that executes in predefined workflow order.
LangChain
- A framework for developing applications based on large language models (LLMs).
- Features
- Connects various LLMs, Tools, and Memory in chain format.
- Supports integration with external data sources.
- Linear chain structure that executes in predefined workflow order.
- Differences from existing LLMs
- While existing LLMs focus on text generation and question & answer, LangChain enables building complex and practical applications by integrating with external data.
LangGraph
- A framework that enables implementing flexible and dynamic workflows using graph structures.
- Core Components
- Node
- Individual work units executed in the workflow.
- Can execute functions such as LLM calls, tool usage, and data processing.
- Edge
- Connections between nodes that determine the workflow.
- State
- A data storage shared by all nodes.
- Multiple agents share information through state and maintain workflow context.
- Agent
- LLM can perform the 'agent' role of determining which node to execute.
- Node
- Features
- Can internally track state and freely call appropriate MCPs.