PRAGATI is a pioneering RAG-powered Multi-Agent Orchestrator System tailored for agricultural domain knowledge. Our vision is to empower the agricultural sector with:
- Specialized AI Agents: Deliver precise, timely, and context-aware recommendations for crop selection, irrigation, fertilizer use, pest detection etc.
- Query Complexity Assessment: Optimizes retrieval and generation, ensuring the right expertise is applied to each query.
- Multi-Agent Orchestration: Coordinates specialized agents for comprehensive, expert-backed answers.
- Multi-Lingual & Multi-Modal Support: Accessible via text, image, and voice inputs, making PRAGATI an AI truly "For the Farmers".
- Deep Research Pipelines: Enhance coverage and depth of recommendations.
- Human-in-the-Loop (HITL) Validation: Ensures factual accuracy and reliable decision support for farmers and stakeholders.
- Retrieval-Augmented Generation (RAG) Pipeline: Integrates semantic search with domain-specific knowledge base retrieval, ensuring all AI-generated responses are grounded in verified agricultural data.
PRAGATI is accurate, fast, and reliableโdriving progress and growth in agriculture, just as its name means!
A modern Next.js front-end application for Agricultural AI solutions, including chat, crop recommendations, disease prediction, and more.
The dashboard provides the following AI-powered features and tools:
-
AI Specialists Tab
- Crop Yield Prediction
- Crop Health Analysis & Disease Prediction
- Pest Control & Prediction
- Crop Recommendations (Soil-based)
- Fertilizer Guide
- Irrigation Planning
- Weather Advisory
- Market Prices (Real-time)
- Credit Policy & Market Intelligence
- Risk Management
- Agriculture News & Updates
-
Chat History Tab
- Access and revisit all your previous chat sessions with AI agents.
-
QR Scanner
- Scan QR codes for quick access to agri-data, resources, or field records.
-
Profile & Sign Out
- Manage your user profile and securely sign out.
All features are accessible via a sidebar for seamless navigation between AI agents, chat history, and tools.
- Node.js v18 or higher
- pnpm package manager (optional but recommended)
- A PostgreSQL-compatible database (Neon, Supabase, or local Postgres)
- Git for version control
-
Clone the repository:
git clone https://github.com/Ecolash/Agricultural-AI-Frontend.git cd Agricultural-AI-Frontend
-
Install dependencies:
pnpm install
-
Create a
.env
file in the project root based on the example below.
Create a .env
file with the following variables:
In the project root:
DATABASE_URL="" # PostgreSQL connection string
NEXTAUTH_SECRET="" # Secret key for NextAuth.js
NEXTAUTH_URL="" # Deployed frontend URL
NEXT_PUBLIC_API_URL="" # Public API endpoint for the backend
Prisma ORM is used for database schema migrations and client generation.
-
Generate Prisma client (runs automatically after install):
pnpm prisma generate
-
Apply migrations to your database:
pnpm prisma migrate dev --name init
-
(Optional) To reset your database and reapply all migrations:
pnpm prisma migrate reset
In the project directory, you can run:
-
pnpm dev
orpnpm run dev:frontend
Runs the development server at http://localhost:3000. -
pnpm run build
Builds the application for production and generates the Prisma client. -
pnpm start
Runs the production build withnext start
. -
pnpm run lint
Lints code with ESLint. -
pnpm run type-check
Runs TypeScript type checking. -
pnpm run dev:setup
Helpful scripts for local development (seescripts/dev-setup.sh help
).
โโโ app/ # Next.js app directory (routing, pages, API routes)
โ โโโ api/ # API route handlers (auth, chat-history, etc.)
โ โโโ dashboard/ # Dashboard UI and subpages
โ โโโ qr-scanner/ # QR scanner feature pages
โ โโโ signin/, signup/ # Auth pages
โ โโโ ... # Other feature pages and layouts
โ
โโโ components/ # Reusable React components
โ โโโ agent-interfaces/ # Specialized agent UI interfaces
โ โโโ lib/ # Component-specific utilities
โ โโโ types/ # Component-specific types
โ โโโ ui/ # UI primitives (buttons, dialogs, etc.)
โ
โโโ data/ # Static data, language lists, agent configs
โโโ docs/ # Project and API documentation
โโโ hooks/ # Custom React hooks
โโโ lib/ # API wrappers, utilities, and services
โ โโโ actions/ # Server actions and helpers
โโโ prisma/ # Prisma schema and migrations
โ โโโ migrations/ # Database migration files
โโโ public/ # Static assets (images, icons, etc.)
โโโ scripts/ # Utility scripts for setup and development
โโโ styles/ # Global and component styles
โโโ types/ # Global TypeScript type definitions
โโโ assets/ # Project assets (logo, images)
โโโ .env # Environment variables
โโโ package.json # Project metadata and scripts
โโโ tsconfig.json # TypeScript configuration
โโโ README.md # Project documentation
โโโ ... # Other config and dotfiles
Contributions are welcome! Please open an issue or submit a pull request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/my-feature
) - Commit your changes (
git commit -m 'feat: add my feature'
) - Push to the branch (
git push origin feature/my-feature
) - Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.