Skip to content

EverMind-AI/evermem_got_demo

Repository files navigation

EverMem Story Memory Demo

Built on EverMemOS - Open-source AI memory infrastructure

A demonstration web application showcasing EverMem's AI memory infrastructure through an interactive Q&A experience with "A Game of Thrones" (Book 1).

Ask questions about the book and watch two AI responses stream side-by-side: one with memory using EverMem to retrieve relevant passages, and one without memory using only the LLM's training data. See the difference memory makes.

Demo Screenshot

Features

  • Side-by-Side Comparison: Watch two responses stream simultaneously - with and without memory context
  • Memory-Grounded Responses: See exactly which book passages are used to answer questions
  • Real-time Streaming: Token-by-token AI response streaming via SSE
  • Interactive Memory Chips: Hover over memory chips to see full excerpt details and metadata
  • Follow-up Suggestions: AI-generated follow-up questions after each response
  • Dark Theme UI: Modern, clean interface inspired by EverMind's design

Tech Stack

  • Frontend: React 18 + TypeScript + Vite
  • Backend: Node.js + Express + Bun
  • AI: Claude Haiku (via OpenRouter)
  • Memory: EverMind Cloud API

Quick Start

Prerequisites

  • Bun (latest version)
  • OpenAI API key (or OpenRouter API key)
  • EverMind Cloud API key (apply at EverMemOS Cloud)

Installation

# Clone the repository
git clone <repository-url>
cd evermem-story-demo

# Install dependencies
bun install

Configuration

Backend (backend/.env):

cp backend/.env.example backend/.env

Edit backend/.env:

OPENAI_API_KEY=your-openrouter-api-key
OPENAI_MODEL=anthropic/claude-3-haiku
PORT=3001
FRONTEND_URL=http://localhost:3000

# EverMind Cloud
USE_EVERMEMOS=true
EVERMEMOS_URL=https://api.evermind.ai
EVERMEMOS_API_KEY=your-evermind-api-key

Frontend (frontend/.env):

cp frontend/.env.example frontend/.env

The default VITE_API_URL=http://localhost:3001 should work for local development.

Running

# Start both frontend and backend
bun run dev

Loading Novel Content

Before using the demo, you need to load novel content into EverMind Cloud.

Quick Test with Sample

A sample file with 5 chapters is included for testing:

bun run load-novel-cloud \
  --file sample/got-sample.txt \
  --book-title "A Game of Thrones" \
  --book-abbrev "got" \
  --api-key YOUR_EVERMIND_API_KEY

Full Book

For the complete experience, obtain the full novel text file and load it:

bun run load-novel-cloud \
  --file path/to/got.txt \
  --book-title "A Game of Thrones" \
  --book-abbrev "got" \
  --api-key YOUR_EVERMIND_API_KEY

The script:

  • Detects chapter boundaries automatically (PROLOGUE, character names in caps)
  • Splits text into paragraphs
  • Uploads to EverMind Cloud with metadata
  • Supports resumption if interrupted

Project Structure

├── frontend/                # React frontend
│   ├── src/
│   │   ├── components/     # UI components
│   │   ├── hooks/          # Custom React hooks
│   │   ├── services/       # API client
│   │   └── types/          # TypeScript types
│   └── public/             # Static assets
├── backend/                 # Express backend
│   ├── src/
│   │   ├── routes/         # API endpoints
│   │   ├── services/       # Business logic
│   │   └── utils/          # Utilities
├── scripts/                 # CLI tools
│   ├── load-novel-cloud.ts # Load novel to EverMind
│   └── clear-memories-cloud.ts
└── sample/                  # Sample data for testing
    └── got-sample.txt      # 5 chapters from Book 1

Development

# Start dev servers
bun run dev

# Frontend only
bun run dev:frontend

# Backend only
bun run dev:backend

# Type check
bun run type-check

# Lint
bun run lint

License

MIT

Acknowledgments

  • EverMind for the memory infrastructure
  • George R.R. Martin for "A Song of Ice and Fire"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages