--- title: 'Quickstart' description: 'Get T6 Mem0 v2 running in 5 minutes' --- ## Prerequisites Before you begin, ensure you have: - Docker and Docker Compose installed - Existing Supabase instance (PostgreSQL with pgvector) - OpenAI API key - Git access to the repository **Ready to go?** Let's set up your memory system! ## Step 1: Clone Repository ```bash git clone https://git.colsys.tech/klas/t6_mem0_v2 cd t6_mem0_v2 ``` ## Step 2: Configure Environment Create `.env` file from template: ```bash cp .env.example .env ``` Edit `.env` with your credentials: ```bash # OpenAI Configuration OPENAI_API_KEY=sk-your-openai-api-key-here # Supabase Configuration (your existing instance) SUPABASE_CONNECTION_STRING=postgresql://supabase_admin:password@172.21.0.12:5432/postgres # Neo4j Configuration NEO4J_PASSWORD=your-secure-neo4j-password # API Configuration API_KEY=your-secure-api-key-here ``` **Important**: Replace all placeholder values with your actual credentials. Never commit the `.env` file to version control! ## Step 3: Apply Database Migrations Run the Supabase migration to set up the vector store: ### Option A: Using Supabase SQL Editor (Recommended) 1. Open your Supabase dashboard 2. Navigate to **SQL Editor** 3. Copy contents from `migrations/supabase/001_init_vector_store.sql` 4. Paste and execute ### Option B: Using psql ```bash psql "$SUPABASE_CONNECTION_STRING" -f migrations/supabase/001_init_vector_store.sql ``` The migration creates tables, indexes, and functions needed for vector similarity search. See [Supabase Setup](/setup/supabase) for details. ## Step 4: Start Services Launch all services with Docker Compose: ```bash docker compose up -d ``` This starts: - **Neo4j** (ports 7474, 7687) - **REST API** (port 8080) - **MCP Server** (port 8765) ## Step 5: Verify Installation Check service health: ```bash # Check API health curl http://localhost:8080/v1/health # Expected response: # { # "status": "healthy", # "version": "0.1.0", # "dependencies": { # "mem0": "healthy" # } # } ``` **Success!** All services are running. Let's try using the memory system. ## Step 6: Add Your First Memory ### Using REST API ```bash curl -X POST http://localhost:8080/v1/memories/ \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "messages": [ {"role": "user", "content": "I love pizza with mushrooms and olives"} ], "user_id": "alice" }' ``` ### Response ```json { "status": "success", "memories": [ { "id": "mem_abc123", "memory": "User loves pizza with mushrooms and olives", "user_id": "alice", "created_at": "2025-10-13T12:00:00Z" } ], "message": "Successfully added 1 memory(ies)" } ``` ## Step 7: Search Memories ```bash curl -X GET "http://localhost:8080/v1/memories/search?query=What food does Alice like?&user_id=alice" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### Response ```json { "status": "success", "memories": [ { "id": "mem_abc123", "memory": "User loves pizza with mushrooms and olives", "user_id": "alice", "score": 0.95, "created_at": "2025-10-13T12:00:00Z" } ], "count": 1 } ``` **Congratulations!** Your memory system is working. The AI remembered Alice's food preferences and retrieved them semantically. ## Step 8: Explore Neo4j (Optional) View memory relationships in Neo4j Browser: 1. Open http://localhost:7474 in your browser 2. Login with: - **Username**: `neo4j` - **Password**: (from your `.env` NEO4J_PASSWORD) 3. Run query: ```cypher MATCH (n) RETURN n LIMIT 25 ``` Neo4j visualizes relationships between memories, entities, and concepts extracted by mem0. ## Next Steps Connect with Claude Code for AI assistant integration Explore all available endpoints Understand the system design See integration examples ## Common Issues - Verify `SUPABASE_CONNECTION_STRING` is correct - Ensure Supabase is accessible from Docker network - Check if pgvector extension is enabled - Run migration script if tables don't exist - Check if ports 7474 and 7687 are available - Verify `NEO4J_PASSWORD` is set in `.env` - Check Docker logs: `docker logs t6-mem0-neo4j` - Verify `API_KEY` in `.env` matches request header - Ensure Authorization header format: `Bearer YOUR_API_KEY` - Check `OPENAI_API_KEY` is valid - Verify API key has sufficient credits - Check internet connectivity from containers ## Getting Help - Review [Architecture documentation](/architecture) - Check [API Reference](/api-reference/introduction) - See [Setup guides](/setup/installation) --- **Ready for production?** Continue to [Configuration](/setup/configuration) for advanced settings.