The Neo4j knowledge graph is an optional feature. You can skip this setup and still use all core Tabby features.
What is the Knowledge Graph?
The knowledge graph stores relationships between:- Conversations and topics
- User preferences and patterns
- Project context and files
- Code snippets and documentation
- Remember context across sessions
- Make better suggestions based on your history
- Understand relationships between different parts of your work
Setup Options
You can use either:- Neo4j AuraDB (Cloud, free tier available) - Recommended for beginners
- Self-hosted Neo4j (Local Docker or server)
Option 1: Neo4j AuraDB (Cloud)
Create an account
Go to Neo4j AuraDB and sign up for a free account.
Create a free instance
- Click “Create Instance”
- Select Free tier
- Choose a name for your instance
- Select a region close to you
- Click “Create”
Save credentials
When your instance is created, Neo4j will show a dialog with:
- Connection URI (looks like
neo4j+s://xxxxx.databases.neo4j.io) - Username (usually
neo4j) - Password (randomly generated)
Option 2: Self-Hosted Neo4j (Docker)
If you prefer to run Neo4j locally:http://localhost:7474 to verify it’s running.
For production use, consider setting up persistent volumes and proper configuration. See Neo4j Docker documentation for details.
Configure Environment Variables
Add your Neo4j credentials tobackend/.env:
For Neo4j AuraDB
For Self-Hosted Neo4j
Environment Variables Explained
NEO4J_URL
NEO4J_URL
The connection URI for your Neo4j instance.
- AuraDB:
neo4j+s://xxxxx.databases.neo4j.io(uses TLS) - Local:
bolt://localhost:7687orneo4j://localhost:7687
NEO4J_USERNAME
NEO4J_USERNAME
Database username. Default is
neo4j for both AuraDB and self-hosted instances.NEO4J_PASSWORD
NEO4J_PASSWORD
- AuraDB: The password from the credentials file you downloaded
- Local: The password you set in the Docker command
NEO4J_DATABASE
NEO4J_DATABASE
The database name to use. Default is
neo4j.AURA_INSTANCEID & AURA_INSTANCENAME
AURA_INSTANCEID & AURA_INSTANCENAME
Only required for Neo4j AuraDB:
- AURA_INSTANCEID: Found in your AuraDB dashboard
- AURA_INSTANCENAME: The name of your instance
Verify Connection
After configuring the environment variables, you can verify the connection:-
Start the memory backend:
- Check the logs for successful Neo4j connection messages
- If using AuraDB, you can also verify in the Neo4j Browser at your instance’s connection URL
Troubleshooting
Connection refused
- AuraDB: Check your instance is running in the AuraDB dashboard
- Self-hosted: Verify Docker container is running with
docker ps
Authentication failed
- Double-check your username and password
- For AuraDB, make sure you’re using the password from the downloaded credentials file
- For local instances, verify the password matches what you set in the Docker command
TLS/SSL errors (AuraDB)
- Make sure you’re using
neo4j+s://(with the +s) for AuraDB connections - Verify your instance URL is correct
Free Tier Limits
Neo4j AuraDB free tier includes:- 200,000 nodes
- 400,000 relationships
- 1 GB storage
Next Steps
With Neo4j configured:- Start all Tabby services including the memory backend
- The knowledge graph will automatically populate as you use Tabby
- Explore graph visualizations in the Neo4j Browser