Last updated

PaprChat - AI Chatbot with Memory

PaprChat Preview Github Repo

An open-source AI chatbot with memory capabilities powered by Papr and built on Next.js 14. This template demonstrates how to build powerful, context-aware chatbot applications that remember past conversations.

Features

Memory-Powered Chat

  • Long-term memory for personalized chat experiences powered by Papr
  • Automatic storage and retrieval of relevant conversations
  • RAG (Retrieval-Augmented Generation) capabilities
  • Semantic search across conversation history
  • Persistent memory storage in the cloud

Modern Tech Stack

  • Built with Next.js 14 App Router
  • AI SDK for unified LLM interactions
  • Beautiful UI with shadcn/ui and Tailwind CSS
  • Component primitives from Radix UI

Production Ready

  • Neon Serverless Postgres for chat history
  • Vercel Blob for file storage
  • Auth.js for authentication
  • Easy deployment to Vercel

About PaprChat

PaprChat is maintained by Papr and builds upon Vercel's V0 chatbot. We've enhanced the original template with our memory SDK to create chatbots that can maintain context across conversations and provide truly personalized experiences.

The key enhancement is the integration of Papr's Memory SDK, which allows your chatbot to:

  • Remember past conversations and user preferences
  • Retrieve relevant context automatically
  • Build a knowledge base from chat interactions
  • Provide more consistent and personalized responses

Model Providers

PaprChat ships with xAI grok-2-1212 as the default chat model, but supports multiple providers through the AI SDK. You can easily switch to:

  • OpenAI
  • Anthropic
  • Cohere
  • And many more

Deploy Your Own

You can deploy PaprChat to Vercel with one click. Here's what you'll need:

  1. A Papr account for the memory features
  2. A database (we'll set up Neon automatically)
  3. An AI provider API key (xAI, OpenAI, Anthropic, etc.)

Deploy with Vercel

What Happens When You Deploy

  1. Your GitHub repository will be cloned
  2. Vercel will create a new project and deploy it
  3. A Neon PostgreSQL database will be automatically provisioned
  4. Vercel Blob Storage will be set up for file uploads
  5. You'll be prompted to add the required environment variables:
    • PAPR_MEMORY_API_KEY: Get this from Papr Dashboard
    • AUTH_SECRET: A random string for authentication (we'll generate one for you)
    • OPENAI_API_KEY: Your OpenAI API key (or another provider's key)

After Deployment

  1. Your app will be live at your-project.vercel.app
  2. Set up authentication in the Vercel dashboard
  3. Configure your AI provider settings in config/ai.ts
  4. Optionally customize the chat interface in components/

Running Locally

Prerequisites

  1. Get your Papr API key:

    • Sign up at app.papr.ai
    • Go to Settings → API Keys
    • Create a new API key
  2. Set up your environment variables in .env.local:

# Authentication (required)
AUTH_SECRET=your_auth_secret_key

# Database (required)
POSTGRES_URL=your_neon_postgres_url

# File Storage (required)
BLOB_READ_WRITE_TOKEN=your_vercel_blob_token

# Papr Memory (required)
PAPR_MEMORY_API_KEY=your_papr_memory_api_key

# AI Provider (one is required)
XAI_API_KEY=your_xai_api_key
# OR
OPENAI_API_KEY=your_openai_api_key
# OR another provider

Installation

  1. Clone the repository:
git clone https://github.com/papr-ai/PaprChat.git
cd PaprChat
  1. Install dependencies:
pnpm install
  1. Run the development server:
pnpm dev

Visit localhost:3000 to see your chatbot in action.

Learn More

License

PaprChat is open-source software licensed under the MIT license.

Support