# Hackathon 2026 – Building an AI Assistant for Vall Companys

> Source: <https://dev.to/samuraky/hackathon-2026-building-an-ai-assistant-for-vall-companys-hkj>
> Published: 2026-11-29 09:01:49+00:00

**Recommendation:** Keep the model advisory: validate its proposed actions against your database in code and require explicit user confirmation before executing anything with real-world cost.
More in the playbook "Designing agent systems": <https://wpnews.pro/playbooks/agent-architecture>

This is a submission for the [MLH x DEV Writing Challenge](https://dev.to/mlh-hackathon).

This weekend, the four of us attended **HackEPS 2026** in Lleida and chose the **Vall Companys** challenge: an AI assistant for farmers that runs on a smartwatch. The farmer just talks to the watch, without having to take out their phone in the middle of the farm.

We built two agents:

The organizers had already set up most of the infrastructure: the smartwatch (an ESP32-S3), speech recognition, text-to-speech, the language model and the database. Everything went through their server called Brain. Our job was to develop the logic behind both agents using Python and Flask. Every message follows this path:

Watch → Brain → ngrok → Flask (/agent) → Brain → Watch

On paper, it didn't seem like much. It was.

An LLM is really good at understanding what people say, but sometimes it gets things wrong. Here, we're talking about orders involving thousands of kilos. We didn't want a truck full of feed being sent out just because the model returned `"Validated": "Yes"`.

So the model suggests, and our code decides. Before accepting anything, we check against the database that:

If everything checks out, the watch displays a summary, and the order isn't created until the farmer says yes.

Then there's the way people actually speak: "Okay, no, wait." Or sometimes speech recognition picks up the wrong farm or silo. We followed a simple rule: if the agent isn't sure, it asks.

The original interface was a chat with message bubbles. It worked, but it wasn't particularly easy to read, especially for older farmers or people who struggle to see things up close.

We replaced it with full-screen responses featuring:

The screen is 410 × 502 pixels. There isn't much room, so designing each screen basically turned into a discussion about what we could remove.

There were four of us and only one smartwatch. Compiling and flashing the firmware every time we wanted to see a change was frustrating, especially when someone else was almost always using the watch.

So we built a desktop simulator. It compiles the actual smartwatch interface code together with its graphics library and generates PNG screenshots of each screen directly on the computer.

To get it working on Windows, we used Zig as a C++ compiler. This meant one of us could keep working on the interface while someone else was testing voice commands on the actual watch.

Brain doesn't allow you to edit a reminder. To change one, we create the new reminder first and only then cancel the old one. If something goes wrong halfway through, at least the original reminder isn't lost.

Times can be ambiguous. "Remind me at 6": does that mean 6 AM or 6 PM? The agent asks.

And sometimes speech recognition makes up sentences when nobody is talking. Our favorite was "Thanks for watching." We added a filter so the agents wouldn't react to those messages.

To test everything without relying on the watch, we also built a keyboard-based chat tool, a fake Brain server, more than 500 unit tests and a tool that runs scenarios against the real LLM without writing anything to the database.

Here's how a feed order works:

Here's how the smartwatch interface changed throughout the hackathon.

We used MLH partner technologies: Entire and DEV.to for this post.

Here's the tech stack we worked with:

What we liked most was working on a problem that actually exists outside the world of computer science.

Before starting, we knew almost nothing about feed orders, silo capacities or feeding programs. We had to understand them well enough to make it possible for a farmer to place an order just by talking to a watch.

Another interesting part was working with AI as a team. Each of us had our own Claude Code instance working on the same repository. Four people and four AI assistants touching the same code: what could possibly go wrong?

To keep ourselves organized, we wrote a shared CLAUDE.md file containing the project rules and the restrictions set by the organizers. Each of us also kept a log of our sessions so someone else could pick up where we left off.

Later that night, one of us hit the AI usage limit. Since Brain sends messages from the watch to the most recently registered server, we had to move the main server to another computer and continue from there.

At another point, the server stopped working, and we couldn't test some parts of the project anymore. With the clock ticking, it was pretty stressful. We just kept working on whatever we could without it. Things like that happen during a hackathon, and sometimes you just have to work around them.

There was a bit of everything throughout the weekend. But seeing the redesigned interface finally running on the actual smartwatch at 2 AM made it all worth it.

Building something with AI is easy. Making it reliable is a different story, and that's where most of our time went.

We learned about AI agents, backend development, embedded systems and accessibility, but also quite a lot about working as a team when everyone is tired and running out of time.

We also got to experiment with technologies we don't normally work with.

We had a great time. And we did it all with just one smartwatch.
