π± GrowLocal AI: Touch Grass with Open-Source AI in the Soil
Built for the Hacktoberfest 2026 Open-Source AI Challenge: Week 1 ("Touch Grass").
π What We Built & Who It's For
When modern AI applications promise to "help you garden," they usually mean trapping you in front of a glowing glass rectangle, chatting with a generic cloud LLM that hallucinates frost dates, sells your garden coordinates to telemetry servers, and goes completely dead the moment you walk out to the back acre where cellular service disappears.
GrowLocal AI takes the opposite approach.
We built a mobile-first, privacy-respecting gardening companion designed to get you off the screen and into the living soil. Whether you're managing a 50 sq ft suburban raised bed or a container balcony in Zone 7b, GrowLocal AI calculates deterministic planting calendars, pairs synergistic companion crops, diagnoses plant stress, and schedules daily hands-on chores.
Once you check your tasks, the app actively instructs you to put your phone away and touch grass.
π§ Why Open Innovation Matters for What We Built
The core prompt of this challenge asked builders: Tell us why open innovation matters for what you built.
For GrowLocal AI, open innovation is not an optional aesthetic choiceβit is the foundational requirement that makes the product viable:
- True Offline Resilience in the Field: Food resilience and gardening happen in the dirt, often in remote valleys, community plots, or backcountry properties with zero cellular bars. By using Google Gemma 2 2B quantized with 4-bit weights served locally via Ollama, GrowLocal AI runs genuine, new AI reasoning directly on consumer laptop or local hardware without internet access.
- Absolute Privacy of Location & Food Data: Knowing what a family grows, where their home beds are, and when they harvest is sensitive personal data. In GrowLocal AI, personal garden layouts, planting schedules, and journal entries are stored strictly in browser IndexedDB on the user's device. No garden data ever leaves the machine.
- Deterministic Truth Over Hallucinations: Gardening mistakes cost months of labor and lost harvests. Instead of relying on closed LLM probabilistic memory, we used the open-source Mastra agent harness to ground every model interaction in deterministic, university-extension-verified agronomic knowledge (Cornell, UC Davis, Oregon State, Purdue).
- Pluggable Architecture Without Vendor Lock-in: Our Model Registry allows users to run Google Gemma 2, swap to another open-weight model, or use in-browser WebGPU via WebLLM without modifying the gardening tools or application layers.
ποΈ System Architecture
flowchart TD
subgraph Client ["Client Device (Mobile / PWA)"]
UI["Next.js 14 Mobile-First Web App"]
IDB[("Local IndexedDB\nβ’ Garden Profiles\nβ’ Active Plants\nβ’ Care Tasks\nβ’ Journal Observations")]
UI <--> IDB
end
subgraph AgentHarness ["Mastra Agent Framework"]
Agent["GrowLocalGardener Agent"]
T1["recommendCrops()"]
T2["createGardenPlan()"]
T3["getGardeningKnowledge()"]
T4["assessPlantSymptoms()"]
T5["generateCareTasks()"]
T6["recordGardenObservation()"]
Agent --> T1 & T2 & T3 & T4 & T5 & T6
end
subgraph KnowledgeData ["Local Extension Knowledge Pack"]
DB[("Versioned Botanical DB\nβ’ 20+ Companion Crops\nβ’ USDA Frost Calendars\nβ’ IPM Diagnostic Rules\nβ’ Cornell & UC ANR Citations")]
T1 & T2 & T3 & T4 & T5 <--> DB
end
subgraph AIProviders ["Model Provider Abstraction Layer"]
Registry["ModelRegistry"]
OllamaP["OllamaGemmaProvider\n(gemma2:2b-instruct-q4_K_M)\n100% Local & Offline"]
WebLLMP["WebLLMGemmaProvider\n(WebGPU In-Browser)"]
HostedP["HostedRenderProvider\n(Render Cloud Demo)"]
Registry --> OllamaP & WebLLMP & HostedP
end
UI <--> Agent
Agent <--> Registry
subgraph Telemetry ["Observability & Privacy"]
Sentry["Sentry Agent Tracing\nβ’ Execution Latency\nβ’ Tool Duration\nβ’ Stripped PII"]
Agent -.-> Sentry
end
π οΈ The Mastra Gardening Agent: 6 Typed Tools
Our agent, GrowLocalGardener, is orchestrated with Mastra and executes 6 deterministic tools validated against strict Zod schemas:
-
recommendCrops: Evaluates microclimate parameters (USDA hardiness zone, sun hours, available square footage, water access, and container filters) to calculate suitability scores (0-100), yield estimates, and companion groupings. -
createGardenPlan: Computes spring indoor seed sowing, direct sowing, transplant dates, and continuous harvest windows based on localized frost dates. -
getGardeningKnowledge: Retrieves authoritative organic gardening guidance with exact extension citations. -
assessPlantSymptoms: Evaluates physiological stress vs fungal/pest disease, providing safe in-field diagnostic checks, organic remedies, and explicit uncertainty disclaimers. -
generateCareTasks: Generates actionable, growth-stage-appropriate care chores (watering, fertilizing, weeding, pruning, harvesting, frost protection). -
recordGardenObservation: Validates plant journal entries and commits them to the local persistence layer with user confirmation.
π Hackathon Sponsor Track Integrations
-
Google Gemma (Priority A): Google Gemma 2 2B Instruct (
gemma2:2b, Q4_K_M quantized) runs directly on the local machine via Ollama, generating verified gardening advice completely offline. - Mastra (Priority A): Powers the agentic tool orchestration, validation schemas, and observable execution traces.
-
Render (Priority A): Complete production deployment configuration (
render.yamlandDockerfile) with clean separation of hosted and local private modes. -
GitHub Copilot (Priority A): Agentic pair programming documented in
COPILOT.mdfor schema generation, frost math, and test suites. - Sentry Agent Tracing (Priority A): Real-time telemetry inspector capturing agent durations, tool latency, and error states with PII stripped.
- ElevenLabs (Priority B): Voice synthesis reads tasks aloud when hands are covered in dirt, with seamless offline Web Speech fallback.
-
MongoDB Atlas (Priority B): Vector search configuration in
atlas.config.jsonfor optional global knowledge indexing.
π€ Agent Session Transcript
Here is the interactive DevRelay agent session documenting the build, tool schemas, and local test run:
π§ͺ Automated Evaluation Results
We built an automated evaluation suite (scripts/test-agent.ts) that verifies contrasting microclimates, frost math, symptom differential accuracy, and Mastra agent trace generation:
====================================================
GROWLOCAL AI: AGENT & TOOL EVALUATION SUITE
====================================================
--- TEST 1: Contrasting Garden Condition Recommendations ---
β
PASS: Returned recommendations for cold shade container
β
PASS: Score is appropriately penalized for full shade/scarce water
β
PASS: Every recommendation includes verified source citations
β
PASS: High suitability score for optimal sun and water conditions
β
PASS: Returned companion grouping synergies
--- TEST 2: Structured Garden Plan & Frost Scheduling ---
β
PASS: Plan contains all selected crops
β
PASS: Preserves exact last frost date
β
PASS: Warm-season tomato identified for indoor seed sowing before frost
--- TEST 3: Extension Knowledge Retrieval & Source Citations ---
β
PASS: Retrieved relevant composting passages
β
PASS: Knowledge pack marked as offline verified
--- TEST 4: Plant Symptom Assessment & Uncertainty Guardrails ---
β
PASS: Accurately recognized Blossom End Rot
β
PASS: Enforced scientific non-definitive uncertainty disclaimer
--- TEST 5: Daily Care Tasks Generation ---
β
PASS: Generated multiple care tasks
--- TEST 6: Observation Validation & Privacy ---
β
PASS: Flagged for local-only storage
--- TEST 7: Mastra Agent GrowLocalGardener End-to-End Trace ---
β
PASS: Observable trace captured tool execution (Trace Duration: ~14ms)
--- TEST 8: Pluggable Model Provider Architecture ---
β
PASS: Default model is Google Gemma 2 2B
====================================================
EVALUATION SUMMARY: 30/30 TESTS PASSED (100% SUCCESS)
====================================================
πΏ Try It Yourself
- Clone repository:
git clone https://github.com/kayode96-max/Growlocal.git - Run
npm install - Start Ollama and pull Gemma:
ollama run gemma2:2b - Run
npm run devand openhttp://localhost:3000 - Disconnect your Wi-Fi, take your laptop into the garden, and touch grass!
Top comments (0)