Inspiration

Everyone has stared at a text that says "fine. whatever you want." and spiraled. Is that a shutdown? A test? Are you overthinking it? The hardest part of modern relationships isn't talking. It's reading what people actually mean, and remembering how each person tends to act over time.

We wanted an AI that does what a perceptive, brutally honest friend does. It reads the subtext, calls you out when you're the one catastrophizing, hands you something you can actually send, and remembers the relationship so the next read gets sharper.

What it does

Miku reads between the lines. Paste a conversation, forward a text, or send a screenshot, and Miku gives you four things:

  • Vibe read. What they're actually communicating beneath the surface, tied to their exact words, punctuation, and timing.
  • Reality check. It separates what's literally on the screen from the story you're adding on top. It tells you when you're spiraling over nothing, and when you're ignoring a real red flag.
  • Reply options. Two or three replies in genuinely different tones, written in your voice, ready to copy and send.
  • Verdict. One punchy, screenshot-worthy line.

Miku also builds memory for each relationship. It learns a person's recurring patterns, like "third time they've gone quiet after money came up," and adjusts how confident it is based on that history.

Miku runs in two places from one engine: a web relationship library and a live Telegram bot (@miku66_bot). The bot won't fake it. When context is thin, it asks a clarifying question instead of guessing, and it replies one message at a time, like a friend texting back.

How we built it

  • Frontend and app. Next.js (App Router), React, and TypeScript, deployed on Vercel.
  • AI engine. Anthropic Claude. We used Opus 4.8 and Sonnet 4.6 for the analysis and Haiku 4.5 for fast screenshot OCR and transcript extraction. We used Claude's structured outputs (output_config.format with a JSON schema) plus adaptive extended thinking, so we get valid JSON and real reasoning at the same time. We also cached the system prompt to keep latency and cost down.
  • Backend. Next.js API routes for analysis, import (text and image OCR), profiles, archive, pattern detection, and the relationship library, all backed by Supabase (Postgres) with SQL migrations.
  • Telegram channel. A webhook at /api/telegram over the Telegram Bot API that reuses the same analysis brain as the web, wrapped with a clarify gate, lightweight conversational threading, and paced message delivery.

The main architectural bet was keeping the analysis engine platform-agnostic. The same core powers the web library and the Telegram bot, so adding a new surface is mostly just a new thin frontend.

Challenges we ran into

  • Structured output drift broke Chinese inputs. Our first approach used forced tool calls, which sometimes returned a string where the schema wanted an array. That returned a 400 and killed the whole analysis, especially on Chinese text. Switching to output_config.format enforced the shape at the sampler and fixed it, and it let us keep extended thinking.
  • Confident but wrong reads. The bot would happily over-analyze a forwarded screenshot of an app, or a one-word "k." We added a clarify gate. The model decides whether it actually has enough context, and if it doesn't, it asks one specific question instead of making something up.
  • Wall of text versus a real conversation. Dumping the full analysis at once felt robotic. We rebuilt the delivery so it sends short messages one at a time with typing indicators.
  • State on serverless. Feeding the answer to a clarifying question back into the original message is tricky when functions don't hold state. We built lightweight per-chat memory that rides on warm instances.
  • A classic time sink was a Zod v4 import issue with Anthropic's structured-output helpers.

Accomplishments that we're proud of

  • One platform-agnostic engine that shipped to two live frontends, web and Telegram, during the hackathon.
  • An analysis that is specific and honest. It names the subtext plainly and calls out your own overthinking, with no therapy-speak.
  • Memory for each relationship that makes the reads better over time instead of being one-shot vibe checks.
  • Full bilingual support for English and Chinese, detected automatically.
  • A bot that knows what it doesn't know and asks. That felt like the line between a gimmick and something you'd actually trust.

What we learned

  • Structure and reasoning are not a trade-off. With the right API features you can force valid JSON and still let the model think.
  • Knowing when to ask is a feature, not a fallback. A model that admits uncertainty earns a lot more trust than one that always answers.
  • Delivery is part of the product. The same analysis felt completely different as a wall of text versus a friend sending one line at a time.
  • Designing the engine to be channel-independent from the start made the second platform almost free.

What's next for Miku

  • Bring relationship memory to the bot, with per-contact profiles and pattern history in durable storage.
  • Add more surfaces. Anywhere there's an open messaging API, like Discord or WhatsApp Business, the engine drops right in.
  • Proactive nudges that surface patterns before you ask, like "heads up, this is the pattern you flagged last month."
  • Better screenshot understanding for multi-image threads and group chats.

Built With

  • claude
  • supabase
  • vercel
Share this project:

Updates