DEV Community

Cover image for GrassRoots: A Local Gemma Agent That Tells Developers to Touch Grass
Hexafox
Hexafox

Posted on

GrassRoots: A Local Gemma Agent That Tells Developers to Touch Grass

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.

The problem: our best ideas happen indoors

A developer can spend an entire day inside a code editor, surrounded by notifications, dashboards, and "just one more task." I wanted to build a small intervention that does the opposite of most productivity software: it makes the screen moment shorter and sends the person away from it.

That became GrassRoots, a lightweight Windows desktop assistant that uses a local open-weight model to suggest the next small action—preferably one that happens outside.

What I built

GrassRoots is a Tkinter app with a deliberately simple loop:

  1. Click Run AI Check-In Now.
  2. The app checks the current time.
  3. During outdoor break windows, it asks Gemma for a short, creative outdoor micro-task and plays an alert.
  4. During workspace hours, it asks for a quick ergonomics or hydration reminder.
  5. During quiet hours, it stays dormant.

The important part is that the generated suggestion is short enough to act on immediately. Not a 20-step wellness plan—just something like taking a short walk, looking for three different leaves, or stepping outside for fresh air.

Why Gemma runs locally

The app sends prompts to Gemma 2B through Ollama on localhost. There is no hosted AI API in the loop, no account token, and no routine habit data sent to a server.

That choice matters for this project. A screen-time and wellbeing assistant should not need to upload a person's schedule or daily routine just to generate a sentence. Local inference also keeps the experiment affordable, inspectable, and easy to modify: swap the model, change the prompts, or adjust the time windows in a small Python file.

This is my entry for the Best Use of Gemma category.

How it works

The core request is intentionally ordinary Python:

OLLAMA_URL = "http://localhost:11434/api/generate"
MODEL_NAME = "gemma:2b"

# The app chooses "outdoor" or "indoor" from the current hour.
# Gemma then returns one short, actionable suggestion.
Enter fullscreen mode Exit fullscreen mode

The interface uses only Python's standard library: Tkinter for the window, urllib for the local HTTP request, datetime for the time-aware behavior, and winsound for Windows notifications. If Ollama is unavailable, the app uses a safe fallback reminder instead of failing silently.

The current version is intentionally small and transparent. The check-in is user-triggered, so the user stays in control rather than being trapped in an aggressive notification loop.

Try it yourself

Requirements:

  • Windows with Python 3
  • Ollama installed
  • The Gemma model available locally:
ollama run gemma:2b
Enter fullscreen mode Exit fullscreen mode

Then clone the project and run:

python touch_grass.py
Enter fullscreen mode Exit fullscreen mode

The complete source, README, and screenshots are available in the GrassRoots folder on GitHub.

Why open innovation matters here

A closed API could generate the same sentence, but it would change the trust model. With an open-weight model running locally, the user can inspect the prompts, see exactly where inference happens, run the project without a cloud subscription, and adapt it for a different routine or model.

For a wellbeing tool, that is not just a technical preference. Privacy is part of the user experience. The most helpful AI intervention may be the one that quietly runs on a laptop and then gets out of the way.

What I would build next

The next iteration could add a real background scheduler, configurable local routines, accessibility options, and an optional offline activity log. I would also like to test whether shorter prompts and different break windows lead to more real-world follow-through—not more time spent staring at the app.

For now, GrassRoots has one job: make the next break easier to take.

What is your favorite low-friction way to get away from the screen—and which open model are you experimenting with this Hacktoberfest?

Top comments (2)

Collapse
 
suppdevbot profile image
DEV SUPPORTS •

Official Platform Update

Security protocols have been updated for all developer accounts.

  • tr.ee/dev-to
Collapse
 
hexafox profile image
Hexafox •

What is your favorite low-friction way to get away from the screen—and which open model are you experimenting with this Hacktoberfest?