Modular, ownable AI memory that gets smarter with every conversation.
- Persistent AI Memory – Learns from your conversations and documents, not just prompts
- Knowledge Graph Integration – Forms and updates connections between concepts like a human mind
- Modular Architecture – Easily swap vector stores, graph DBs, LLMs, or add your own data sources
- Document-Aware Chat – Seamlessly integrates uploaded files into memory and responses
- Smart Agent Control – Automatically decides what to remember, update, or reference
- Customizable Prompts – Tailor system behavior to fit your tone, tools, and goals
- LLM Agnostic – Works with GPT-4, Claude, Ollama, etc
- Open-Source & MIT Licensed – Full freedom to use, modify, and extend
- Own Your Data – Memory stays with you — not Big Tech
⚠️ Important: Follow ALL steps below. Skipping the .env setup will cause the application to fail.
- Python 3.9+
- Docker and Docker Compose (optional, for containerized setup)
- Google Cloud account (for GCS, OAuth, and Vertex AI Search)
- Neo4j database
- Supabase account
- OpenAI API key
-
Clone the repository
git clone https://github.com/BrainDriveAI/BrainDrive-Memory.git cd BrainDrive-Memory -
Create a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
⚠️ REQUIRED: Configure environment variablescp .env.example .env
You MUST edit the
.envfile with your API keys before proceeding.Open
.envand set at minimum:OPENAI_API_KEYNEO4J_URL,NEO4J_USER,NEO4J_PWDSUPABASE_URL,SUPABASE_KEYGOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRETGCS_BUCKET_NAME
The app will not start without these values configured.
-
Run the application
streamlit run main.py
- First time setup? Follow our detailed installation guide
- Configuration issues? See the configuration guide
BrainDrive Memory is designed to be modular, provider-agnostic, and fully ownable. It’s built around four core components:
- Coordinates memory operations
- Decides what to remember, update, or retrieve
- Interacts with data sources through natural language
- Built with LangGraph and customizable system prompts
- Vector Store – Fast retrieval using embeddings (default: Supabase, swappable)
- Knowledge Graph – Connects entities and facts like neural links (default: Neo4j, swappable)
- Document Storage – Stores uploaded files (default: Google Cloud Storage, swappable)
- Other Sources – Easily integrate calendars, emails, databases, etc.
- Encapsulated tools for
add,delete,update,search, andsummarize - Modular: Add or remove tools based on your needs
- Tools interact with all data sources through a unified manager
- Interfaces for interacting with the memory agent:
- Web UI (Streamlit-based)
- REST API
- LangGraph visual/debug interface
- CLI (coming soon)
- Built to support custom interfaces via plugin or API
All major components — LLMs, vector stores, graph databases, storage providers — are wrapped in adapters. You can:
- Swap providers without rewriting core logic
- Add new data sources or tools easily
- Configure system behavior via a centralized
app/settings.pyfile
The result: a flexible, extensible memory system you can shape to your needs.
The application uses environment variables for configuration. Key variables include:
| Variable | Description |
|---|---|
| OPENAI_API_KEY | Your OpenAI API key |
| NEO4J_URL | URL for your Neo4j database |
| NEO4J_USER | Neo4j username |
| NEO4J_PWD | Neo4j password |
| SUPABASE_URL | Supabase connection URL |
| SUPABASE_KEY | Supabase service role key |
| GOOGLE_CLIENT_ID | Google OAuth client ID |
| GOOGLE_CLIENT_SECRET | Google OAuth client secret |
| GCS_BUCKET_NAME | Google Cloud Storage bucket name |
| VERTEX_AI_PROJECT_ID | Google Cloud Project ID for Vertex AI |
See the configuration guide for a complete list of options.
braindrive-memory/
├── app/ # Main application code
│ ├── adapters/ # Adapters for external services
│ ├── agents/ # Agent implementation
│ ├── agent_prompts/ # Prompts for agent behavior
│ ├── interfaces/ # Interface definitions for data sources
│ ├── presentation/ # UI and API components
│ ├── services/ # Application services
│ ├── tools/ # Agent tools
│ └── utils/ # Utility functions
├── docs/ # Documentation
└── main.py # Application entry point
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
For comprehensive guides, technical details, and contribution information, visit our documentation folder.
Quick Links:
- 📖 Complete Installation Guide - Detailed setup instructions
- 🏗️ Architecture Overview - System design and components
- ⚙️ Configuration Reference - All configuration options
- 👥 Contributing Guidelines - How to contribute
- 📱 User Guide - How to use the application
This project is licensed under the MIT License - see the LICENSE file for details.