Skip to content

letta-ai/characterai-memory

Repository files navigation

CharacterPlus: Character AI with Memory Using Letta

CharacterPlus screenshot

Overview

CharacterPlus is a Character AI–style web application that enables conversations with fully-fledged stateful agents powered by Letta.

Key Features

  • Persistent Memory: Each character maintains long-term memory across conversations
  • Shared User Profile: Characters share knowledge about you through a common memory block
  • Tool-Calling Capabilities: Agents can perform actions beyond just chatting
  • REST API Integration: Built-in endpoints compatible with Python and TypeScript/Node.js SDKs

Built during the "Stateful Agents Vibecoding" meetup using Vercel v0.

How It Works

1. Connect to Your Letta Server

Click the ⚙️ Settings icon and enter your Letta Cloud API key.

Using Self-Hosted Letta?

  • Replace api.letta.com in the source code with your server's IP address
  • Use your server password as the API key (or a dummy value if not password-protected)

2. Customize Your Profile

Click the 👤 Profile icon to edit your human memory block. This shared memory block contains information about you that all characters can access.

Profile Editor

How Memory Works:

  • Shared Memory: When one character learns something about you, all characters receive that information
  • Private Memory: Each character has their own persona and individual memories
  • Character Personas: Pre-defined in /lib/characters.json

3. Chat with Characters

Chat Interface

Character States:

  • Active: Agent exists and will resume previous conversations
  • New: Agent will be created on first interaction

Actions:

  • Chat Now: Start or resume a conversation
  • 🔁 Reset: Delete the character's memory and start fresh

4. Manage Characters in the ADE

View and manage your characters in the Letta Agent Development Environment:

Letta ADE

Characters created by the app are prefixed with character_*.

Quick Start

Option 1: Deploy on Vercel

  1. Visit the v0 project link
  2. Click "Deploy" to create your own live version
  3. Share with friends or preview in the v0 window

Option 2: Run Locally

Prerequisites:

  • Node.js 18.17 or later
  • A package manager (npm, yarn, or pnpm)
# Clone the repository
git clone https://github.com/letta-ai/characterai-memory.git
cd characterai-memory

# Install dependencies
npm install         # or yarn / pnpm install

# Set up environment variables
# Create a .env.local file with your Letta API key
echo "LETTA_API_KEY=sk-ltta-..." > .env.local

# Start the development server
npm run dev         # or yarn dev / pnpm dev

# Open http://localhost:3000 in your browser

Note: v0 projects use Next.js 14+ with the App Router by default. If you encounter any issues, ensure your Node.js version meets the requirements.

Production Considerations

Authentication (Required for Production)

The current demo uses your personal Letta Cloud API key, which isn't suitable for multi-user applications. For production deployment, implement user authentication using Letta's identity system:

  • Each end-user should have a unique identity
  • Agents are associated with user identities, not your developer account
  • Modify agent creation and listing API calls to include identity parameters

📚 Learn more about multi-user support in Letta.

Contributing

We welcome contributions! Feel free to:

  • Improve the UI/UX
  • Enhance memory management features
  • Add new demo characters
  • Fix bugs or improve documentation

Join the Community: Chat with the Letta team and other developers on Discord.

License

[Add your license information here]


Built with ❤️ using Letta and Vercel v0

About

Example CharacterAI-style web app that runs on Letta to create characters with memory.

Resources

License

Stars

Watchers

Forks