https://github.com/cognizonline/memory-kit
Self-hosted memory platform for Claude Code. Own your data.
https://github.com/cognizonline/memory-kit
ai-assistant claude-code fastapi local-first memory-platform privacy self-hosted sqlite
Last synced: 3 months ago
JSON representation
Self-hosted memory platform for Claude Code. Own your data.
- Host: GitHub
- URL: https://github.com/cognizonline/memory-kit
- Owner: cognizonline
- License: mit
- Created: 2025-12-20T16:54:14.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-12-21T07:39:07.000Z (6 months ago)
- Last Synced: 2025-12-23T01:33:39.362Z (6 months ago)
- Topics: ai-assistant, claude-code, fastapi, local-first, memory-platform, privacy, self-hosted, sqlite
- Language: Python
- Homepage: https://cogniz.online
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Claude Code MemoryKit
**Self-hosted memory platform for Claude Code. Own your data.**
[](LICENSE)
[](https://www.python.org/downloads/)
Local, privacy-first memory storage for AI coding assistants. No cloud required.
## Features
- **Self-hosted**: Your memories stay on your machine
- **Zero dependencies**: Just SQLite, no external services
- **5-minute setup**: Clone, run, done
- **Claude Code ready**: Drop-in replacement for Cogniz cloud
- **Free forever**: No usage limits, no tracking
## Quick Start
### Option 1: Python (Fastest)
```bash
# Clone
git clone https://github.com/cognizonline/memory-kit.git
cd memory-kit
# Install
pip install -r requirements.txt
# Generate API key
echo "MEMORYKIT_API_KEY=$(python -c 'import secrets; print(secrets.token_urlsafe(32))')" > .env
# Start server
python cli.py start
```
Server runs at `http://127.0.0.1:8765`
### Option 2: Docker (Isolated)
```bash
git clone https://github.com/cognizonline/memory-kit.git
cd memory-kit
# Set API key
echo "MEMORYKIT_API_KEY=your_secure_key" > .env
# Start with Docker
docker-compose up -d
```
## Usage
### Start Server
```bash
python cli.py start
```
### View Stats
```bash
python cli.py stats
```
Output:
```
📊 MemoryKit Statistics
━━━━━━━━━━━━━━━━━━━━━━
Total Memories: 247/1000
Total Projects: 12
Usage: 24.7%
```
### Search Memories
```bash
python cli.py search "authentication"
```
### List Recent Memories
```bash
python cli.py list --limit 5 --project my-app
```
### View Projects
```bash
python cli.py projects
```
## API Endpoints
Compatible with [Cogniz API](https://cogniz.online/api-reference):
- `POST /v1/store` - Save memory
- `GET /v1/recent` - Get recent memories
- `GET /v1/search` - Search memories
- `GET /v1/user-stats` - Usage statistics
- `GET /v1/projects` - List projects
Full API docs at: `http://127.0.0.1:8765/docs`
## Claude Code Integration
Use with [claude-memory-hooks](https://github.com/cognizonline/claude-memory-hooks):
Edit `.claude/project-config.json`:
```json
{
"cogniz": {
"api_key": "your_memorykit_api_key",
"api_url": "http://127.0.0.1:8765/v1",
"default_project": "my-project"
}
}
```
Now Claude Code saves to your local MemoryKit instead of the cloud.
## Free vs Premium
| Feature | MemoryKit (Free) | Cogniz Premium |
|---------|------------------|----------------|
| Storage | Local SQLite | Cloud MySQL |
| Max memories | 1,000 | Unlimited |
| Search | Basic text | AI semantic |
| Workspaces | Single user | Teams |
| Sync | No sync | Multi-device |
| Dashboard | CLI only | Web UI |
| Privacy | 100% local | Cloud hosted |
| Cost | Free forever | $9/month |
## When to Upgrade to Cogniz Premium
Upgrade at [cogniz.online](https://cogniz.online) when you need:
- **More than 1,000 memories**
- **AI-powered semantic search**
- **Team workspaces**
- **Cloud sync across devices**
- **Web dashboard**
- **Automatic backups**
## Architecture
```
MemoryKit
├── FastAPI server (async, auto-docs)
├── SQLite database (zero-config)
├── REST API (Cogniz-compatible)
└── CLI tool (management)
```
## Configuration
Environment variables:
```bash
MEMORYKIT_API_KEY=your_secure_key
MEMORYKIT_HOST=127.0.0.1
MEMORYKIT_PORT=8765
MEMORYKIT_DB_PATH=memory.db
```
## Security
- **API key required** for all endpoints
- **Local only** by default (127.0.0.1)
- **No telemetry** or external calls
- **SQLite encryption** optional (enable with SQLCipher)
## Limitations (by design)
- 1,000 memory limit
- Basic text search only (no embeddings)
- Single user (no workspaces)
- No cloud sync
- CLI only (no web UI)
These limits encourage upgrade to Cogniz Premium while keeping the free version useful.
## Development
```bash
# Install dev dependencies
pip install -r requirements.txt
# Run tests
pytest
# Run with auto-reload
uvicorn memorykit.server:app --reload
```
## Contributing
Contributions welcome! Please:
1. Fork the repository
2. Create feature branch
3. Submit pull request
See [CONTRIBUTING.md](CONTRIBUTING.md)
## License
MIT License - see [LICENSE](LICENSE)
## Support
- **Issues**: [GitHub Issues](https://github.com/cognizonline/memory-kit/issues)
- **Discussions**: [GitHub Discussions](https://github.com/cognizonline/memory-kit/discussions)
- **Email**: support@cogniz.online
## Related Projects
- [claude-memory-hooks](https://github.com/cognizonline/claude-memory-hooks) - Claude Code integration
- [cogniz-python](https://github.com/cognizonline/cogniz-python) - Python SDK for Cogniz
- [Cogniz Premium](https://cogniz.online) - Cloud-hosted with unlimited features
---
**Built by [Cogniz](https://cogniz.online) - Own your AI memory**