What is LangGraph
LangGraph is a Python library designed to build stateful, multi-step applications that integrate LLMs (Large Language Models) with external tools.
It is also designed to build multi-agent LLM applications, where each agent plays a different role and they work together.
How It Works
🌀 Cyclical Graph: LangGraph uses a special design called a cyclical graph which allows agents to interact with each other when needed or based on certain conditions. This makes the flow dynamic.
🎯 Orchestration: The entire execution flow is managed and monitored by LangGraph. That's why it is also known as an orchestration tool for agents.
Key Concepts
- LLM: AI that understands human language. Examples: ChatGPT, DALL·E.
- Agent: A helper robot that does a specific task. Example: One writes SQL, another checks it.
- Workflow: A step-by-step process. Can go straight or loop based on conditions.
- Cyclical Graph: Like a map. Agents can go back and repeat steps if needed.
Real-World Analogy
Imagine writing a school report:
- Agent 1 finds the info (Searcher)
- Agent 2 summarizes it (Summarizer)
- Agent 3 writes the answer (Writer)
- Agent 4 checks it (Checker)
- If it needs changes, Agent 5 gives feedback and sends it back (Feedback Agent)