Inspiration
You're in a group chat. Someone asks a question nobody can answer. One person says "wait, let me ask AI," disappears into another app, and comes back with a screenshot. The group reads it secondhand, nobody can follow up, and the conversation has already moved on.
AI has made each of us individually smarter, but it's made group conversations worse: every question becomes a solo side quest. We wanted the opposite. What if the AI was just in the chat?
What it does
AImigos is a real-time group chat where your friends and your AI companions share one conversation.
Picture a group chat planning a trip to San Diego. Someone types @Zorad how much does an average rental car cost per day in San Diego? Zorad gives a typical daily range and works out what that comes to split four ways. Everyone sees it. Someone asks whether rideshares would be cheaper since they're mostly hitting beaches. Someone else says "dig deeper," and Zorad comes back with a fuller cost comparison from a stronger model. Nobody left the chat.
- Invite anyone with a link or QR code. Join with just a nickname.
- Zorad, the built-in companion, lives in every chat but only speaks when tagged. Humans lead; AI assists.
- Companion Studio: build your own companion with a name, personality, specialty, and skills: a code buddy that reviews pasted code, a patient tutor, a creative partner, a planner, or something entirely yours. Start from six templates or a blank slate.
- Your library, your rules: add a companion to multiple groups (each keeps its own context), chat with up to five privately, and decide whether others can customize it or copy it as a template.
- Smart routing: simple questions go to a lightweight model, hard ones to stronger tiers, and "dig deeper" escalates automatically.
##How we built it
Next.js 16 + React 19 + TypeScript** on the front, Supabase (Postgres, Realtime, anonymous auth) on the back, Google Gemini for every reply, and Docker + Caddy for HTTPS deployment on Vultr. Built in about 12 hours across 23 commits.
The core is a routing layer that answers three questions for every message:
- Should AI respond at all? Only on an
@mention, direct address, or a quick follow-up to your own recent AI exchange. Everything else stays human. - How hard is this? A rules-based classifier sorts requests into low, medium, and high complexity.
- Which model? The cheapest Gemini tier that fits, with a fallback if a model is unavailable.
Every request is logged with its model, latency, and estimated cost:
$$C = \frac{t_{in} \cdot p_{in} + t_{out} \cdot p_{out}}{10^6}$$
compared against running the same tokens on the top-tier model to estimate savings.
Security lives in the database: row-level security, permission-checked Postgres functions, invite tokens separate from room IDs, and per-user and per-room rate limits. Tests run the real migrations against an embedded Postgres instance.
Challenges we ran into
Teaching AI to stay quiet. Generating replies was easy. Knowing when not to was the real problem. An AI that answers everything kills a group chat. Most of our routing logic exists to say "this one's for the humans," including leaving a name alone when a real person in the room shares it.
One question, one answer, one charge. Realtime reconnects and refreshes can fire the same request twice. We added request IDs and a database compare-and-set so exactly one worker claims each AI reply, and we deliberately skip auto-retries on timeouts, since the provider may have already billed us.
Not lying with numbers. A huge "savings" figure demos well. We chose to treat missing usage data as unknown, not zero, and hide the savings total when it can't be computed honestly.
Killing our darlings. Our plan included web search, image understanding, group memory, and generated avatars. Around 4 AM we cut them all and swapped three hardcoded AI friends for one default companion plus a studio to build your own. It was the best call we made: the magic was never our characters. It was letting every group build its own.
What we learned
- In social AI, restraint is the feature.
- Pushing permissions and idempotency into Postgres made us faster under pressure, not slower.
- Three things that work beat ten things that almost work.
What's next
Coming back to a group should feel like you never left.** Our next headline feature is catch-up summaries with shared tasks: return to a busy chat and a companion tells you what the group decided, what's still open, and what's on your plate. With the group's confirmation, discussions turn into checklists, assignments, or quick polls, so plans don't die in the scroll.
Foundations for real use
- Streaming, non-blocking replies so the conversation keeps flowing while a companion thinks.
- Permanent accounts that link your anonymous session to email or Google, keeping your companions and groups across devices.
- Unread counts and mention notifications**, including a ping when a companion finishes answering.
Smarter companions
- Web research with citations, so companions can answer current questions with linked sources.
- Controlled group memory: members explicitly save preferences, project details, and decisions, and can inspect, edit, or forget them anytime.
- Images and documents the whole group can discuss together: a screenshot of a bug, a whiteboard photo, a reading assignment.
Later
- Companion discovery: publish your companion as an opt-in template others can browse, preview, and copy.
- Voice messages and spoken companion replies.
Built With
- css
- docker
- gemini
- git
- github
- javascript
- next.js
- node.js
- postgresql
- react
- supabase
- typescript
- vultr

Log in or sign up for Devpost to join the conversation.