This repository demonstrates how to build agentic AI applications using LangGraph framework - a library for building stateful, multi-agent applications with LangChain.
- Python 3.8+
- pip
- Basic understanding of LangChain
- OpenAI API key
pip install langgraph langchain openai.
├── README.md
├── agents/
│ ├── planner.py
│ └── executor.py
├── main.py
└── config.py
-
Agent Types
- Planner Agent: Breaks down tasks into subtasks
- Executor Agent: Performs specific actions
- Supervisor Agent: Monitors and coordinates
-
Graph Structure
- Defines agent interactions
- Manages state transitions
- Handles message passing
from langgraph.graph import StateGraph
from langchain_core.messages import HumanMessage
# Define graph structure
graph = StateGraph()
# Add nodes and edges
graph.add_node("planner")
graph.add_node("executor")
# Configure state transitions
graph.set_entry_point("planner")python main.py- Use environment variables for API keys
- Implement error handling
- Add logging for debugging
- Test agent interactions thoroughly
Pull requests are welcome. For major changes, please open an issue first.
MIT