companion-app  by a16z-infra

AI companion stack for personalized chatbots

created 2 years ago
5,865 stars

Top 8.9% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a lightweight stack for creating and hosting AI companions with memory, targeting developers interested in building chatbots. It enables users to define companion personalities and backstories, leveraging a vector database for enhanced conversational depth and memory.

How It Works

The stack utilizes Next.js for app logic, Clerk for authentication, and Langchain.js for LLM orchestration. It supports OpenAI and Vicuna models, with Pinecone or Supabase pgvector for vector storage. Conversation history is managed via Upstash, and Twilio is integrated for SMS interaction. Character data, including preamble, seed chat, and backstory, is stored in .txt files and embedded for retrieval.

Quick Start & Requirements

  • Install: npm install
  • Secrets: Requires Clerk, OpenAI or Replicate, Pinecone or Supabase, and Upstash API keys.
  • Embeddings: npm run generate-embeddings-pinecone or npm run generate-embeddings-supabase
  • Run: npm run dev
  • Demo: AI Stack Devs Discord
  • Docs: Langchain.js Integrations

Highlighted Details

  • Supports both OpenAI (faster) and Vicuna (less censored, dynamic) LLMs.
  • Integrates Twilio for SMS-based companion interaction.
  • Offers an export option to Character.ai for companion migration.
  • Includes a Python implementation for command-line interaction.

Maintenance & Community

  • Community support available via Discord: AI Stack Devs.
  • Project is a tutorial stack, with pointers to production platforms like Steamship and Character.ai.

Licensing & Compatibility

  • The repository does not explicitly state a license in the provided README.

Limitations & Caveats

The UI currently loses chat history, Vicuna models have a cold start delay, and error reporting is minimal, especially in deployed environments. Upstash message history requires manual clearing.

Health Check
Last commit

1 year ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
48 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.