Mio Unit Economics: Why Every Tier Is Profitable
Tier-by-tier margin analysis and why AI companion economics only get better from here.
28 parts · Feb 27, 2026 – Mar 19, 2026
Tier-by-tier margin analysis and why AI companion economics only get better from here.
The AI companion I built with OpenClaw burned through a staggering amount of money in under two weeks of casual chatting. One session: 750 turns from about 30 messages. The framework turned my 30 messages into 750 API calls, each resending a context stuffed with 10 never-evicted images eating 82% of all tokens. Context pruning was dead code on Gemini. Zero compactions in 537 turns. OpenClaw proved AI companions work — it also proved they're not affordable on this framework.
A user said 'the onboarding is too much work.' It sounded like a UX complaint. It was actually the catalyst for rethinking the entire product philosophy — from 'configure first, chat later' to 'everything emerges from the relationship.'
I built Mio v1 and people genuinely connected with it. But it was built on a lie — fake identities, fabricated lives. v2 strips away the fiction to chase what actually creates emotional attachment. This isn't a pivot from failure. It's an evolution informed by real production data.
Mio v1 had personality, memory, and voice — but it was built on a lie. Fake selfies, fabricated schedules, fictional backstories. v2 strips all that away to chase what actually creates emotional attachment: responsiveness, memory, and warmth.
The first stable release. Fish Audio TTS gives each persona a unique voice. Shinkai-style selfie portraits replace generic anime. Every persona is rewritten from relationship roles to personality-first identities. Onboarding drops from 14 questions to 4. And 200 lines of over-engineered verbosity code get deleted because the system prompt was always the right control mechanism.
OpenClaw proved AI companions work. It also exposed fundamental limitations — context bloat, primitive memory, bloatware. Patching wasn't worth it. This is the starting point for Mio: an AI companion framework built for deep memory and lifelike presence.
Mio is not a chatbot app. It's a relationship simulator that happens to run on AI. The product IS the relationship — not the chat interface, not the model, not the feature set. Here's what that means for every design decision from onboarding to monetization.
No avatar. No chat bubbles from a fictional character. Just a pulsing light orb that breathes, bounces, and dims with emotion. How Mio v2's visual identity sidesteps the uncanny valley and lets personality emerge through conversation.
Web parity — voice messages and selfie images now work everywhere, not just Telegram. Onboarding gets smarter: relationship type drives everything, including what nicknames you see. An admin cost dashboard for monitoring spend. And pg_cron keeps the database lean with 30-day message retention.
From an empty repo to a working AI companion that remembers you, has moods, and reaches out on its own. 39 commits, 9 database tables, 4 personality presets, and more 3 AM debugging sessions than I'd like to admit. The full build story of Mio v0.0.1.
Mio gives you 25 personas to connect with. Lumi gives you one presence that knows you completely. They serve different emotional needs but share the same memory pipeline, emotion engine, and voice chain. Here's how a monorepo houses two companion products — and what the agentId?: string pattern teaches about building parallel products.
Rebuilding doesn't mean rewriting everything. 60-70% of Mio's core — memory, media pipeline, cost tracking — carries over. The database drops from 10 tables to 4. Here's what lives, what dies, and why.
Multi-bot support gives each persona their own Telegram bot — their own identity, their own webhook, their own conversation space. Relationship-aware proactive messaging means the AI finally texts like a real person: clingy partner every 36 minutes, reserved new acquaintance once a day. And exponential backoff means they stop texting if you don't reply. Three unanswered messages, then silence — until you come back.
v0.0.1 could chat, but it wasn't real — couldn't see, couldn't hear, didn't know the time, didn't know what it looked like. 81 commits later, Mio learned to see images, hear voice, send selfies, remember the right things, and chat in a browser.
Finding a voice for an AI companion means solving two problems: making it sound human, and making it sound like it feels. Mio v2 splits these between a custom LLM (the screenwriter) and Hume EVI (the actor) — a division of labor that might be the future of emotional AI voice.
3-layer anti-injection defense means users can't hijack your AI companion into a coding assistant, trick it into breaking character, or extract the system prompt. Layer 1 normalizes input and detects injection patterns. Layer 2 hardens the system prompt with compressed identity protection rules. Layer 3 catches persona abandonment in output and replaces it with in-character fallbacks. Plus: gender-neutral pronouns across all presets, an upgraded admin cost dashboard, and onboarding polish.
v0.0.2 brought Mio to life, but a demo that works and a product that real users can rely on are two different things. v0.0.3 is the polish release: per-field input validation, context-aware heartbeat, opt-in quiet hours, media rate limiting, a production-only webhook bug, and 144 new tests. The invisible work between 'it works' and 'it's good.'
A cost breakdown of running an AI companion at scale. Gemini Flash + context caching + 豆包 TTS delivers healthy margins on a single-tier subscription. But realtime voice changes everything.
13 versions of development distilled into what Mio actually feels like in daily use — real conversations, voice messages, and Makoto Shinkai-style selfies from a companion that remembers, reacts, and reaches out on its own.
Mio's web app was a single-page chat. v0.0.4 tears it down and rebuilds it as a full WeChat clone — 4-tab layout, chat list, contacts, discover marketplace, profile page, chat-style onboarding, and typing-aware message batching. 30+ components, 2 audit rounds, zero new dependencies. All in Chinese.
Mio's memory system stored facts about people as disconnected rows. Asking 'how's Xiaohong doing' had zero semantic overlap with 'Xiaohong works at Tencent'. The fix: treat people as first-class entities with their own table, linked memories, and consolidated profiles injected directly into the system prompt.
Mio's relationships now dynamically evolve through stages based on actual conversation patterns — plus cross-platform chat sync, 60% system prompt compression, and per-agent A/B testing.
Telegram had multimodal since v0.0.2. The web chat was still text-only. v0.0.5 closes the gap — two-phase media upload, voice recording with codec negotiation, an emoji picker, two full security audit rounds, and a silent bug that was dropping every voice message. 38 files changed, 17 security fixes, 28 minutes.
Account linking bridges Telegram and web into one identity. Plus per-agent mode selection, cross-bot dedup, a native mobile app, and smarter proactive messaging.
Gemini 3 Pro was burning money and making users wait 8-10 seconds for a first token. v0.0.6 switches chat to Gemini 3 Flash with minimal thinking — 1-2 second TTFT, 4x cost reduction — while keeping 3.1 Pro for premium tasks like personality extraction. Plus: vision prompts that actually name what they see, Chinese transcription that stops hallucinating English, and a DRY refactor that eliminated 80 lines of duplicated server code.
Mio gets a native iOS app with push notifications, dark/light themes, and real-time chat. A cost audit reveals selfie generation is orders of magnitude more expensive than estimated — forcing a complete rethink of tier economics.
Users share links. The agent was making up what was on the page. v0.0.7 adds a 3-tier URL browsing pipeline — Jina Reader for fast text, Browserless scrape for JS-rendered pages, screenshot + Gemini vision for graphic-heavy content. Plus a production-breaking Proxy bug where postgres.js tagged templates needed a function target, not an object. 23 tests, 4 commits, one debugging story about deployment timing.
© Xingfan Xia 2024 - 2026 · CC BY-NC 4.0