EcoLafaek - Autonomous AI Agent for Environmental Monitoring β

EcoLafaek demonstrates the power of Amazon Bedrock AgentCore to create truly autonomous AI agents that solve real-world environmental challenges in Timor-Leste. Our system showcases multi-round tool calling, code execution, browser automation, and intelligent decision-making through advanced reasoning LLMs.
β
LLM from AWS Bedrock: Amazon Nova-Pro v1.0 (amazon.nova-pro-v1:0)
β Amazon Bedrock AgentCore:
- β Code Interpreter primitive for autonomous chart generation
- β Browser Tool primitive for web scraping
- β
Application runs on
agentcore_app.run()framework
β Autonomous AI Agent:
- β Uses reasoning LLM (Nova-Pro) for decision-making
- β Demonstrates autonomous capabilities with multi-round tool calling (up to 5 rounds)
- β Integrates external tools: SQL databases, code execution, web scraping, S3 storage
β Production Deployment: Live on AWS Lightsail
π€ Agent Innovation Highlights: β
- Multi-Round Tool Orchestration: Agent autonomously chains SQL β Chart Generation β Map Creation β Web Scraping
- Code Interpreter Integration: Generates matplotlib/pandas visualizations on-demand via AgentCore
- Browser Automation: Scrapes web content using Playwright via AgentCore Browser Tool
- Intelligent Decision-Making: Nova-Pro reasoning determines which tools to call and in what sequence
- Real-World Impact: Solving waste management crisis affecting 300+ tons daily in Timor-Leste
π Judge Quick Start β
π― Live Demo Access: β
| Component | URL | Credentials |
|---|---|---|
| π± Mobile App | Download APK | Username: usertestPassword: 1234abcd |
| π Public Dashboard | www.ecolafaek.com | No login required |
| π€ AI Agent Chat | www.ecolafaek.com/agentcore-chat | Try: "Show waste trends chart" |
| β‘ Backend API | www.ecolafaek.xyz/health | Health check endpoint |
π Complete Documentation: β
| Component | Documentation | Description |
|---|---|---|
| π Architecture | Diagram/README.md | Complete system architecture |
| β‘ Backend API | mobile_backend/README.md | AgentCore implementation details |
| π Dashboard | ecolafaek_public_dahboard/README.md | Frontend integration |
| π± Mobile App | ecolafaek/README.md | Flutter mobile client |
| ποΈ Database | database/README.md | Schema and vector storage |
π About EcoLafaek β
EcoLafaek (named after the crocodile "Lafaek" in Timorese culture) is an AI-powered environmental monitoring system that empowers citizens of Timor-Leste to combat waste management challenges through intelligent reporting and autonomous data analysis.
π― The Problem β
Timor-Leste's capital Dili faces a severe waste crisis:
- 300+ tons of waste generated daily
- 100+ tons go uncollected each day
- Blocked drainage systems cause flooding during rainy season
- Limited infrastructure and resources for waste management
Source: JICA Survey on Solid Waste Management

π‘ Our Solution β
An autonomous AI agent system that:
- Analyzes waste images using Amazon Bedrock Nova-Pro multimodal LLM
- Classifies waste types and severity automatically
- Generates real-time analytics and visualizations via AgentCore Code Interpreter
- Provides intelligent insights through natural language chat interface
- Empowers communities with data-driven decision making
ποΈ System Architecture β

Core Components: β

Detailed Architecture: See Diagram/README.md
π€ Autonomous AI Agent Workflow β
Multi-Round Tool Calling Example β
User Query: "Show me waste trends and create a map of hotspots"
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Round 1: Nova-Pro Reasoning β
β β "I need to get waste data first" β
β β Calls: execute_sql_query β
β SELECT DATE(created_date), waste_type, COUNT(*) β
β FROM reports GROUP BY DATE(created_date), waste_type β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Round 2: Nova-Pro Reasoning β
β β "Got the data, now create a trend chart" β
β β Calls: generate_visualization β
β AgentCore Code Interpreter executes Python: β
β - import matplotlib.pyplot as plt β
β - Generate line chart β
β - Return base64 PNG β Upload to S3 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Round 3: Nova-Pro Reasoning β
β β "Now get hotspot locations for the map" β
β β Calls: execute_sql_query β
β SELECT name, center_latitude, center_longitude, β
β total_reports FROM hotspots WHERE status='active' β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Round 4: Nova-Pro Reasoning β
β β "Create an interactive map with hotspot markers" β
β β Calls: create_map_visualization β
β Generates Folium HTML map β Upload to S3 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Round 5: Final Response β
β β Returns markdown with: β
β - Chart image:  β
β - Interactive map link β
β - Data analysis summary β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββExample Log
Agent Tools Available β
| Tool Name | AgentCore Component | Purpose | Example |
|---|---|---|---|
execute_sql_query | Direct Execution | Database queries | "How many reports last week?" |
generate_visualization | Code Interpreter | Chart generation | "Show waste distribution chart" |
create_map_visualization | Code Interpreter | Map creation | "Map hotspots" |
scrape_webpage_with_browser | Browser Tool | Web scraping | "What is EcoLafaek?" |
get_ecolafaek_info | Browser Tool | Project info | "Tell me about features" |
Example Chat
π± Components Overview β
1. Mobile Application (Flutter) β
- Cross-platform iOS/Android app
- Camera integration for waste photo capture
- GPS location tracking
- Real-time AI analysis feedback
- Personal impact dashboard
β Full Mobile App Documentation
2. Public Dashboard (Next.js + Vercel) β
- AI Agent chat interface with multi-round tool calling
- Semantic vector search powered by Amazon Titan Embed
- Interactive geospatial maps
- Real-time analytics and reporting
- Community leaderboards
β Full Dashboard Documentation
3. Backend API (FastAPI + AgentCore) β
- Runs on
agentcore_app.run()framework - Amazon Bedrock Nova-Pro integration for reasoning
- AgentCore Code Interpreter for chart generation
- AgentCore Browser Tool for web scraping
- Multi-round conversational AI with tool orchestration
- Image analysis with Amazon Bedrock invoke_model()
- Deployed on AWS Lightsail
β Full Backend Documentation
4. Database (Distributed SQL + Vectors) β
- User authentication and management
- Waste report storage with GPS coordinates
- AI analysis results with 1024-dim vector embeddings
- Hotspot detection and clustering
- Multi-application access
β Full Database Documentation
5. Admin Panel (Next.js - Local Only) β
- User management and moderation
- Report oversight and analytics
- System configuration
- AI performance monitoring
- Security: Not deployed publicly, local access only
β Full Admin Panel Documentation
π Getting Started β
For Judges - Quick Testing β
Try the Live Dashboard:
Visit: https://www.ecolafaek.com Click: "Agent Chat" β Ask: "Show waste type distribution chart"Test Mobile App:
Download: https://www.ecolafaek.com/download Login: usertest / 1234abcd Try: Submit a report with photoExplore Vector Search:
Visit: https://www.ecolafaek.com/vector-search Enter: "plastic waste pollution" See: Semantic similarity results
For Developers - Local Setup β
See component-specific README files for detailed setup instructions:
π― Technical Highlights β
Amazon Bedrock Integration β
Nova-Pro LLM (amazon.nova-pro-v1:0):
- Multi-modal image + text analysis
- Autonomous reasoning and decision-making
- Tool orchestration and planning
- Multi-round conversational capabilities
Titan Embed (amazon.titan-embed-image-v1):
- 1024-dimensional vector embeddings
- Semantic similarity search
- Image and text embedding generation
AgentCore Primitives β
Code Interpreter:
with code_session(region='us-east-1') as client:
result = client.invoke('executeCode', {
'language': 'python',
'code': chart_generation_code
})Browser Tool:
with browser_session(region='us-east-1') as client:
ws_url, headers = client.generate_ws_headers()
browser = playwright.chromium.connect_over_cdp(ws_url, headers=headers)π Impact & Scale β
- β Production Deployment: Live system with real users
- π± 3+ Active Users: Mobile app downloads and engagement
- πΊοΈ 50+ Reports: Waste reports submitted and analyzed
- π€ 25+ AI Interactions: Agent tool executions
πΉ Demo Video β
π οΈ Kiro - AI-powered Integrated Development Environment (IDE) β
During the development of EcoLafaek, we leveraged Kiro - AWS's AI agent platform - to accelerate our development workflow and enhance code quality.

How Kiro Enhanced Our Development: β
π Code Analysis & Review
- Analyzed complex AgentCore integration code for best practices
- Identified potential bugs and security vulnerabilities
- Suggested optimizations for multi-round tool calling logic
π Architecture Diagram Generation
- Generated system architecture diagrams from codebase
- Created visual representations of agent workflow
- Helped document complex AI agent interactions
π€ AI Agent Code Assistance
- Guided implementation of AgentCore Code Interpreter integration
- Provided examples for Browser Tool usage with Playwright
- Assisted with Amazon Bedrock API integration patterns
π Documentation Generation
- Helped structure comprehensive README files
- Generated API documentation from code comments
- Created deployment guides and setup instructions
β‘ Rapid Prototyping
- Accelerated development of visualization tools
- Streamlined database schema design
- Quick testing of different AI prompt strategies
Kiro's autonomous capabilities allowed us to focus on solving Timor-Leste's waste management challenges while maintaining high code quality and comprehensive documentation.
πΏ Built with β€οΈ for Timor-Leste πΏ
AWS AI Agent Global Hackathon
Powered by Amazon Bedrock AgentCore, Nova-Pro, and Titan Embed

"Lafaek" - The Sacred Crocodile Guardian of Timor-Leste
