This repository contains practical examples of different workflow patterns implemented using LangGraph. Each example demonstrates a specific type of workflow that can be used for various data processing and automation tasks.
LangGraph is a powerful library for creating and managing workflows in Python. This repository provides practical examples of different workflow patterns that can be used as a reference or starting point for your own projects.
Workflow Type | Description | Example |
---|---|---|
Sequential | Linear processing of data through a series of steps | BMI Calculator |
Conditional | Branching logic based on conditions | Quadratic Equation Solver, Sentiment Analysis |
Iterative | Repeated processing with refinement | AI-Powered Tweet Generator |
Parallel | Simultaneous execution of independent tasks | Cricket Statistics, Essay Evaluation |
State Persistence | Maintaining state across workflow executions | Joke Generator with Memory |
Prompt Chaining | Chaining multiple LLM prompts together | Blog Post Generator |
LLM Integration | Basic LLM interaction | Simple Q&A System |
ChatBot | Interactive chat interface | Full-stack AI ChatBot |
-
Clone this repository:
git clone https://github.com/0x-Professor/LangGraph-Practice.git cd LangGraph-Practice
-
Navigate to the specific workflow directory you're interested in:
cd workflow_directory_name
-
Install the required dependencies:
pip install -r requirements.txt
Most examples require:
- Python 3.8+
- langgraph
- Jupyter Notebook (for .ipynb examples)
Additional dependencies for specific examples:
- langchain-google-genai (for LLM integration examples)
- pydantic (for data validation)
- fastapi, streamlit (for web interfaces)
- Navigate to the specific workflow directory
- Follow the instructions in the workflow's README.md
- Run the example:
- For Jupyter notebooks:
jupyter notebook practice.ipynb
- For Python scripts:
python main.py
- For Jupyter notebooks:
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.