Building AI Characters With the a16z Companion App

Matthew Berman walks through a 2023 starter project for conversational characters, from service configuration and embeddings to editing a companion’s personality.

MBMatthew Bermanホスト · Forward Future
チャンネル
Matthew Berman
公開日
2023年7月14日
動画
9:55
読了時間
3 分
スライド
6
原文
英語
YouTube で開く
スクロールすると動画は右下に小さくなって再生を続けます。字幕は閲覧言語に合わせて切り替わります。
閲覧言語2 言語で読めます
この記事はまだ日本語に翻訳されていないため、英語の原文を表示しています。
要約

30 秒でわかる

Matthew Berman demonstrates the a16z Companion App, a tutorial project that combines character descriptions, language models, vector search and conversation storage. He configures a local web app using hosted services and shows where to edit character files. The video was published in July 2023; interfaces, models and pricing may have changed. Berman demonstrates browser chat but says his Twilio text-message integration returned a 401 error. The project repository describes the stack as a developer tutorial, rather than a finished production platform.

  1. 1Characters with configurable backgroundsThe project provides example characters and lets developers change personality, backstory and model selection. The repository positions it as a tutorial starter stack.
  2. 2A multi-service stackThe demonstrated Next.js app uses external services for authentication, language models, vector search and conversation storage, with optional deployment and SMS integrations.
  3. 3Configure credentialsBerman copies the example environment file and fills in the settings for his chosen providers. He uses Clerk, OpenAI, Pinecone and Upstash in this walkthrough.
  4. 4Generate embeddingsA repository command loads embeddings based on companion descriptions into the selected vector database, after which Berman starts the development server.
  5. 5Edit the companionsPersonality text lives in character files; companion metadata including model and optional phone number lives in companions.json. Berman reports that his Twilio test failed with a 401.

ポイント

  1. The starter project defines companion personalities and uses vector search and a conversation queue to supply context.
  2. Running the web app locally in the demonstration still relies on hosted authentication, model and database services.
  3. The 2023 setup uses Clerk, OpenAI or Replicate, Pinecone or Supabase, and Upstash for different parts of the stack.
  4. Character descriptions and companion metadata are edited in separate files.
  5. The video does not demonstrate successful SMS: Berman reports a Twilio 401 error.
全文

チャプターごとに整えた全文を読む

文字起こしのみ
01

The companion app and its stack

Berman demonstrates a conversation with a sample character and introduces the services used by the project. The original walkthrough dates to 2023.

I want to show you how to put together the [a16z Companion App](https://github.com/a16z-infra/companion-app), a starter project for characters you can chat with. You can give a character a personality and backstory and store conversation history. The repository describes it as a developer tutorial; the interfaces and integrations in this walkthrough reflect July 2023.

The sample app comes with several companions using hosted ChatGPT and Vicuna models. I was told a fully local version, including the databases, was on the authors’ roadmap, but that is a plan rather than something demonstrated here. I chat briefly with Alex, whose responses refer to painting and science-fiction books.

To get started, clone the project repository and change into its directory. The app combines several services: Next.js for the application, Clerk for authentication, Pinecone or Supabase for vector storage, LangChain for model orchestration, OpenAI or Replicate for text generation, and Upstash for conversation history. Fly and Twilio are listed for deployment and SMS, with some integrations optional.

Companion App service stack
スライド 1 / 6Companion App service stackThe project README lists the components used for authentication, models, storage and optional SMS.
02

Configure the services

He installs dependencies, prepares the environment file and configures authentication, model access, vector storage and conversation history. He uses hosted providers even though the application itself runs locally.

Example environment configuration
スライド 2 / 6Example environment configurationThe example file shows the provider selection and credential fields before configuration.

After cloning, run `npm install` and open the folder in your editor. Rename or copy `.env.local.example` to `.env.local` and fill in the settings for the services you choose. I use Pinecone in this walkthrough; the example also offers Supabase, which I note can be hosted locally.

For authentication, create a Clerk application and choose sign-in methods. I select email and Google, then copy the publishable and secret keys into their corresponding environment variables, leaving the shown sign-in and sign-up paths as they are. These setup screens and options may look different now.

Next, add an OpenAI API key to the environment file. I use OpenAI here; the project also supports Vicuna 13B hosted on Replicate, which requires a Replicate token. The demonstration runs the web server locally, but these model calls and other selected services remain hosted.

Create a Pinecone index and supply its name, environment and API key in the environment file. The project’s setup specifies 1,536 dimensions for its example embeddings. The starter-plan details shown are historical; if using Supabase instead, configure that provider according to the project instructions.

For conversation storage, create an Upstash Redis database, select regions and the shown SSL and eviction settings, then copy its REST URL and token into the environment file. The video shows a hosted Redis service; using it does not make this a fully local stack.

03

Run and customize characters

He generates embeddings, launches the app and edits character definitions. His attempted Twilio integration does not work in the demonstration.

Generating embeddings and starting the app
スライド 3 / 6Generating embeddings and starting the appThe README shows separate commands for the two vector databases and the local development server.

The repository provides separate commands to generate embeddings for Pinecone and Supabase. I run the Pinecone command, which loads embeddings from the character information into the vector store, then start the development server with `npm run dev`. I open the local address in a browser and sign in through Clerk.

Example companion characters
スライド 4 / 6Example companion charactersThe app presents characters using different hosted model options.

The local app displays Alex and Sebastian using ChatGPT, and Rosie and Lucky using Vicuna 13B. I say conversation history is stored even though the interface does not display all of it at this point. The repository explains that a conversation queue and retrieved character information provide context; storage should not be confused with unlimited model memory.

A character personality file
スライド 5 / 6A character personality fileAlex’s text file contains character instructions and sample conversation material.

To change a personality, open its text file under `companions`. Alex’s file describes a fictional character who enjoys painting, programming and science fiction. You can edit that description or create a new personality, then update `companions.json` with metadata such as the image, model and optional phone number.

Companion metadata
スライド 6 / 6Companion metadataThe JSON file specifies each character’s name, description, image, model and optional phone number.

The project includes a Twilio integration for texting a character, but I could not get it working: my attempts returned a 401 error. I plan to keep investigating and add an update if I solve it. The browser-based companion is the part I successfully demonstrate here.

同じチャンネルの記事

スライド 12 枚34:21EN
Matthew Berman· 2026年10月27日Matthew Berman Examines Anthropic’s IPO Filing, AI Growth and GovernanceMatthew Berman, Sam Altman · Forward FutureThe presenter reviews the S-1’s financial metrics, compute strategy and voting structure while questioning the tension between rapid AI development and safety.AnthropicAI Safetyエンタープライズ AI+2
スライド 6 枚25:50EN
Matthew Berman· 2026年10月24日Kimi K3.1 Pro Tested: Strong 3D Demos, Uneven Results and Competitive PricingMatthew Berman · Forward FutureMatthew Berman tests the open-weight model on coding, 3D rendering and visual explanations, then compares benchmark results and prices.Open-weight modelsBenchmarksAI cost & performance+1
スライド 2 枚32:20EN
Matthew Berman· 2026年10月23日Who Is Local AI For? The Costs, Trade-offs and a Hybrid FutureMatthew Berman · Forward FutureMatthew Berman weighs data control and independence against hardware cost, setup complexity and inference speed.Local inferenceOpen-weight modelsAI cost & performance+1
スライド 6 枚1:03:37EN
Matthew Berman· 2026年10月23日Matthew Berman’s Team Tests Kimi K3.1 on Animation, Games, and ChartsMatthew Berman, Alex, Brian · Forward FutureA live team AMA turns into an informal test of Kimi K3.1, from personal-agent workflows to motion graphics, a browser game, and a benchmark chart.コーディングエージェントGenerative media評価(Evals)+2
0:53EN
Matthew Berman· 2026年10月22日Sam Altman on AI and the Discovery of New KnowledgeSam Altman · OpenAIAltman expects progress in mathematical discovery to extend to biology, materials and energy.AI for scienceMathematicsComputational Biology+1
スライド0:22EN
Matthew Berman· 2026年10月21日A Robot Bodyguard Video Shows Dramatic Rescue ScenariosMatthew Berman · Forward FutureMatthew Berman reacts to a short robot demonstration depicting fighting and vehicle-rescue scenarios.Robotics評価(Evals)