ClimateGuard is an AI agent built with Fetch.ai’s uAgents framework and powered by the ASI:One (asi1-mini) large language model. It engages users in natural conversations about climate change, carbon footprint reduction, sustainable living, and environmental policies — delivering personalized, science-based, and actionable advice.
This repository contains the agent implementation for ClimateGuard to be deployed on the decentralized Fetch.ai Agentverse platform or locally for testing.
- Python 3.9 or higher
- Fetch.ai
uagentsframework - OpenAI Python SDK compatible with ASI:One API
- Clone this repo:
git clone https://github.com/riyaarah/Climate-Guard.git
cd climateguard- Install dependencies:
pip install -r requirements.txt- Replace the OpenAI API key placeholder in
agent.pywith your ASI:One API key:
api_key='sk_67703b522cef404ba12cdb5c9b9e152e9aa86fa175d44ac79944a03e588ea3c3'- Run the agent:
python agent.pyThe agent will start on http://127.0.0.1:8000/submit and listen for chat messages.
-
Agent name:
climate_guard -
Port: 8000
-
Seed phrase:
climate_guard_secret_phrase -
Protocol: Chat protocol based on Fetch.ai uAgents
chat_protocol_spec -
LLM: ASI:One
asi1-minimodel -
Key features:
- Handles conversational queries about climate science, carbon footprint, sustainability
- Responds with practical, science-based advice
- Acknowledges incoming messages and sends chat responses
- Handles errors gracefully and informs the user
-
Uses
uagentsto manage the agent lifecycle and messaging -
Uses OpenAI Python SDK with a custom base URL to connect to ASI:One LLM
-
Implements message handlers for:
ChatMessage— receives user queries, calls LLM, returns answersChatAcknowledgement— no-op in this implementation
-
Maintains conversational context by processing message contents
For security, consider setting your API key as an environment variable and reading it in agent.py instead of hardcoding.
Example:
import os
api_key = os.getenv("sk_67703b522cef404ba12cdb5c9b9e152e9aa86fa175d44ac79944a03e588ea3c3")- Add persistent user context for multi-turn personalized conversations
- Integrate localized climate data sources for more tailored responses
- Enable voice interaction support
- Implement analytics dashboard for user engagement insights
This project is licensed under the MIT License.