An open API service indexing awesome lists of open source software.

https://github.com/alexquilis1/aigua

πŸ’§ AIgua is a friendly AI-powered assistant that analyzes water quality test results and provides clear, human-centered guidance for safe usage, risks, and treatment suggestions β€” built with watsonx.ai, LangChain, and RAG.
https://github.com/alexquilis1/aigua

ai-agent ibm langchain sdg6 water-quality watsonx-ai

Last synced: 8 months ago
JSON representation

πŸ’§ AIgua is a friendly AI-powered assistant that analyzes water quality test results and provides clear, human-centered guidance for safe usage, risks, and treatment suggestions β€” built with watsonx.ai, LangChain, and RAG.

Awesome Lists containing this project

README

          

# πŸ’§ AIgua β€” Your Friendly Water Quality Companion

AIgua is an AI-powered assistant designed to help people easily understand water quality test results. Whether the water is for drinking, cleaning, or irrigation, AIgua provides clear explanations, risk assessments, and treatment suggestions β€” all with a human tone.

Built as part of the [AI Agent Hackathon with IBM watsonx.ai](https://developer.ibm.com/events/ai-agent-hackathon-with-ibm-watsonx-ai/), this project supports the UN’s Sustainable Development Goal **#6: Clean Water and Sanitation**.

---

## πŸ“Έ Preview

![AIgua screenshot 1](./screenshots/main-ui.png)
*Main interface showing test result input and AI diagnosis.*

![AIgua screenshot 2](./screenshots/map-view.png)
*Community map showing shared water analyses across regions.*

---

## πŸš€ Features

- βœ… Friendly, AI-generated analysis of water test results
- πŸ’‘ Personalized diagnosis based on pH, TDS, turbidity, and free chlorine
- ⚠️ Risk explanations and treatment suggestions using internal rules + RAG (retrieve-augmented generation)
- 🌍 Optional map where users can anonymously share their test data
- πŸ” Safe-by-design β€” no personal data required
- πŸ“± Built with React (frontend) + Python backend + IBM watsonx.ai

---

## 🧠 How It Works

AIgua combines:
- **Internal rules** for quick evaluation of common parameters
- **Watsonx.ai + LangChain** to generate friendly, accessible analysis
- **RAG (Retrieve-Augmented Generation)** for deeper insight using trusted sources (e.g., WHO, EPA)
- **Firestore** for storing shared anonymous results
- **React Leaflet** for map visualization

---

## πŸ— Tech Stack

| Layer | Tech |
|---------------|-----------------------------------|
| Frontend | React + TypeScript + Vite |
| Backend | Python + LangChain + FastAPI |
| AI Model | IBM watsonx.ai (Granite model) |
| Retrieval | Custom RAG pipeline with LangChain |
| Map & DB | React Leaflet + Firebase Firestore |
| Styling | Tailwind CSS |

---

## πŸ“¦ Installation

### πŸ”§ Prerequisites

- Node.js + npm
- Python 3.10+
- Firebase account (for map and shared data)
- IBM Cloud + watsonx.ai access

---

### πŸ’» Frontend Setup

```bash
cd waterbuddy-frontend
npm install
npm run dev
```

> The frontend will run at `http://localhost:5173`

---

### βš™οΈ Backend Setup

```bash
cd waterbuddy-backend
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt
python main.py
```

> Make sure to configure your `credentials.py` with IBM and Firebase settings.

---

## πŸ§ͺ Sample Input

```json
{
"pH": 7.2,
"TDS": 650,
"turbidity": 3.0,
"free_chlorine": 0.15,
"usage": "watering vegetables"
}
```

---

## 🌐 Live Demo

[![Watch the demo](https://img.youtube.com/vi/kAa69mZ3UZk/maxresdefault.jpg)](https://www.youtube.com/watch?v=kAa69mZ3UZk)

---

## 🀝 Contributing

We welcome contributions! To get started:

1. Fork the repo
2. Create a new branch (`git checkout -b feature-name`)
3. Commit your changes (`git commit -m 'Add feature'`)
4. Push to the branch (`git push origin feature-name`)
5. Create a Pull Request

---

## 🎯 Hackathon Info

This project was developed as part of the **AI Agent Hackathon with IBM watsonx.ai**, focusing on SDG 6: Clean Water and Sanitation.

### πŸ‘₯ Team

- **Alex Quilis Vila**
[LinkedIn](https://www.linkedin.com/in/alex-quilis-vila/)

- **Junjie Wu**
[LinkedIn](https://www.linkedin.com/in/junjie-wu-jj/)

---

## πŸ“„ License

This project is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
It allows for commercial use, modification, distribution, and private use, provided that proper attribution and license notice are maintained.

### βœ… You are free to:

- Use the code for personal, educational, or commercial purposes
- Modify and distribute it under the same license

### 🚫 You must not:

- Use any trademarks, service marks, or logos of the project without permission
- Use the project in ways that violate the license terms

---

For full license details, see the [LICENSE](./LICENSE) file in this repository.

## πŸ’™ Special Thanks

- IBM & Call for Code team
- LangChain & open-source agentic frameworks
- World Health Organization (WHO) & EPA for open guidelines

---

> β€œWater is life. Let’s make sure it’s safe for everyone.”