---
title: Interactive Memory Demo
description: "Spin up the showcase companion app to see Deja Vu memories in action."
---


You can create a personalized AI Companion using Deja Vu. This guide will walk you through the necessary steps and provide the complete setup instructions to get you started.

<video
  autoPlay
  muted
  loop
  playsInline
  className="w-full aspect-video rounded-lg"
  src="https://github.com/user-attachments/assets/cebc4f8e-bdb9-4837-868d-13c5ab7bb433"
></video>

You can try the [Deja Vu Demo](https://dejavu-4vmi.vercel.app) live here.

## Overview

The Personalized AI Companion leverages Deja Vu to retain information across interactions, enabling a tailored learning experience. It creates memories for each user interaction and integrates with OpenAI's GPT models to provide detailed and context-aware responses to user queries.

## Setup

Before you begin, follow these steps to set up the demo application:

1. Clone the Deja Vu repository:
   ```bash
   git clone https://github.com/dejavu-memory/dejavu.git
   ```

2. Navigate to the demo application folder:
   ```bash
   cd dejavu/examples/dejavu-demo
   ```

3. Install dependencies:
   ```bash
   pnpm install
   ```

4. Set up environment variables by creating a `.env` file in the project root with the following content:
   ```bash
   OPENAI_API_KEY=your_openai_api_key
   VENICE_API_KEY=your_dejavu_api_key
   ```
   You can obtain your `VENICE_API_KEY` by signing up at <a href="https://app.dejavu.ai/dashboard/api-keys?utm_source=oss&utm_medium=cookbook-companions-quickstart" rel="nofollow">Deja Vu API Dashboard</a>.

5. Start the development server:
   ```bash
   pnpm run dev
   ```

## Enhancing the Next.js Application

Once the demo is running, you can customize and enhance the Next.js application by modifying the components in the `dejavu-demo` folder. Consider:
- Adding new memory features to improve contextual retention
- Customizing the UI to better suit your application needs
- Integrating additional APIs or third-party services to extend functionality

## Full Code

You can find the complete source code for this demo on GitHub:
[Deja Vu Demo GitHub](https://github.com/dejavu-memory/dejavu/tree/main/examples/dejavu-demo)

## Conclusion

This setup demonstrates how to build an AI Companion that maintains memory across interactions using Deja Vu. The system continuously adapts to user interactions, making future responses more relevant and personalized. Experiment with the application and enhance it further to suit your use case!

---

<CardGroup cols={2}>
  <Card title="Build a Deja Vu Companion" icon="users" href="/cookbooks/essentials/building-ai-companion">
    Deep dive into production patterns for fitness coaches, tutors, and assistants.
  </Card>
  <Card title="Node.js Companion with Deja Vu" icon="code" href="/cookbooks/companions/nodejs-companion">
    Implement a command-line companion using the Node.js SDK.
  </Card>
</CardGroup>
