Skip to content

AMAANALI70/Agentic-AI-Planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Agentic AI Planner

Goal-Driven Autonomous Planning Agent Powered by Local LLMs

Python LangChain LangGraph Ollama Streamlit License: MIT


Agentic AI Planner is a modular, graph-based autonomous agent system that breaks down high-level user goals into actionable plans, executes tool-augmented tasks, and delivers structured results β€” all powered by a locally-hosted LLM via Ollama.

No API keys. No cloud dependency. Fully local & private.


πŸ“‘ Table of Contents


✨ Features

  • 🧠 Autonomous Planning β€” Accepts a high-level goal and generates a step-by-step execution plan using an AI planning agent.
  • πŸ”— Graph-Based Orchestration β€” Uses LangGraph to define a stateful, multi-node workflow (Planner β†’ Tool β†’ Final Output).
  • πŸ› οΈ Tool-Augmented Execution β€” Integrates custom tools (e.g., calculator) that the agent can invoke during the workflow.
  • πŸ’» 100% Local Inference β€” Runs entirely on your machine using Ollama with the Qwen3:8b model β€” no API keys or cloud services required.
  • πŸ–₯️ Interactive Web UI β€” Provides a clean Streamlit-based interface for goal input and result visualization.
  • πŸ“¦ Modular Architecture β€” Clean separation of agents, tools, prompts, graph logic, and utilities for easy extensibility.

πŸ“Έ Demo / Screenshots

🚧 Coming Soon β€” Screenshots and a live demo link will be added here.

To try it locally, follow the Installation & Setup section below.


πŸ—οΈ Architecture

πŸ“„ View Full System Design & Architecture Document β†’ Includes sequence diagrams, state machine automata, class diagrams, and deployment architecture.

The agent follows a three-node state graph workflow:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    User Goal                        β”‚
β”‚             "Help me prepare for ML exam"           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
                       β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚   🧠 Planner   β”‚  ← Breaks goal into sub-tasks
              β”‚    Node        β”‚    using Qwen3 via Ollama
              β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
                      β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚   πŸ› οΈ  Tool     β”‚  ← Executes tool-augmented
              β”‚    Node        β”‚    actions (e.g., calculator)
              β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
                      β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚   πŸ“‹ Final     β”‚  ← Aggregates plan + tool
              β”‚    Node        β”‚    results into final output
              β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
                      β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚    βœ… END      β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Tech Stack

Layer Technology
LLM Runtime Ollama + Qwen3:8b
Framework LangChain
Orchestration LangGraph
Frontend / UI Streamlit
Language Python 3.10+
Env Management venv + pip

πŸ“ Project Structure

agentic-ai-demo/
β”‚
β”œβ”€β”€ agents/
β”‚   └── planner_agent.py        # Planning agent β€” generates step-by-step plans
β”‚
β”œβ”€β”€ graph/
β”‚   └── agent_graph.py          # LangGraph state graph definition & workflow
β”‚
β”œβ”€β”€ prompts/
β”‚   └── planner_prompt.py       # Prompt template for the planner agent
β”‚
β”œβ”€β”€ tools/
β”‚   └── calculator_tool.py      # Calculator tool (LangChain @tool)
β”‚
β”œβ”€β”€ utils/
β”‚   └── llm_loader.py           # Loads Ollama LLM (Qwen3:8b)
β”‚
β”œβ”€β”€ app.py                      # Streamlit web UI entry point
β”œβ”€β”€ main.py                     # CLI entry point
β”œβ”€β”€ test_llm.py                 # Test script β€” LLM connectivity
β”œβ”€β”€ test_planner.py             # Test script β€” planner agent
β”œβ”€β”€ test_tool.py                # Test script β€” calculator tool
β”œβ”€β”€ requirements.txt            # Python dependencies
β”œβ”€β”€ ARCHITECTURE.md             # System design & architecture document
└── README.md

πŸš€ Installation & Setup

Prerequisites

Requirement Version Notes
Python β‰₯ 3.10 Required
Ollama Latest Install Guide
Git Latest To clone the repository

1. Clone the Repository

git clone https://github.com/<your-username>/agentic-ai-demo.git
cd agentic-ai-demo

2. Create & Activate a Virtual Environment

python3 -m venv venv
source venv/bin/activate        # Linux / macOS
# venv\Scripts\activate          # Windows

3. Install Dependencies

pip install -r requirements.txt

4. Install & Start Ollama

# Install Ollama (if not already installed)
curl -fsSL https://ollama.com/install.sh | sh

# Pull the Qwen3:8b model
ollama pull qwen3:8b

# Start the Ollama server (if not running)
ollama serve

5. Environment Variables (Optional)

Create a .env file in the project root if you need to customize settings:

OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=qwen3:8b

Note: The default configuration connects to http://localhost:11434 with the qwen3:8b model. No .env file is needed for default usage.


πŸ’‘ Usage

Option 1: Streamlit Web UI (Recommended)

streamlit run app.py

This launches an interactive web interface where you can:

  1. Enter a high-level goal (e.g., "Help me prepare for ML exam in 5 days")
  2. Click Run Agent
  3. View the generated plan and tool execution results

Option 2: Command-Line Interface

python main.py

Example Output:

AGENT OUTPUT:

Goal:
Help me prepare for ML exam in 5 days

Plan:
Step 1: Review core ML concepts (supervised, unsupervised, reinforcement learning)
Step 2: Practice key algorithms β€” linear regression, decision trees, SVM, KNN
Step 3: Work through hands-on projects and Kaggle datasets
Step 4: Take timed practice tests
Step 5: Revise weak areas and review notes

Calculation Result:
20

πŸ§ͺ Testing

Run the individual test scripts to verify each component:

# Test LLM connectivity
python test_llm.py

# Test the planner agent
python test_planner.py

# Test the calculator tool
python test_tool.py
Script Purpose
test_llm.py Verifies Ollama/Qwen3 connectivity
test_planner.py Tests goal β†’ plan generation
test_tool.py Tests calculator tool invocation

Tip: Ensure the Ollama server is running (ollama serve) before executing tests.


🌐 Deployment

Local Deployment

The application is designed for local-first deployment. Simply follow the Installation & Setup steps.

Docker (Future)

A Dockerfile and docker-compose.yml will be provided in a future release for containerized deployment.

Cloud Deployment

To deploy on a cloud VM (e.g., AWS EC2, GCP Compute Engine):

  1. Provision a VM with β‰₯ 8 GB RAM (for the Qwen3:8b model)
  2. Install Python 3.10+, Ollama, and project dependencies
  3. Run ollama pull qwen3:8b && ollama serve &
  4. Run streamlit run app.py --server.port 8501 --server.address 0.0.0.0
  5. Open http://<VM_PUBLIC_IP>:8501 in your browser

🀝 Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch:
    git checkout -b feature/your-feature-name
  3. Commit your changes with clear, descriptive messages:
    git commit -m "feat: add web search tool to agent workflow"
  4. Push to your fork:
    git push origin feature/your-feature-name
  5. Open a Pull Request with a clear description of your changes

Contribution Guidelines

  • Follow existing code structure and naming conventions
  • Add test scripts for new tools or agents
  • Update the README if you add new features
  • Use Conventional Commits for commit messages

πŸ—ΊοΈ Roadmap / Future Improvements

  • πŸ” Web Search Tool β€” Add internet search capabilities to the agent
  • 🧠 Memory & Context β€” Implement conversation memory for multi-turn interactions
  • πŸ”„ Dynamic Tool Selection β€” Let the agent decide which tools to use based on the goal
  • πŸ“„ Document Summarizer β€” Add a tool for summarizing PDFs and web pages
  • 🐳 Docker Support β€” Containerize the full stack (app + Ollama)
  • πŸ”€ Conditional Graph Routing β€” Add branching logic in the workflow graph
  • πŸ“Š Execution Dashboard β€” Visualize agent execution traces and graph state
  • πŸ§ͺ Unit Test Suite β€” Comprehensive pytest-based test coverage
  • πŸ€– Multi-Agent Support β€” Orchestrate multiple specialized agents

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.

MIT License

Copyright (c) 2025 [Your Name]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

πŸ‘€ Contact / Author

Field Details
Author Amaan Ali Doddamani
Email amaanalidoddamani05@gmail.com
GitHub github.com/
LinkedIn linkedin.com/in/

⭐ If you found this project useful, give it a star on GitHub! ⭐

Built with ❀️ using LangChain, LangGraph, Ollama & Streamlit

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages