Back to writing
Blog · 18 / 19FEB 25, 2025BUILD7 min read

AI agents with Mobile Application

Why React Native + a small AI agent loop is the cheat-code stack for solo developers in 2024.

What are AI agents and how can they be integrated in a mobile app?

AI agents, or conversational agents, are machine learning models that interact with users in natural language to help them with tasks or give personalized responses. They lean on the usual toolbox — supervised, unsupervised, and reinforcement learning, plus deep learning underneath.

As you work through this process, remember that it is not possible to create an "all-in-one" mobile app where all tasks are performed with minimal cost. The cost of developing a mobile application can vary widely based on factors such as the complexity of the app, the tools and technologies used, and the number of developers involved.

Setting up Tools

Automation tool

n8n is a low-code tool for automating tasks and processes across different apps and services. It's open-source and popular with developers. You can use their cloud, but I'm self-hosting it through Docker.

Ollama Server

Ollama lets me run open models locally — no API key, no rate limit, nothing leaving the box. For this stack the parts that matter are local execution and how cleanly it slots in behind everything else.

Core Development

Backend Technologies Used
  • Hono — my current favorite TypeScript backend layer, and it slots straight into Next.js API routes.
  • Drizzle on a Supabase Postgres backend.
  • A self-hosted MinIO S3 bucket.

Docker made the self-hosting painless — Ollama and n8n both went up without a fight. From there I moved on to the Next.js project for the API the frontend talks to.

Setting Up the Expo React Native Project

How does text streaming work in React Native apps?

I figured this would be the easy part. It wasn't. Streaming the model's text response isn't natively supported on iOS or Android — TextStreams work fine on web but start throwing errors inside a React Native project. I'm still hunting for a clean workaround.

The genuinely hard problem with this app is scaling it to thousands of requests. That's a later post — right now I just need the frontend wired up correctly.

I'll end on some optimism: I think building an app that takes a user's chat input and turns it into an event that triggers other tools is going to be easier than it looks right now. That loop is the backbone of most working AI agents, and once it clicks the rest follows.