Skip to content

Sarthak030506/Gov-Scheme-Eligibility-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Government Scheme Eligibility Agent

A deterministic AI agent that evaluates user eligibility across 18 Indian government schemes. It accepts user details, plans its analysis, executes rule-based checks, and produces explainable results with full reasoning transparency.

This is an agent, not a chatbot — it follows a structured plan-then-execute lifecycle with no LLM calls.

How It Works

  1. Planning — The agent generates a step-by-step plan before touching any data
  2. Loading — Reads 18 government schemes from a local JSON database
  3. Evaluating — Checks each scheme across 7 eligibility dimensions (age, income, education, category, employment, gender, state)
  4. Explaining — Every decision includes a clear "Passed/Rejected" reason trail

Project Structure

Gov Scheme agent/
├── main.py            # Streamlit UI (input form + result display)
├── agent.py           # SchemeEligibilityAgent (plan → execute → run)
├── tools.py           # 3 deterministic tools (no LLM calls)
├── logger.py          # Structured execution logging
├── schemes.json       # Database of 18 government schemes
└── requirements.txt   # Python dependencies

Tools

Tool Function Purpose
Scheme Data Loader load_schemes() Loads schemes from local JSON file
Eligibility Checker check_eligibility() Compares user profile against scheme rules
Benefit Summarizer summarize_benefits() Converts benefits into human-friendly text

All tools are deterministic — pure Python functions with no external API or LLM calls.

Schemes Covered

# Scheme Category
1 Pradhan Mantri Kaushal Vikas Yojana (PMKVY) Skill Development
2 Pradhan Mantri Awas Yojana (PMAY) Housing
3 Pradhan Mantri Jan Dhan Yojana (PMJDY) Financial Inclusion
4 Sukanya Samriddhi Yojana Girl Child Savings
5 PM-KISAN Samman Nidhi Agriculture
6 Ayushman Bharat (PM-JAY) Health
7 Startup India Scheme Entrepreneurship
8 Post Matric Scholarship for SC/ST Education
9 National Apprenticeship Promotion Scheme Employment
10 Pradhan Mantri Ujjwala Yojana Welfare
11 Mahatma Gandhi NREGA Rural Employment
12 PM Mudra Yojana Business Loans
13 Stand-Up India Entrepreneurship
14 Digital India Internship Scheme Employment
15 National Means-cum-Merit Scholarship Education
16 Atal Pension Yojana Pension
17 PM Vishwakarma Yojana Traditional Artisans
18 Beti Bachao Beti Padhao Girl Child Welfare

Setup & Run

Prerequisites

  • Python 3.10+

Installation

git clone https://github.com/Sarthak030506/Gov-Scheme-Eligibility-Agent.git
cd Gov-Scheme-Eligibility-Agent
pip install -r requirements.txt

Run

streamlit run main.py

The app will open in your browser. Fill in the form and click Check Eligibility.

User Input Fields

Field Type Options
Age Slider 0 - 100
Gender Dropdown Male, Female, Other
Annual Income Range Dropdown Below 1 Lakh to Above 10 Lakh
Education Level Dropdown Below 10th to PhD
Social Category Dropdown General, OBC, SC, ST, EWS, Minority
Employment Status Dropdown Unemployed, Student, Self-Employed, Salaried, Daily Wage, Farmer
State Dropdown Any + 29 Indian states

Output

  • Agent Plan — The step-by-step plan the agent follows
  • Execution Log — Full trace of every tool call and observation
  • Eligible Schemes — Name, benefits, and why you qualify
  • Rejected Schemes — Name and specific reasons for rejection

Agent Lifecycle

┌─────────────────┐
│  User Profile    │
└────────┬────────┘
         │
         v
┌─────────────────┐
│  Phase 1: Plan   │  → Generates 7-step plan (logged and displayed)
└────────┬────────┘
         │
         v
┌─────────────────┐
│  Phase 2: Execute│  → Calls tools, logs observations per scheme
└────────┬────────┘
         │
         v
┌─────────────────┐
│  Results         │  → Eligible + Rejected with explanations
└─────────────────┘

Tech Stack

  • Python — Core language
  • Streamlit — Web UI
  • JSON — Scheme database (no external database needed)

About

Deterministic AI agent for evaluating Indian government scheme eligibility

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages