DEV Community

Cover image for Building a LINE First Fitness Agent with AI Cost Gates
Kevin Coto🚀💡
Kevin Coto🚀💡

Posted on • Edited on

Building a LINE First Fitness Agent with AI Cost Gates

It Started in Thailand

I built Fit Homie for LINE because that is what everyone in Thailand uses. If you want to reach people in Bangkok, you build on LINE. It is not a choice, it is the reality of the market.

The idea was simple. Snap a photo of your meal, send it to the bot, get back the nutritional breakdown. No app downloads, no complex logging. Just open the chat app you already use and take a picture.

The First Real Users

I tested it with my ex girlfriend and a group of friends. They got hooked. They were sending photos of every meal, comparing nutrition, tracking their progress. It was the first time I saw people actually stick with a fitness tool.

But then they started noticing the cracks. What if they wanted to log a meal on a desktop? What if they wanted to share their progress with someone who did not use LINE? What if LINE went down?

The chat app was both the reason it worked and the reason it could not scale.

The Cost Problem Nobody Thinks About

Before I launched, I calculated what it would cost if people actually used this thing. Every meal photo meant an AI inference call. If a hundred users logged three meals a day, that was three hundred API calls daily. At scale, the costs would eat any possible revenue.

I built a five layer cost optimization pipeline. Exact match cache for the same photo. Fuzzy match for similar meals. A precomputed database of ten thousand common foods. A local LLM fallback before hitting the paid API. Rate limiting and batching for the paid tier.

This cut AI costs by roughly eighty percent compared to calling the API directly every time.

From Chat Bot to Mobile App

The feedback from early users was clear. The concept was right but the delivery was limited by the platform. People wanted a real app. They wanted to see charts, set goals, track progress over time. Things a chat bot cannot do well.

So Fit Homie is now becoming a mobile app. The LINE bot still exists and handles quick meal logging. The app adds the depth that the chat interface cannot provide. Progress tracking, nutrition analytics, goal setting, history.

The bot is the front door. The app is the home.

What I Used

Django backend with LINE Messaging API. Gemini AI for food recognition. Next.js dashboard for analytics. Stripe for subscriptions. PostgreSQL for everything else.

Top comments (0)