Skip to content

EcoLafaek - Autonomous AI Agent for Environmental Monitoring ​

EcoLafaek Logo

AWS AI Agent Hackathon
Amazon Bedrock AgentCoreAmazon NovaTitan EmbedS3Lightsail
FlutterNext.jsFastAPIPython

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: ​

ComponentURLCredentials
πŸ“± Mobile AppDownload APKUsername: usertest
Password: 1234abcd
🌐 Public Dashboardwww.ecolafaek.comNo login required
πŸ€– AI Agent Chatwww.ecolafaek.com/agentcore-chatTry: "Show waste trends chart"
⚑ Backend APIwww.ecolafaek.xyz/healthHealth check endpoint

πŸ“š Complete Documentation: ​

https://docs.ecolafaek.com

ComponentDocumentationDescription
πŸ“ ArchitectureDiagram/README.mdComplete system architecture
⚑ Backend APImobile_backend/README.mdAgentCore implementation details
🌐 Dashboardecolafaek_public_dahboard/README.mdFrontend integration
πŸ“± Mobile Appecolafaek/README.mdFlutter mobile client
πŸ—„οΈ Databasedatabase/README.mdSchema 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

Waste in Timor-Leste

πŸ’‘ Our Solution ​

An autonomous AI agent system that:

  1. Analyzes waste images using Amazon Bedrock Nova-Pro multimodal LLM
  2. Classifies waste types and severity automatically
  3. Generates real-time analytics and visualizations via AgentCore Code Interpreter
  4. Provides intelligent insights through natural language chat interface
  5. Empowers communities with data-driven decision making

πŸ—οΈ System Architecture ​

Architecture Diagram

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: ![Trend](s3_url)                          β”‚
β”‚   - Interactive map link                                    β”‚
β”‚   - Data analysis summary                                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Example Log

Agent Tools Available ​

Tool NameAgentCore ComponentPurposeExample
execute_sql_queryDirect ExecutionDatabase queries"How many reports last week?"
generate_visualizationCode InterpreterChart generation"Show waste distribution chart"
create_map_visualizationCode InterpreterMap creation"Map hotspots"
scrape_webpage_with_browserBrowser ToolWeb scraping"What is EcoLafaek?"
get_ecolafaek_infoBrowser ToolProject 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 ​

  1. Try the Live Dashboard:

    Visit: https://www.ecolafaek.com
    Click: "Agent Chat" β†’ Ask: "Show waste type distribution chart"
  2. Test Mobile App:

    Download: https://www.ecolafaek.com/download
    Login: usertest / 1234abcd
    Try: Submit a report with photo
  3. Explore 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:

python
with code_session(region='us-east-1') as client:
    result = client.invoke('executeCode', {
        'language': 'python',
        'code': chart_generation_code
    })

Browser Tool:

python
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 ​

Watch the 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.

Using Kiro for Development

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

Tais Pattern

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

Built with ❀️ for Timor-Leste | AWS AI Agent Global Hackathon