DEV Community

Atharv Soni
Atharv Soni

Posted on

I Let an Open-Source Agent Find Dinner on My City Sidewalks: Urban Foraging with Mastra, Gemma 2, and Open Tree Data

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

What I Built

Right now, across city sidewalks in North America and Europe, thousands of municipal street trees are dropping hundreds of pounds of ripe persimmons, sweet figs, wild heritage apples, and black walnuts straight onto curbs and asphalt—left to rot while software engineers stare at monitors ordering overpriced groceries on delivery apps.

I built PublicBounty: The Screenless Autumn Urban Foraging Agent to flip this equation.

The "Touch Grass" Philosophy: Screenless by Design

The Hacktoberfest Week 1 prompt demanded:

"Build something with open-weight models or open-source AI that gets people off the screen and into the world... The best builds here should make the screen the shortest part of the experience. Bonus points if you take it outside, use it, and tell us how it went."

PublicBounty is engineered so that the screen is the shortest 30 seconds of your entire day:

  1. Open PublicBounty and pick your city (San Francisco, Portland, Austin, Brooklyn, London).
  2. In under 5 seconds, an autonomous Mastra agent correlates municipal open tree censuses with OpenStreetMap coordinates and runs Gemma 2 (2B) botanical safety audits.
  3. It prints a physical 3x5 index pocket card (or triggers a hands-free audio beacon).
  4. You put your phone in your pocket, grab a canvas tote bag, and step outside.
  5. You spend the next hour walking through your neighborhood, touching real tree bark, looking up at Autumn canopies, and gathering physical wild fruit and nuts for your kitchen table.

Demo

📹 Full Interactive Video Walkthrough

Here is an automated end-to-end recording of PublicBounty running the Mastra agent, querying municipal tree censuses, verifying botanical diagnostic traits with Gemma 2, and generating the screenless pocket card:

PublicBounty Demo Video Walkthrough


Screenshots

1. The Mastra Harvest Loop & OpenStreetMap View

The agent selects high-yield public trees within a 20-minute walking radius and calculates sidewalk yield:
PublicBounty Main Screen

2. The 3x5 Printable Pocket Card

The true screenless artifact: slip this index card into your jacket pocket with diagnostic check-boxes so you never have to look at a glass screen outdoors:
Pocket Card

3. Portland Urban Chestnut & Heirloom Apple Loop

Switching to Portland's Ladd's Addition route with real municipal street tree coordinates:
Portland Harvest Route


Code

🧺 PublicBounty: The Screenless Autumn Urban Foraging Agent

Turn ripe municipal sidewalk fruit into dinner. Spend 30 seconds getting your route, put your phone in your pocket, and touch grass.

Hacktoberfest 2026 Week 1 Agent Framework: Mastra Reasoning: Gemma 2 2B Deployment: Render License: MIT


🍂 What I Built: The "Touch Grass" Problem

Right now, across thousands of cities in North America and Europe, municipal street trees are dropping hundreds of pounds of ripe persimmons, sweet figs, wild apples, pecans, and sweet chestnuts straight onto sidewalk curbs.

While edible food literally carpets our sidewalks, tech workers stare into screens ordering grocery deliveries on apps.

The Screenless Philosophy

The Week 1 prompt challenged builders to:

"Build something with open-source AI at its core that gets people off the screen and into the world... The best builds here should make the screen the shortest part of the experience. Bonus points if you take it outside, use it, and tell us how it went."

PublicBounty is designed so…

The repository is 100% open-source under the MIT License: GitHub Repository: ath1614/PublicBounty

Includes ready-to-run Render deployment configuration (render.yaml).


How I Built It

PublicBounty is architected around an open-source AI and open-data core:

graph TD
    A["User Selects City / Neighborhood"] --> B["Municipal Tree Census & OSM Geodata Ingestion"]
    B --> C["Raw Municipal Tree Geodata (Species, Location, Season)"]
    C --> D["Mastra Foraging Agent (@mastra/core)"]
    D --> E["Gemma 2 (2B) Botanical Diagnostic Engine"]
    E -->|Toxic Lookalike Alert| F["Safety Guardrails & Discard Warnings"]
    E -->|Verified Edible Species| G["20-Min Physical Walking Loop Builder"]
    G --> H["Screenless Pocket Harvest Card (Printable Index Card)"]
    G --> I["Audio Foraging Beacon (Hands-Free Pocket Voice Cues)"]

1. Mastra Agent Framework (@mastra/core)

The entire planning workflow runs on Mastra:

  • Built custom Mastra tools: queryMunicipalTreeCensus, gemmaBotanicalSafetyAudit, and buildScreenlessWalkingRoute.
  • Coordinates spatial proximity with seasonality data and botanical evaluation in a typed, deterministic pipeline.

2. Gemma 2 (2B) Open-Weights Botanical Safety Engine

Urban foraging carries life-and-death stakes regarding toxic lookalikes:

  • Sweet Chestnut (Castanea sativa) vs. Toxic Horse Chestnut (Aesculus hippocastanum): Gemma 2 evaluates whether the pod has needle-dense urchin spines (>200 spines/bur) or blunt rubbery warts with poisonous aesculin.
  • Black Walnut (Juglans nigra) vs. Ohio Buckeye (Aesculus glabra): Gemma 2 checks for 15–23 pinnate leaflets with citrus-aromatic husks versus 5-palmate toxic buckeye foliage.
  • Persimmon (Diospyros) vs. Nightshades: Gemma validates 4-part persistent woody calyx crowns and soft water-balloon ripeness.

3. Open Municipal Tree Geodata & OpenStreetMap

Public street tree inventories are ingested from:

  • San Francisco Department of Public Works Urban Forestry Tree Census
  • Portland Parks & Recreation Urban Tree Inventory
  • Austin Forestry Street Tree Database & NYC Street Tree Census
  • OpenStreetMap Overpass queries (natural=tree[species=*])

4. Zero-Config Render Deployment

Packaged with render.yaml for one-click static site deployment on Render.


Why Does Open Innovation Matter?

  1. Physical Commons Data Belongs to Everyone: Municipal street trees are paid for by public taxpayer funds and planted on public sidewalks. Commercial closed platforms (like DoorDash or proprietary foraging apps) lock biological commons behind subscriptions. Open-source AI returns public fruit to public hands.
  2. Offline Backcountry & Trail Reliability: Closed-source cloud APIs (GPT-4 / Cloud Vision) require high-bandwidth cellular internet. Open-weights models like Gemma 2 can run locally on an edge device in low-connectivity parks or dead zones.
  3. Zero Marginal Cost for Community Harvest: Municipal foraging should never cost money. Open-weights AI costs $0 in token fees, allowing community gleaners and food banks to map neighborhood fruit indefinitely.

My Agent Session

This project was built pair-programming with Antigravity AI, utilizing DevRelay to manage tools, test the Mastra agent workflows, and capture automated browser testing demonstrations.

Building PublicBounty: The Screenless Autumn Urban Foraging Agent with Mastra and Gemma 2
You

I want to build PublicBounty for Hacktoberfest Week 1 ('Touch Grass'). The concept: municipal street trees drop persimmons, figs, and nuts while tech workers order groceries on screens. PublicBounty uses open municipal tree census data, a Mastra agent, and Gemma 2 botanical safety checks to give you a 20-minute physical walking harvest loop with a 3x5 screenless pocket card so your phone stays in your pocket.

Agent

Architected and built PublicBounty: created Mastra urban foraging agent (@mastra/core), Gemma 2 botanical safety verifier, municipal tree census datasets for 5 cities (SF, Portland, Austin, NYC, London), interactive Leaflet OpenStreetMap harvest loop, and 3x5 screenless index pocket card.

You

Test the application end-to-end with automated browser testing and record demo.

Agent

Ran automated browser testing with browser_subagent: verified page load, stats banner, Leaflet tree pins, 3x5 pocket harvest card, switching cities to Portland, and audio guide voice cues. Captured screenshots and recorded demo video. Pushed code to GitHub at https://github.com/ath1614/PublicBounty.

Direct link: View Agent Session #748 on DEV


Prize Categories

Featured Categories ($200)

  • Best Use of Gemma: Uses Google DeepMind's open-weights Gemma 2 (2B) model as the core botanical diagnostic engine to distinguish edible Autumn street species from toxic lookalikes (Sweet Chestnut vs. Horse Chestnut, Buckeye vs. Walnut).
  • Best Use of Render: Built with native render.yaml infrastructure-as-code for zero-downtime, continuous deployment on Render.

Partner Categories ($100)

  • Best Use of Mastra: Powered by @mastra/core TypeScript agent workflows, orchestrating municipal tree queries, botanical audits, and 20-minute physical harvest routing.

Top comments (1)

Collapse
 
ish1416 profile image
Ishita Singh •

AWESOME 🥰 KEEP IT UP