A practical learning repository for implementing agentic design patterns using LangChain framework.
patterns/
├── reflection/ # ✅ Self-evaluation and improvement
├── planning/ # ✅ Task decomposition and sequential execution
├── routing/ # ✅ Query routing to specialized agents
├── parallelization/ # ✅ Concurrent task processing
├── tool_use/ # ✅ External tool integration
├── multi_agent/ # 🚧 Agent collaboration patterns
└── memory/ # 🚧 State and context management
config/ # LangChain configuration
examples/ # Complete implementations
tests/ # Pattern validation
- Install dependencies:
pip install -r requirements.txt - Set API key (optional):
export OPENAI_API_KEY="your-key" - Run examples:
python examples/reflection_example.py - Run tests:
python -m pytest tests/
- Chains - Structured prompt → LLM → output pipelines
- Prompt Templates - Reusable, parameterized prompts
- Modular LLMs - Easy switching between providers
- Mock Support - Testing without API keys
- ✅ Reflection Pattern - LangChain-based self-evaluation
- ✅ Prompt Chaining - Sequential prompt execution
- ✅ Routing Pattern - Query classification and specialized routing
- ✅ Parallelization Pattern - Concurrent task processing
- ✅ Tool Use Pattern - External tool integration
- 🚧 Multi-Agent Pattern - Coming soon
- 🚧 Memory Pattern - Coming soon
- Start with Reflection pattern (
patterns/reflection/) - Try Prompt Chaining (
patterns/planning/) - Explore Routing (
patterns/routing/) - Learn Parallelization (
patterns/parallelization/) - Study LangChain chain composition
- Run examples with/without API keys
- Implement your own variations
Each pattern includes:
- LangChain implementation
- Configurable LLM support
- Usage examples
- Tests with mocks