← all repositories
a16z-infra/companion-app

An AI Companion Stack with Memory, Dissected

A tutorial stack that exposes how vector memory, LLM orchestration, and a phone number combine to create AI companions.

6k stars TypeScript Chat AssistantsRAG · Search
companion-app
Not currently ranked — collecting fresh signals.
star history

What it does

The project is a fully functional tutorial stack for building AI companions you can chat with in a browser or text via SMS. Each companion’s personality and backstory is defined in plain text files, and the app uses a vector database with similarity search to retrieve relevant context during conversations. It also maintains conversational memory by keeping recent exchanges in a queue and folding them into prompts. The stack supports both OpenAI models and Vicuna running on Replicate, and it includes Twilio integration so companions can receive actual text messages.

The interesting bit

What makes this more than a generic chatbot demo is its deliberate focus on the plumbing: it exposes how LangChain.js, vector stores like Pinecone or Supabase pgvector, and an Upstash-backed conversation queue combine to create the illusion of continuity and depth. The README is refreshingly honest that this is purely a learning exercise, even pointing readers toward Steamship or Character.ai for production-grade alternatives.

Key highlights

  • Supports both ChatGPT and Vicuna (via Replicate) out of the box
  • Vector similarity search over companion backstories for contextual depth
  • Conversational memory via a queued history system
  • SMS integration through Twilio, with phone number verification handled by Clerk
  • Optional Steamship agent support for voice and image generation

Caveats

  • The Vicuna-based companions suffer from cold-start latency; the README warns you’ll be waiting around a bit
  • Explicitly billed as a developer tutorial, not a production platform
  • Requires wiring together multiple third-party services (Clerk, Pinecone/Supabase, Upstash, Twilio, OpenAI/Replicate)

Verdict

Grab this if you’re a developer who wants to dissect how modern companion apps are architected before building something serious. Skip it if you need a production-ready platform; the authors themselves suggest looking elsewhere.

Frequently asked

What is a16z-infra/companion-app?
A tutorial stack that exposes how vector memory, LLM orchestration, and a phone number combine to create AI companions.
Is companion-app open source?
Yes — a16z-infra/companion-app is open source, released under the MIT license.
What language is companion-app written in?
a16z-infra/companion-app is primarily written in TypeScript.
How popular is companion-app?
a16z-infra/companion-app has 6k stars on GitHub.
Where can I find companion-app?
a16z-infra/companion-app is on GitHub at https://github.com/a16z-infra/companion-app.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.