DEV Community

Ayush Tripathi
Ayush Tripathi

Posted on

# TrailMate AI: An Open-Weight AI Companion That Gets You Outside

What I Built

We spend a lot of time on our phones, whether we're scrolling through social media, watching videos, or looking for something interesting to do. Sometimes, we end up spending more time on our screens than we intended.

That got me thinking: what if we used AI to encourage people to do the opposite?

That's the idea behind TrailMate AI, a small project I built for the Touch Grass challenge. It is a nature companion designed to help people take a break from their screens, go outside, and pay more attention to their surroundings.

The idea is to make going outside a little more interesting. Instead of simply going for a walk, you could have a small activity to try, something new to observe, or a question to explore.

The project includes three main features:

Nature Missions: Generate simple outdoor activities based on interests such as plants, leaves, birds, clouds, and gardening.

Ask Nature: Ask questions about the natural world and learn something new.

Field Journal: Record interesting things you noticed during your walk and revisit those observations later.

I wanted to keep the experience simple. Get an idea, read the instructions, put your phone away, and go explore.

Demo

You can find the project source code here:

TrailMate AI on GitHub Code

The complete source code is available in my public GitHub repository:

https://github.com/ayushtripathi15567/trailmate-ai

The repository contains the frontend, backend, and instructions for setting up the project locally.

How I Built It

I built TrailMate AI using React and Vite for the frontend and Python with Flask for the backend.

For the AI component, I chose Gemma, an open-weight model that can be run locally using Ollama.

The basic workflow is straightforward. A user selects an interest and the amount of time they have available. The backend sends a prompt to the locally running model, which generates a nature-related activity. Users can also ask questions about nature through the application.

The field journal uses browser local storage, allowing users to save their observations without needing a separate database for that feature.

I wanted to keep the project relatively lightweight and use technologies that other developers could run and experiment with themselves.

Why Does Open Innovation Matter?

One of the reasons I wanted to explore open-weight AI was the flexibility it offers developers.

When building with a closed AI API, you generally depend on the provider for model access and the way the service is delivered. With an open-weight model, you have more freedom to experiment with prompts, choose compatible models, and run inference on your own hardware.

For TrailMate AI, local inference is particularly interesting because the application is intended to encourage people to spend time away from their screens.

Running a model locally can reduce dependence on external AI services and limit the need to send every question to a third-party provider. It can also avoid per-request API charges, although local inference still requires suitable hardware and electricity.

Another benefit is that the project can be extended by other developers. Someone could adapt the same idea for birdwatching, gardening, hiking, or environmental education.

I like that open-source development makes this kind of experimentation more accessible. Developers can learn from the implementation, modify it to suit their needs, and build on top of it rather than starting from scratch.

For me, the interesting part is not just using an AI model. It is exploring how that model can be used to encourage a real-world activity instead of creating another reason to stay online.

My Agent Session

I haven't included a DevRelay agent session in this submission.

Prize Categories

Gemma — Best Use of Gemma

I plan to enter this category because the project is designed around using Gemma as its open-weight AI model. The final submission should reflect the model integration and features I have actually tested.

Final Thoughts

This project started with a simple question: can we use AI to help people spend less time on their phones?

TrailMate AI is my attempt at exploring that idea. It is a small project, but it gave me an opportunity to experiment with open-weight AI, connect a frontend to a backend, and think about how technology can encourage people to engage with the world outside their screens.

I also see plenty of room to improve it, from adding more nature activities to exploring ways to make it useful for people who enjoy hiking, gardening, or simply taking a walk.

That is one of the things I enjoy about building projects: starting with a small idea, turning it into something tangible, and learning along the way.

Thanks for reading. I'd love to hear your thoughts and suggestions for improving TrailMate AI.

Top comments (0)