SETUP.md•3.54 kB
# Continuo Memory System - Setup Guide
## Quick Setup (5 minutes)
### Prerequisites
- Python 3.9+
- Qoder or Cursor IDE
- Git
### Installation
1. **Clone and setup virtual environment**
```bash
cd /path/to/continuo
python3 -m venv venv_memory
source venv_memory/bin/activate # On Windows: venv_memory\Scripts\activate
```
2. **Install dependencies**
```bash
pip install -r requirements.txt
# or
pip install -e . # Install in editable mode
```
3. **Configure MCP in Qoder**
Create `.qoder/mcp.json` in your project root:
```json
{
"mcpServers": {
"continuo-memory": {
"command": "/absolute/path/to/continuo/venv_memory/bin/python",
"args": [
"/absolute/path/to/continuo/continuo/mcp_memory_server.py",
"--provider",
"local",
"--db-path",
"/Users/GtOkAi/.qoder/continuo_memory_db"
]
}
}
}
```
**Important**: Replace paths with absolute paths (Qoder doesn't expand `~`).
4. **Restart Qoder**
Quit Qoder completely (⌘Q) and reopen.
5. **Test the memory system**
In Qoder chat:
```
@continuo-memory get_memory_stats
```
You should see memory statistics. First call will take ~10 seconds (loading embedding model).
## Usage
### Store knowledge
```
@continuo-memory store_memory("Fixed authentication bug by adding JWT validation", {"file": "auth.py", "type": "bugfix"})
```
### Search memory
```
@continuo-memory search_memory("authentication issues", top_k=5)
```
### Get statistics
```
@continuo-memory get_memory_stats
```
## Troubleshooting
### Server not starting
1. Check if paths in `.qoder/mcp.json` are absolute (no `~`)
2. Test manually:
```bash
/path/to/venv_memory/bin/python /path/to/mcp_memory_server.py --provider local --db-path /tmp/test_db
```
3. Check Qoder logs (usually in `~/.qoder/logs/`)
### First call is slow
Normal! Sentence-transformers model loads on first use (~5-10 seconds).
### ChromaDB errors
Delete the database and restart:
```bash
rm -rf ~/.qoder/continuo_memory_db
```
## Advanced Configuration
### Using OpenAI Embeddings (faster, paid)
Update `.qoder/mcp.json`:
```json
{
"mcpServers": {
"continuo-memory": {
"command": "/path/to/venv_memory/bin/python",
"args": [
"/path/to/mcp_memory_server.py",
"--provider",
"openai",
"--api-key",
"sk-your-api-key",
"--db-path",
"/Users/GtOkAi/.qoder/continuo_memory_db"
]
}
}
}
```
## Architecture
```
Qoder Chat ──► MCP Protocol ──► Memory Server ──► ChromaDB
▲ │ │
│ ├── Embeddings ─┤
└──── Results ◄──── Search ◄───┘ │
(Sentence Transformers or OpenAI)
```
## Memory Hierarchy
- **N0 (Chunks)**: Raw code/conversation snippets
- **N1 (Micro-summaries)**: Compressed summaries of related chunks
- **N2 (Meta-summaries)**: High-level project knowledge
System automatically manages hierarchy based on access patterns and relevance.
## Cost Comparison
| Provider | Storage | Search | Monthly (1000 queries) |
|----------|---------|--------|------------------------|
| Local (sentence-transformers) | Free | Free | $0 |
| OpenAI embeddings | Free | ~$0.0001/query | ~$0.10 |
## Next Steps
- Read [continuo.markdown](continuo.markdown) for full architecture details
- See [examples/](examples/) for usage patterns
- Check [continuo/](continuo/) for implementation