AI-powered digital avatars — preserve memories of loved ones, completely offline.
Create a digital presence of your loved ones using local AI. Voice cloning, smart memory, and personality modeling — all running on your own machine, no cloud required.
When someone you love passes away, their voice, their stories, and the little things that made them who they are — that's what you miss most. Memorial AI lets you preserve those memories in a way that feels personal and real.
Upload a few audio clips, share some memories, and Memorial AI creates a digital presence that can:
- Speak in their voice — cloned from your recordings
- Remember your shared stories — automatically extracted from conversations
- Respond with their personality — built from just a name and a few keywords
- Grow over time — learns more about them the more you talk
It's not about replacing anyone. It's about keeping their memory close.
Important
100% Local-First. Memorial AI runs entirely on your machine by default. No cloud services, no API keys, no data leaves your device. You own everything.
- Character Card — Structured personality profile generated from just a name and a few keywords
- Smart Memory — Semantic memory extraction with local embeddings. Automatically discovers and organizes important memories
- Voice Cloning — Clone your loved one's voice from audio recordings
- Emotion Awareness — Real-time conversation emotion analysis
- Style Learning — Paste real chat history and the AI learns their unique expression habits
- Conversation Summaries — Auto-generated for context compression
- Personality Evolution — The character card evolves over time as new stories emerge
- Proactive Messages — The avatar can initiate topics — birthday memories, emotional check-ins
- Avatar Sharing — Share public avatar cards with family and friends
- No Auth Required — Start using immediately, no login needed
- Ollama LLM — Run any model locally (Qwen2.5, Llama3, Mistral, etc.)
- Local Embeddings — @xenova/transformers, zero external dependencies
- Edge-TTS — Free Microsoft neural voices, no API key
- SQLite Storage — All data on your machine, portable database file
- Optional Cloud Mode — Switch to API keys anytime for higher quality
Local Mode (default):
Frontend: Next.js 16 + Tailwind CSS 4
LLM: Ollama (qwen2.5, llama3, mistral, etc.)
TTS: Edge-TTS (Microsoft neural voices)
Embedding: @xenova/transformers (all-MiniLM-L6-v2)
Database: SQLite (better-sqlite3)
Auth: None (local-first)
Cloud Mode (optional):
LLM: Anthropic Claude
TTS: ElevenLabs
Embedding: OpenAI text-embedding-3-small
Database: Supabase PostgreSQL
Auth: Supabase Auth
| Component | Description |
|---|---|
src/lib/db.ts |
SQLite database layer — all CRUD operations |
src/lib/providers/ollama.ts |
Ollama LLM provider with streaming |
src/lib/providers/local-embedding.ts |
Local vector embeddings |
src/lib/providers/edge-tts.ts |
Edge-TTS text-to-speech |
src/lib/providers/config.ts |
Provider mode configuration |
src/lib/claude.ts |
Cloud LLM fallback (Anthropic) |
src/app/api/chat/route.ts |
SSE streaming chat API |
src/app/settings/page.tsx |
Settings UI for mode switching |
Prerequisites:
- Node.js 18+
- Ollama installed and running
Steps:
# 1. Clone and install
git clone https://github.com/logi-cmd/memorial-ai.git
cd memorial-ai
npm install
# 2. Start Ollama and pull a model
ollama pull qwen2.5:7b
# 3. Run the app
npm run devOpen http://localhost:3000. No API keys needed!
Default local config:
- LLM:
qwen2.5:7bviahttp://localhost:11434 - Embedding: Local
all-MiniLM-L6-v2 - TTS: Edge-TTS (free)
- Database:
~/.memorial-ai/memorial-ai.db
# 1. Clone and install
git clone https://github.com/logi-cmd/memorial-ai.git
cd memorial-ai
npm install
# 2. Configure environment
cp .env.example .env
# 3. Set mode to cloud
APP_MODE=cloud
# 4. Fill in API keys
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
ELEVENLABS_API_KEY=...
# 5. Run
npm run dev# Build
docker build -t memorial-ai .
# Run
docker run -p 3000:3000 --env-file .env memorial-ai| Variable | Default | Description |
|---|---|---|
APP_MODE |
local |
Run mode: local or cloud |
OLLAMA_BASE_URL |
http://localhost:11434 |
Ollama API URL |
OLLAMA_MODEL |
qwen2.5:7b |
Ollama model name |
| Variable | Required | Description |
|---|---|---|
APP_MODE |
No | Set to cloud to enable |
ANTHROPIC_API_KEY |
For LLM | Anthropic Claude API key |
OPENAI_API_KEY |
For embeddings | OpenAI API key |
ELEVENLABS_API_KEY |
For TTS | ElevenLabs API key |
NEXT_PUBLIC_SUPABASE_URL |
For DB | Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
For DB | Supabase anon key |
- Next.js 16 — App Router, Streaming, Server Components
- Tailwind CSS 4 — Utility-first styling
- Ollama — Local LLM inference
- better-sqlite3 — Local database
- @xenova/transformers — Local embeddings
- node-edge-tts — Free TTS
- Anthropic Claude — Cloud LLM fallback
- OpenAI — Cloud embedding fallback
- next-intl — Internationalization (zh/en)
- Vitest — Unit testing (99 tests)
- Enter their name, relationship to you, and a few personality keywords
- Optionally upload audio clips for voice cloning
- Answer a personality questionnaire (10 questions across 5 categories)
- Memorial AI generates a structured Character Card that defines their personality
- The AI retrieves relevant memories from past conversations (local vector search)
- The character card is injected as the system prompt for consistent personality
- As you talk, new memories are automatically extracted and stored
- Conversation summaries are generated for context compression
- Real-time emotion analysis adjusts the voice output
The character card isn't static. Over time, as new stories and details emerge from conversations, the personality profile evolves — adding new traits, updating speech patterns, and deepening the relationship model.
Contributions are welcome. Please read the CONTRIBUTING.md guide before submitting a pull request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the AGPL-3.0-or-later License.
Built with care. In memory of those we love.


