Abby is an intelligent AI agent built with Google's Agent Development Kit (ADK) to help persons with disabilities (PWDs) discover accessible services across Kenya.
Abby serves as the conversational AI backend for AbiliLife, an inclusive super-app. The agent helps users discover:
- 🏥 Healthcare: Accessible clinics and medical facilities
- 💼 Employment: Job opportunities for PWDs
- 🚗 Transport: Accessible ride-hailing and public transport
- 📚 Education: Inclusive learning centers and skills training
- 🛒 Marketplace: Assistive devices and accessibility products
AbiliLife-agent/
├── abby/ # Main agent package
│ ├── agent.py # Root agent definition
│ ├── tools.py # Tool functions for data retrieval
│ ├── data/
│ │ └── accessible_services.json # Mock service data
│ └── __init__.py
├── test_agent.py # Test script
├── requirements.txt # Python dependencies
├── .env # Environment variables (not in repo)
├── .gitignore # Git ignore rules
├── README.md # This file
└── ARCHITECTURE.md # Technical architecture documentation
- Python 3.9 or higher
- Google AI API Key (Get one here)
- Git
-
Clone the repository
git clone https://github.com/AbiliLife/AbiliLife-agent.git cd AbiliLife-agent -
Create virtual environment
python -m venv venv # Windows .\venv\Scripts\Activate.ps1 # Linux/Mac source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Configure API key
Create a
.envfile in the project root:GOOGLE_API_KEY=your_google_api_key_here
adk webThen open http://localhost:8000 in your browser.
adk run .python test_agent.pyUser: What cities do you cover?
Abby: Available cities: Kisumu, Mombasa, Nairobi, Nakuru
User: Find accessible clinics in Nairobi
Abby: I found 3 accessible services for you:
1. Hope Health Clinic (Healthcare)
Location: Nairobi
Accessibility Rating: 4.8/5.0
Features: wheelchair_accessible, sign_language_support, accessible_parking
Contact: +254 700 123 456
...
| Component | Technology |
|---|---|
| AI Framework | Google Agent Development Kit (ADK) 1.16.0 |
| LLM Model | Gemini 2.0 Flash Exp |
| Language | Python 3.9+ |
| Data Storage | JSON (mock), ready for database integration |
| Environment | python-dotenv for configuration |
1. Agent (abby/agent.py)
- Defines Abby's personality and instructions
- Configures available tools
- Manages conversation flow via ADK
2. Tools (abby/tools.py)
get_services_by_city(city, min_rating)- Find services by locationget_services_by_type(service_type, city, min_rating)- Filter by categoryget_services_by_feature(feature, city)- Search by accessibility featureget_all_cities()- List available citiesget_all_service_types()- List service categories
3. Data (abby/data/accessible_services.json)
- Mock dataset with 10 services across 4 Kenyan cities
- Ready for replacement with live API integration
User Query → ADK Runtime → Abby Agent → Tool Selection → Data Retrieval → Response
See ARCHITECTURE.md for detailed flow diagrams.
- ✅ Natural language understanding via Gemini
- ✅ Location-based service discovery
- ✅ Accessibility rating filtering (≥4.0)
- ✅ Multi-category service search
- ✅ Conversational, empowering responses
- ✅ ADK web and CLI interfaces
- 🔄 Integration with live APIs (Google Maps, job boards)
- 🔄 Persistent session storage (Firestore/PostgreSQL)
- 🔄 Voice input/output support
- 🔄 Multilingual support (English, Swahili)
- 🔄 REST API for mobile app integration
- 🔄 User authentication and profiles
python test_agent.pyEdit abby/data/accessible_services.json:
{
"id": "svc_011",
"name": "Service Name",
"type": "Healthcare|Employment|Transport|Education|Marketplace",
"city": "City Name",
"county": "County Name",
"accessibility_rating": 4.5,
"features": ["wheelchair_accessible", "sign_language_support"],
"address": "Full address",
"contact": "+254 XXX XXX XXX",
"description": "Service description"
}- Define function in
abby/tools.py - Add function to
root_agenttools list inabby/agent.py - ADK automatically converts it to a callable tool
Example:
# In abby/tools.py
def get_nearby_services(lat: float, lon: float, radius_km: float = 5.0) -> str:
"""Find services within radius of coordinates."""
# Implementation
return formatted_results
# In abby/agent.py
from .tools import get_nearby_services # Add import
root_agent = Agent(
...
tools=[
...
get_nearby_services, # Add to tools list
]
)from fastapi import FastAPI
from abby.agent import root_agent
app = FastAPI()
@app.post("/chat")
async def chat(message: str, session_id: str):
# Integration code
passconst response = await fetch('https://api.abililife.com/abby/chat', {
method: 'POST',
body: JSON.stringify({
message: "Find accessible clinics in Nairobi",
session_id: user.id
})
});We welcome contributions from the team! Please:
- Create a feature branch from
main - Make your changes
- Test thoroughly with
python test_agent.py - Submit a pull request
- Follow PEP 8 for Python code
- Add docstrings to all functions
- Include type hints
- Test all changes before committing
This project is part of the AbiliLife ecosystem - AGPL-3.0 License
For questions or support, reach out via:
- Email: abililifekenya@gmail.com
- GitHub Issues: Report issues here
Built with ❤️ for the disability community in East Africa
Accessibility is a right, not a privilege.