EcoImpact AI is a sustainability-focused AI system that provides eco-friendly solutions through intelligent agents. It consists of a FastAPI backend for AI processing and a Next.js 15 frontend.
- Backend: FastAPI, Python, Redis Queue (RQ), OpenAI API
- Frontend: Next.js 15, TypeScript, Material-UI (MUI)
- Database & Caching: Redis for task management
- AI-powered agents for sustainability guidance
- Redis Queue for background task handling
- Next.js 15 frontend with Material-UI
- Dark Mode UI with chat-based interaction
- API with CORS support for smooth communication
# Clone the repository
git clone https://github.com/yourrepo/EcoImpact-AI.git
cd EcoImpact-AI
# Create a virtual environment
python3 -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Start Redis
redis-server
# Start the backend server
uvicorn backend.api.main:app --reload
# Move to frontend directory
cd frontend
# Install dependencies
yarn install # or npm install
# Start the frontend server
yarn dev # or npm run dev
- GeneralAgent: Handles general sustainability questions
- TransportAgent: Provides eco-friendly transport advice
- EnergyAgent: Suggests energy-efficient practices
- FoodAgent: Recommends sustainable food choices
- GET
/
Root API endpoint - GET
/assign-task/
Assigns a task to an agent - GET
/job-result/
Fetches task results - DELETE
/reset-memory/
Clears user memory
curl -X GET "http://127.0.0.1:8000/assign-task/" \
-H "Content-Type: application/json" \
--data-urlencode "user_id=user_123" \
--data-urlencode "agent_name=transport_agent" \
--data-urlencode "user_input=How can I reduce my carbon footprint?"
{
"status": "job_id_123456789"
}
curl -X GET "http://127.0.0.1:8000/job-result/" \
-H "Content-Type: application/json" \
--data-urlencode "job_id=job_id_123456789"
{
"status": "completed",
"result": "Use public transport, carpool, or switch to an electric vehicle."
}
curl -X DELETE "http://127.0.0.1:8000/reset-memory/" \
-H "Content-Type: application/json" \
--data-urlencode "user_id=user_123"
{
"message": "User memory reset successfully."
}