All your AI conversations in one place — import, search, and chat with your knowledge base.
Features · Quick Start · Deploy · Architecture · Contributing
You chat with AI every day — ChatGPT, Claude, Gemini, MiMo. Your conversations contain valuable knowledge: code solutions, project decisions, research insights. But they're trapped in silos.
AIVault liberates your AI data:
- 📥 Import conversations from any AI platform
- 🔍 Search across everything with semantic vector search
- 💬 Chat with your knowledge base using any LLM
- 🤖 Collect Claude Code sessions automatically
- 🔌 Integrate with any AI agent via MCP protocol
|
Upload ChatGPT JSON exports, Claude conversations, Claude Code terminal sessions. Auto-detect format, batch import. Powered by pgvector embeddings. Ask natural language questions — find the conversation that matters, not just keyword matches. Chat with your conversations using any OpenAI/Anthropic compatible LLM. Configure API key and model per session. |
MCP Server built-in collector watches Model Context Protocol integration — connect AIVault to Claude Desktop, Cursor, or any MCP-compatible agent. Generate API keys for external tools. Collector, MCP, or your own scripts — all authenticated through AIVault. |
git clone https://github.com/aivault-org/aivault.git
cd aivault
npm installSupabase — Create a project at supabase.com
Clerk — Create an application at clerk.com
cp .env.example .env.localFill in your credentials:
# Supabase (Settings → API)
NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ...
SUPABASE_SERVICE_ROLE_KEY=eyJ...
# Clerk (API Keys)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...Run these SQL files in Supabase SQL Editor (Dashboard → SQL Editor):
-- 1. Core tables (users, conversations, messages, subscriptions)
-- → Paste contents of supabase/schema.sql
-- 2. Vector search (optional, for RAG)
-- → Paste contents of supabase/migrations/002_pgvector.sql
-- 3. API key authentication
-- → Paste contents of supabase/migrations/003_api_keys.sqlnpm run devOpen http://localhost:3000 🎉
- Click the button above (or connect repo manually)
- Add environment variables from
.env.local - Deploy — done!
Every git push auto-deploys.
Note: Claude Code session collection is now built into the MCP Server. No separate collector process needed.
AIVault 提供独立的 MCP Server 包,可连接任何兼容 MCP 协议的 Agent:
{
"mcpServers": {
"aivault": {
"command": "npx",
"args": ["-y", "@aivault/aivault-mcp-server"],
"env": {
"AIVAULT_URL": "https://your-aivault.vercel.app",
"AIVAULT_API_KEY": "av_xxxxxxxx"
}
}
}
}详见 @aivault/aivault-mcp-server。
可用工具:
search_conversations— 搜索对话(关键词 / 语义)get_conversation— 获取完整对话详情list_conversations— 列出最近对话get_stats— 获取统计信息register_agent— 注册 Agent 到 Dashboardsync_conversation— 同步对话到知识库heartbeat— 心跳保活
┌─────────────────────────────────────────────────────┐
│ AIVault App │
│ Next.js 15 + TypeScript │
├─────────────┬───────────────┬───────────────────────┤
│ Frontend │ API Routes │ Middleware │
│ (React 19) │ (/api/*) │ (Clerk Auth) │
├─────────────┴───────────────┴───────────────────────┤
│ ↓ │
│ ┌──────────┐ ┌──────────┐ ┌───────────────────┐ │
│ │ Supabase │ │ Clerk │ │ LLM APIs │ │
│ │ Postgres │ │ Auth │ │ MiMo / OpenAI / │ │
│ │ + pgvector│ │ │ │ Anthropic │ │
│ └──────────┘ └──────────┘ └───────────────────┘ │
├─────────────────────────────────────────────────────┤
│ External Tools │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ MCP Server │ │ (with built-in│ │
│ │ collector) │ │ │ │
│ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────┘
aivault/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── (auth)/ # Sign in / Sign up pages
│ │ ├── (dashboard)/ # Main app pages
│ │ │ ├── chat/ # AI chat with knowledge base
│ │ │ ├── conversations/ # Browse imported conversations
│ │ │ ├── import/ # File upload & import
│ │ │ ├── search/ # Full-text & semantic search
│ │ │ └── settings/ # Account & API key management
│ │ └── api/ # REST API endpoints
│ ├── components/ # Reusable UI components
│ ├── lib/ # Core libraries
│ │ ├── parsers/ # ChatGPT, Claude, Claude Code parsers
│ │ ├── embeddings.ts # Vector embedding generation
│ │ ├── supabase.ts # Database client
│ │ ├── auth.ts # Auth utilities
│ │ └── api-keys.ts # API key management
│ └── middleware.ts # Clerk auth middleware
├── supabase/ # Database schema & migrations
│ ├── schema.sql # Core database schema
│ └── migrations/ # pgvector & API keys
└── docs/ # Documentation
| Layer | Technology |
|---|---|
| Framework | Next.js 15 (App Router) |
| Language | TypeScript 5 |
| UI | Tailwind CSS + shadcn/ui |
| Database | Supabase (PostgreSQL) |
| Vector Search | pgvector (HNSW index) |
| Auth | Clerk |
| AI/LLM | MiMo, OpenAI, Anthropic compatible |
| Deploy | Vercel |
We welcome contributions! See CONTRIBUTING.md for:
- Development setup
- Code conventions
- Pull request process
Apache License 2.0 — free for personal and commercial use.
Built with ❤️ for the AI era