Project Info
Inspiration
During the 2023 California wildfires, we watched news footage of hundreds of families stranded in evacuation centers waiting hours for basic supplies like water, insulin, and baby food. A mother with a diabetic child desperately needed medication, but coordination between aid organizations was so chaotic that by the time help arrived, it had been over 4 hours. We realized that in 2025, with AI agents, autonomous systems, and real-time communication, there's no reason anyone should wait hours for life-saving aid during a disaster. The inspiration struck: What if we could build an "Uber for disaster relief"โwhere victims simply describe what they need, and AI instantly connects them with the nearest available supplier? What if autonomous agents could handle coordination, leaving humans to focus on what matters: saving lives? That's how AgentAid was born. We set out to build the AI-powered nervous system for disaster response.
What it does
What it does AgentAid is a real-time disaster response coordination platform that uses AI to instantly connect victims with nearby suppliers through three core components: ๐ค AI-Powered Request Processing Victims submit requests via chat interface (future: voice input) Claude Sonnet 4 extracts structured data from natural language: Items needed (rice, insulin, asthma pump, etc.) Priority level (critical, high, medium) Location (automatically geocoded to coordinates) Estimated number of people affected ๐ Autonomous Agent Matching Fetch.ai agents represent supply organizations (Red Cross, food banks, medical coalitions) Agents autonomously negotiate and match requests with available supplies Distance optimization using real-time geocoding (OpenStreetMap Nominatim) Intelligent routing: prioritizes critical requests, optimizes for proximity ๐ Real-Time Dashboard & Tracking Victims see: Chat-based interface with live status updates "Request received" โ "In progress" โ "On the way" โ "Delivered" Coordinators see: Dashboard with all requests, priorities, and ETA Suppliers see: Optimized delivery routes and inventory management Everyone sees: Live disaster news feed for situational awareness ๐ Geocoding & Distance Intelligence Automatic location extraction from text ("Mission District Shelter") Converts to precise coordinates using Python geocoding agent Calculates distances to find nearest suppliers Route optimization for fastest delivery
How we built it
๐๏ธ Architecture โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ React โ โโโโโถ โ Node.js โ โโโโโถ โ Claude โ โ Frontend โ โ Backend โ โ Sonnet 4 โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ โโโโโโโโโโถ Python Geocoding Agent โ โโโโโโโโโโถ Fetch.ai Agents ๐ง Tech Stack Frontend: React with hooks (useState, useEffect) Lucide React icons Tailwind CSS for styling Persistent storage via Claude.ai storage API Backend (Node.js): Express.js REST API Anthropic SDK for Claude integration Axios for API calls CORS for cross-origin requests AI & Agents: Claude Sonnet 4 - Natural language understanding and structured data extraction Fetch.ai uAgents - Autonomous supply matching and coordination Python Geocoding Agent - Location intelligence using OpenStreetMap Nominatim Testing & Automation: Postman - Complete API collection with automated tests Collection Runner for workflow automation Mock servers for development Additional Tools: OpenStreetMap Nominatim API (free, no key required!) Haversine formula for distance calculations JSON storage for MVP (would use PostgreSQL in production)
๐จ AgentAid - AI-Powered Disaster Response Platform
๐ Overview
AgentAid is an AI-driven disaster response coordination platform that connects victims, aid workers, and suppliers through intelligent agents and automated workflows. The system uses Claude AI for natural language processing and Fetch.ai uAgent framework for autonomous agent coordination.
๐ฏ What You'll Get
- Beautiful Disaster Response UI: Modern, intuitive interface for reporting needs
- AI-Powered Coordination: Claude AI + Fetch.ai agents work together
- Real-time Tracking: Monitor request status and agent activities
- Multi-Supplier Coordination: System coordinates between multiple suppliers
- Geographic Intelligence: Automatic location processing and optimization
๐ Quick Start Guide
Prerequisites
Before you begin, make sure you have:
- Python 3.8+ installed
- Node.js 18+ and npm installed
- Anthropic API Key (get from https://console.anthropic.com/)
- Git (to clone the repository)
Step 1: Clone and Setup
# Clone the repository (if not already done)
git clone <your-repo-url>
cd agent-aid
# Run the automated setup
python setup.py
Step 2: Configure API Keys
# Add your Anthropic API key
echo "ANTHROPIC_API_KEY=your_actual_api_key_here" >> agentaid-claude-service/.env
Important: Replace your_actual_api_key_here with your real Anthropic API key from https://console.anthropic.com/
Step 3: Setup Dummy Suppliers (Recommended for Testing)
# Initialize the database
python agentaid-marketplace/db/init_db.py
# Set up dummy suppliers with inventory for testing
python agentaid-marketplace/db/setup_dummy_suppliers.py
This creates two suppliers:
- Emergency Medical Depot: 500 blankets, 10 ambulances, burn medicine
- Family & Child Supplies: 50 blankets, baby food, diapers
Step 4: Start the System
# Start all services with dummy suppliers (FIXED VERSION)
python start_agents_fixed.py
Note: If you encounter "Services stopped" messages, use the fixed version above which handles port conflicts and agent communication properly.
This will start:
- Claude Service (Port 3000)
- Coordination Agent (Port 8002)
- Need Agent (Port 8000)
- Supply Agents (Ports 8001, 8003)
Step 5: Access the UI
Open your browser and go to: http://localhost:3000/disaster-response.html
๐งช Testing the System
1. UI Testing (Recommended)
Open the disaster response UI and try these test scenarios:
Test Scenario 1: Blanket Request
We need 100 blankets at the community center. This is urgent!
There are about 200 people affected. Contact: 555-EMERGENCY
Test Scenario 2: Medical Supplies
Medical supplies needed at the hospital. Critical situation!
We need burn medicine and pain relief. Contact: 555-MEDICAL
Test Scenario 3: Baby Supplies
We need baby food and diapers at the shelter.
About 50 families with children. Contact: 555-FAMILY
2. API Testing
Test the system using curl commands:
# Test health check
curl http://localhost:3000/health
# Test disaster extraction
curl -X POST http://localhost:3000/api/extract \
-H "Content-Type: application/json" \
-d '{"input": "We need 100 blankets at the community center. This is urgent!", "source": "test"}'
# Check pending requests
curl http://localhost:3000/api/uagent/pending-requests
# Get system statistics
curl http://localhost:3000/api/stats
3. Automated Testing
Run the comprehensive test suite:
# Test the complete integration
python test_integration.py
# Test the dummy scenario specifically
python test_dummy_scenario.py
# Run the demo scenario
python demo_blanket_scenario.py
๐ฎ Using the UI
1. Fill Out the Disaster Report Form
The UI has a beautiful, intuitive form with:
- What do you need? - Describe items in natural language
- Quantity Details - Specify amounts (optional)
- Location - Enter address or location
- Contact Information - Phone or email (optional)
- Number of People Affected - Estimated count (optional)
- Priority Level - Critical, High, Medium, or Low
2. Watch the AI Coordination
After submitting, you'll see:
- Claude AI Processing: Extracts structured data from your text
- Agent Coordination: Need and supply agents work together
- Supplier Matching: System finds best suppliers for your needs
- Real-time Status: Track your request through the system
๐ง Troubleshooting
Common Issues and Solutions
1. "Claude service not accessible"
# Check if Claude service is running
curl http://localhost:3000/health
# If not running, restart:
python start_dummy_agents.py
2. "Anthropic API key not found"
# Check your .env file
cat agentaid-claude-service/.env
# Make sure it contains:
ANTHROPIC_API_KEY=your_actual_api_key_here
3. "Agents not responding" or "Services stopped"
# Check if all services are running
ps aux | grep python
ps aux | grep node
# Kill existing processes and restart with fixed version:
pkill -f "python.*agent" && pkill -f "node.*server"
python start_agents_fixed.py
4. "Database not found"
# Set up the database and dummy suppliers
python agentaid-marketplace/db/init_db.py
python agentaid-marketplace/db/setup_dummy_suppliers.py
5. "Import errors"
# Install missing dependencies
pip install uagents anthropic
# Check if all dependencies are installed
python debug_agents.py
Port Conflicts
If you get port conflicts, check what's using the ports:
# Check port usage
lsof -i :3000 # Claude service
lsof -i :8000 # Need agent
lsof -i :8001 # Supply agent 1
lsof -i :8002 # Coordination agent
lsof -i :8003 # Supply agent 2
๐ Understanding the Results
What Happens When You Submit a Request
-
Claude AI extracts structured data:
{ "items": ["blankets"], "quantity_needed": "100", "location": "community center", "priority": "high", "victim_count": 200 } -
Coordination Agent routes to appropriate agents
-
Need Agent evaluates priority and requirements
-
Supply Agents respond with quotes:
- Emergency Medical: 100 blankets @ $25 each
- Family & Child: 50 blankets @ $20 each
-
System selects optimal supplier based on:
- Coverage percentage
- Delivery time
- Cost
- Geographic proximity
Expected Results
For a 100-blanket request:
- Emergency Medical: โ Can provide 100 blankets, 1.5h delivery
- Family & Child: โ Can provide 50 blankets, 2h delivery
- System Choice: Emergency Medical (100% coverage, faster delivery)
๐ฏ Key Features Demonstrated
- Natural Language Processing: Describe needs in plain English
- AI Agent Coordination: Multiple AI agents work together
- Multi-Supplier Management: System coordinates between suppliers
- Geographic Optimization: Closest/fastest supplier gets priority
- Inventory Management: Prevents over-allocation
- Real-time Tracking: Monitor request status
- Priority Handling: Critical, High, Medium, Low priorities
๐ Advanced Testing
Custom Suppliers
To add your own suppliers, modify the inventory:
# Edit the supplier setup
python agentaid-marketplace/db/setup_dummy_suppliers.py
Different Scenarios
Try different disaster scenarios:
- Fire Emergency: "We need fire extinguishers and burn medicine"
- Flood Response: "We need sandbags and emergency shelter"
- Medical Crisis: "We need oxygen tanks and medical supplies"
- Family Emergency: "We need baby formula and diapers"
API Integration
The system also provides REST APIs:
# Get all requests
curl http://localhost:3000/api/requests
# Get pending requests for agents
curl http://localhost:3000/api/uagent/pending-requests
# Submit request via API
curl -X POST http://localhost:3000/api/extract \
-H "Content-Type: application/json" \
-d '{"input": "We need 100 blankets", "source": "api"}'
๐ Monitoring and Logs
Check System Status
# Health check
curl http://localhost:3000/health
# System statistics
curl http://localhost:3000/api/stats
View Logs
- Claude Service: Check console output
- Agents: Check individual agent logs
- Database: SQLite file in
agentaid-marketplace/db/
๐ Success Criteria
The system is working correctly when:
- โ UI loads at http://localhost:3000/disaster-response.html
- โ You can submit disaster requests
- โ Claude AI extracts data correctly
- โ Agents coordinate and respond
- โ Suppliers provide quotes
- โ System selects optimal supplier
- โ Request is fulfilled and confirmed
๐งช Test Scenarios
Scenario 1: Blanket Request (100 blankets)
Input: "We need 100 blankets at the community center. This is urgent!" Expected: System coordinates between suppliers to fulfill request
Scenario 2: Medical Emergency
Input: "Medical supplies needed at the hospital. Critical situation!" Expected: Emergency Medical supplier responds with medical supplies
Scenario 3: Family Emergency
Input: "We need baby food and diapers at the shelter." Expected: Family & Child supplier responds with baby supplies
Scenario 4: Mixed Request
Input: "We need blankets, medical supplies, and baby food at the shelter." Expected: Multiple suppliers coordinate to fulfill different items
๐ Getting Help
If Something Goes Wrong
- Check the logs in the console where you started the services
- Verify API keys are set correctly
- Test individual components using the test scripts
- Restart services if needed
- Check port conflicts and resolve them
Common Commands
# Restart everything (FIXED VERSION)
python start_agents_fixed.py
# Test the system
python test_integration.py
# Check health
curl http://localhost:3000/health
# Debug agents
python debug_agents.py
# Debug agent output (if agents keep stopping)
python debug_agent_output.py
# View database
sqlite3 agentaid-marketplace/db/agent_aid.db
๐ Next Steps
Once you have the system running:
- Try different scenarios with the UI
- Add more suppliers with different inventory
- Test with real disaster scenarios
- Scale to production deployment
- Integrate with real suppliers
๐ Quick Reference
Start System
python start_dummy_agents.py
Access UI
http://localhost:3000/disaster-response.html
Test API
curl http://localhost:3000/health
Stop System
Press Ctrl+C in the terminal where you started the services
AgentAid - Transforming disaster response through AI coordination ๐ค๐จ
Ready to save lives with AI? Start the system and try the UI! ๐
Analysis
View
Metric
- 5
- 4
- 2
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- AnthropicIn code
- CSSIn code
- ExpressIn code
- HTMLIn code
- Hugging FaceIn code
- JavaScriptIn code
- Next.jsIn code
- PythonIn code
- PyTorchIn code
- ReactIn code
- SQLIn code
- Tailwind CSSIn code
- TypeScriptIn code
13 of 13 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
704 KB
Source files
110
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
wh0th3h3llam1/agent-aid
157 files ยท 2.9 MB ยท @ 7cf9cf6
Structure
Interface
35 files ยท 22%Screens, components and styles rendered to the user.
API & routing
2 files ยท 1%Request entry points: routes, handlers and controllers.
Application logic
48 files ยท 31%Domain rules, services and shared utilities.
+6 moreData & schema
7 files ยท 4%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here โ open the file browser to check anything the diagram implies.
Languages
- Python28%
- YAML24%
- TypeScript16%
- JavaScript13%
- Markdown12%
- HTML5%
- Other (3)2%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
agentaid-voice/agent-aid/package.json
npm ยท 36- @livekit/components-react
- @livekit/protocol
- @phosphor-icons/react
- @radix-ui/react-select
- @radix-ui/react-slot
- @radix-ui/react-toggle
- buffer-image-size
- class-variance-authority
- clsx
- jose
- livekit-client
- livekit-server-sdk
- mime
- motion
- next
- next-themes
- react
- react-dom
- +18 more
agentaid-voice/pyproject.toml
pypi ยท 8- livekit
- livekit-agents
- livekit-plugins-noise-cancellation
- livekit-plugins-silero
- livekit-plugins-turn-detector
- python-dotenv
- torch
- transformers
agentaid-claude-service/package.json
npm ยท 5- @anthropic-ai/sdk
- chromadb
- cors
- dotenv
- express
agentaid-marketplace/requirements.txt
pypi ยท 2- pydantic
- uagents
Declared in the repositoryโs manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This projectโs features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.