Requirements
Python 3.11+
Memory requires Python 3.11 or later for modern async features and type hints.
8GB+ RAM
Local LLM inference requires sufficient memory. 16GB recommended for larger models.
Ollama (Optional)
For local LLM inference. Can also use Claude or OpenAI APIs instead.
GPU (Optional)
NVIDIA GPU with CUDA for faster inference. CPU works but is slower.
Installation
Clone the Repository
Get the latest version of Memory from GitHub:
git clone https://github.com/rod-higgins/memory.git
cd memory
Create Virtual Environment
Isolate Memory's dependencies in a virtual environment:
python3.11 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
Install Dependencies
Install Memory with all optional features:
# Core installation
pip install -e .
# With web interface
pip install -e ".[web]"
# Full installation (all features)
pip install -e ".[web,training,all-sources]"
Install Ollama (Optional)
For local LLM inference without API costs:
# macOS/Linux
curl -fsSL https://ollama.com/install.sh | sh
# Pull a model
ollama pull mistral:7b
ollama pull nomic-embed-text # For embeddings
Initialize Memory
Set up your data directory and initial configuration:
# Create data directory
mkdir -p ~/memory/data
# Run setup wizard
python scripts/setup.py
Start the Web Interface
Launch the Memory web application:
# Start the server
uvicorn memory.web.app:app --host 0.0.0.0 --port 8765
# Open in browser
http://localhost:8765
Configuration
Memory uses a YAML configuration file. Create config/memory.yaml:
# Memory Configuration
data_dir: ~/memory/data
llm:
provider: ollama # or 'claude', 'openai'
model: mistral:7b
embedding_model: nomic-embed-text
memory:
short_term_limit: 50
long_term_similarity_threshold: 0.7
consolidation_interval: 3600
web:
host: 0.0.0.0
port: 8765
enable_mfa: true
Configuration Options
| Option | Description | Default |
|---|---|---|
data_dir |
Directory for storing memory databases and user data | ~/memory/data |
llm.provider |
LLM backend: ollama, claude, or openai |
ollama |
llm.model |
Model name for the selected provider | mistral:7b |
memory.short_term_limit |
Maximum items in short-term memory | 50 |
memory.long_term_similarity_threshold |
Cosine similarity threshold for retrieval | 0.7 |
web.enable_mfa |
Require multi-factor authentication | true |
Next Steps
- Connect data sources - Import your emails, notes, and code
- Configure local LLMs - Set up Ollama models for privacy
- API documentation - Integrate Memory with your tools
- Try the demo - See Memory in action
Troubleshooting
Ollama Connection Issues
If Memory can't connect to Ollama:
# Check Ollama is running
ollama list
# Restart Ollama
pkill ollama
ollama serve &
Memory Usage Issues
If you're running out of memory with local models:
- Use smaller models like
phi3:3.8binstead of 7B+ models - Reduce context window size in configuration
- Consider using cloud APIs for complex queries
Database Errors
If you encounter database errors:
# Reset databases (warning: clears all data)
rm -rf ~/memory/data/*.db
python scripts/setup.py