A powerful, extensible AI workflow agent built using LangGraph that leverages:
- Google Gemini models
- LangGraph Studio for debugging, visualization & time travel
- Tavily for real-time web search
- Workflow creation, review, and saving
- Human-in-the-loop (HITL) editing
- Extensible tool interface with memory
This agent functions as a workflow orchestrator. It takes a user query and:
- Uses the LLM to generate a task-specific workflow
- Optionally allows the user to review/edit the generated steps
- Utilizes tools like Tavily Search for real-time queries
- Saves the workflow to a file using a custom Save Workflow tool
- Stores interactions in memory for contextual reasoning
| Component | Description |
|---|---|
| LLM Backend | Google Gemini (gemini-2.0-flash) |
| Tooling | Tavily Search, Save-to-File Workflow Tool |
| LangGraph IDE | Full support for LangGraph Studio |
| HITL | CLI-based review before finalizing output |
| Memory | In-memory state storage |
git clone https://github.com/sohailz360/Workflow_Agent_langgraph.git
cd Workflow_Agent_langgraphUpdate the .env file with your credentials and update all credits.
You Can Use a different model other than gemini , just add its api and chnage the model and provider name in configuration.py
uv pip install -e .Run this in your virtual environment , If you use another LLm not gemini then install specific package for using its api also.
LangGraph Studio Mode For visualization and debugging:
langgraph dev| Feature | File / Description |
|---|---|
| Prompt Design | prompts.py – Editable system instructions |
| Model Loader | configuration.py – Connects to Gemini |
| Workflow Agent | graph.py – Agent loop with logic |
| Tavily Search Tool | tools.py – Web search integration |
| Save Workflow Tool | tools.py – Writes agent workflow to disk |
| Human Review | HITL step in agent routing logic |
| Memory System | Simple in-memory message store |
src/react_agent/
│
├── graph.py # Main workflow agent logic
├── tools.py # Tavily + Save Workflow tools
├── prompts.py # Prompt templates
├── state.py # Agent input/output schema
├── configuration.py # LangGraph configuration
└── utils.py # Helper functions