A production-ready Agentic AI project built with LangGraph, Groq, and Python that demonstrates graph-based AI workflows, multi-step reasoning, tool calling, state persistence, and reactive agents.
This repository contains both a basic LangGraph agent and an advanced reactive agent, making it a great starting point for learning modern AI agent development.
- π€ LangGraph-powered AI Agents
- β‘ Groq LLM Integration
- π Graph-based Workflow Execution
- π οΈ Tool Calling
- π§ Multi-step Reasoning
- π¬ Stateful Conversations
- πΎ Checkpoint Support
- π Execution Logging
- π§ Environment Variable Configuration
- π FastAPI Deployment Example
- π¦ Modular Project Structure
langgraph-grok-agent/
βββ langgraph_grok_agent.py # Basic LangGraph agent implementation
βββ langgraph_reactive_agent.py # Advanced reactive AI agent
βββ setup_and_config.py # Configuration & utility functions
βββ requirements.txt # Project dependencies
βββ .env # API keys & environment variables
βββ README.md # Project documentation
βββ checkpoints/ # Saved LangGraph checkpoints
βββ logs/ # Runtime logs
βββ examples/
βββ example_basic.py # Basic usage example
βββ example_advanced.py # Advanced workflows
βββ example_api_server.py # FastAPI deployment example
- Python 3.11+
- LangGraph
- LangChain
- Groq API
- Pydantic
- python-dotenv
- FastAPI
- Uvicorn
git clone https://github.com/Ronit049/LangGraph_Grok_Agent.git
cd langgraph-grok-agentpython -m venv .venv
.venv\Scripts\activatepython3 -m venv .venv
source .venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root.
GROQ_API_KEY=your_groq_api_key
GEMINI_API_KEY=your_gemini_api_keypython langgraph_grok_agent.pypython langgraph_reactive_agent.pypython examples/example_api_server.pyor
uvicorn examples.example_api_server:app --reloadpython examples/example_basic.pyDemonstrates:
- Building a LangGraph workflow
- Executing an AI agent
- Managing graph state
python examples/example_advanced.pyDemonstrates:
- Multi-step reasoning
- Tool execution
- Dynamic routing
- Stateful conversations
python examples/example_api_server.pyDemonstrates:
- FastAPI integration
- REST API endpoint
- JSON responses
- Production deployment
User Input
β
βΌ
Task Analysis
β
βΌ
Reasoning
β
βΌ
Tool Selection
β
βΌ
Tool Execution
β
βΌ
State Update
β
βΌ
Response Generation
β
βΌ
Final Answer
- Basic LangGraph workflow
- Tool execution
- Graph state management
- AI response generation
- Advanced reactive agent
- Conditional routing
- Dynamic tool selection
- Multi-step reasoning
- Context-aware responses
- Environment configuration
- API initialization
- Logging setup
- Utility functions
The checkpoints/ directory stores saved LangGraph execution states, allowing interrupted workflows to resume later.
Execution logs are written to the logs/ directory for debugging, monitoring, and tracing agent behavior.
This project demonstrates:
- LangGraph Fundamentals
- Agentic AI
- Graph-based AI Workflows
- Tool Calling
- State Persistence
- Multi-step Reasoning
- Prompt Engineering
- API Integration
- FastAPI Deployment
- Memory Integration
- RAG (Retrieval-Augmented Generation)
- Multi-Agent Collaboration
- Streaming Responses
- Human-in-the-Loop Workflows
- Database Persistence
- Docker Support
- CI/CD Pipeline
- Cloud Deployment (Railway, Render, AWS)
Contributions are welcome!
- Fork the repository
- Create a feature branch
git checkout -b feature-name- Commit your changes
git commit -m "Add new feature"- Push your branch
git push origin feature-name- Open a Pull Request
This project is licensed under the MIT License.
Ronit Raj
Computer Science Engineering Student | Python Developer | Agentic AI Enthusiast
- Python
- LangGraph
- LangChain
- Groq
- Gemini
- FastAPI
- AI Agents
- Machine Learning
- Generative AI
β If you found this project useful, please Star the repository and consider contributing!