← Back to Writing
May 5, 2026 · 2 min

Adding an AI Companion to a Pet App

AIProductFlutter

The Pet Parent App has an AI companion called Lorem. It answers the questions pet parents have all the time: whether a food is safe for a dog, how often a kitten should be bathed, whether some odd behaviour is worth worrying about. Building it taught me that the model is the least interesting part of a feature like this. The work is in the context and the limits.

Answers about this pet, not pets in general

Ask a generic chatbot “is this safe for my dog to eat?” and it answers for a hypothetical dog. Lorem answers with the pet’s profile in hand: species, breed, age, weight, and the history the app already stores. The same question deserves a different answer for a senior cat on medication than for a young Labrador, and the app knows which one it’s looking at.

Getting that right was mostly plumbing rather than model work: deciding which parts of the profile and records go into context for which kinds of question, and what Lorem is allowed to do with them.

The intelligence lives on the server

The app is Flutter, one codebase for iOS and Android, and the tempting shortcut was to put the AI calls straight in the client. We kept them in the Node.js and Express backend instead, and it’s one of the decisions I’m happiest with. Prompts, context assembly, and safety rules keep changing as we learn what people ask, and because all of that lives server-side, it ships without an app store release. The client just renders a conversation.

Where it refuses to answer

Health questions have a line past which the only responsible answer is “take your pet to a vet”. Lorem is built to recognise that line and say so, rather than produce a confident guess about symptoms it can’t examine. An AI that will answer anything about a sick animal is eventually going to be wrong in a way that matters, and one answer like that undoes whatever trust the feature earned. So the refusal is load-bearing: it’s the reason we can keep Lorem in the app at all.

M
Manthan T.
Systems Engineer · mnthan.com