PaprChat - AI Chatbot with Memory
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:
- A Papr account for the memory features
- A database (we'll set up Neon automatically)
- An AI provider API key (xAI, OpenAI, Anthropic, etc.)
What Happens When You Deploy
- Your GitHub repository will be cloned
- Vercel will create a new project and deploy it
- A Neon PostgreSQL database will be automatically provisioned
- Vercel Blob Storage will be set up for file uploads
- You'll be prompted to add the required environment variables:
PAPR_MEMORY_API_KEY
: Get this from Papr DashboardAUTH_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
- Your app will be live at
your-project.vercel.app
- Set up authentication in the Vercel dashboard
- Configure your AI provider settings in
config/ai.ts
- Optionally customize the chat interface in
components/
Running Locally
Prerequisites
Get your Papr API key:
- Sign up at app.papr.ai
- Go to Settings → API Keys
- Create a new API key
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
- Clone the repository:
git clone https://github.com/papr-ai/PaprChat.git
cd PaprChat
- Install dependencies:
pnpm install
- 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
- Documentation: Githuib
- Discord: Join our community
- Issues: GitHub Issues