An AI-assisted, long-term memory system for IDEs, powered by LadybugDB — an embedded, columnar, MIT-licensed graph database. GraphMemory-IDE is an MCP (Model Context Protocol) server that provides semantic vector search, graph-based knowledge storage, and real-time analytics. It integrates with VSCode, Cursor, and Windsurf through dedicated IDE plugins.
AI-assisted development MCP providing long-term, on-device "AI memory" for IDEs. Powered by Kuzu GraphDB and exposed via MCP server
星數
17
工具
—
可用率
—
Graph database: the backend runs on LadybugDB 0.21.2, the actively developed successor to KuzuDB (whose open-source development halted after its acquisition by Apple). The full migration record — verified API differences, phase-by-phase execution, and the operational migration guide — lives in MIGRATION_PLAN_LADYBUG.md and docs/migration/KUZU_TO_LADYBUG.md.
Features
Graph-based memory storage — LadybugDB embedded graph database (Cypher / openCypher dialect) with automatic primary-key hash indexes and zone-map pruning on all columns
Semantic vector search — sentence-transformers embeddings with array_cosine_similarity Top-K queries over node embedding columns
Codon-accelerated graph algorithms — Optional native compilation via Codon for 10-100x speedups on centrality, community detection, path analysis, and similarity computations, with automatic Python/NetworkX fallback
FastAPI backend — Async API with JWT authentication (EdDSA/Ed25519), optional read-only mode, rate limiting, and security middleware
Real-time analytics — WebSocket and SSE streaming for live telemetry dashboards
Streamlit dashboard — Interactive visualization of graph metrics, user activity, and system health
Multi-IDE plugin support — Extensions for VSCode, Cursor, and Windsurf
Full observability — Prometheus metrics, Grafana dashboards, health checks, and alert correlation
Production-ready Docker deployment — Multi-service Docker Compose with Nginx, PostgreSQL, Redis, and monitoring stack
Quick Start
Docker (recommended)
git clone https://github.com/elementalcollision/GraphMemory-IDE.git
cd GraphMemory-IDE/docker
docker compose up -d
Redis connection for caching (falls back to in-memory cache when unreachable)
CODON_ENABLED
true
Enable Codon acceleration
CODON_LIB_PATH
./codon/lib/
Path to compiled Codon libraries
CODON_MIN_GRAPH_SIZE
100
Minimum graph size for Codon routing
Note on env prefixes: database-related settings are read by pydantic with the DB_ prefix — e.g. the setting LADYBUG_DB_PATH is set via the DB_LADYBUG_DB_PATH environment variable. The plain LADYBUG_DB_PATH form is honoured by server/init_db.py (and KUZU_DB_PATH remains as a deprecated fallback there, for one release cycle).
Architecture
GraphMemory-IDE uses a hybrid architecture where I/O-bound code (FastAPI, database clients, WebSocket) runs in CPython, while compute-heavy graph algorithms can optionally run as native-compiled Codon modules.
Graph database layer (server/graph_database.py): an embedded LadybugDB instance opened in-process — no separate DB server. It provides a thread-safe connection pool (Condition-variable based), LadybugDB's native AsyncConnection for async handlers (GraphDatabaseManager.get_async_connection()), schema management (User / Project / Memory node tables and OWNS / COLLABORATES / CONTAINS / RELATES_TO / ACCESSED_BY relationship tables), a query engine with parameterised Cypher execution and Prometheus instrumentation, and health checks (CALL show_tables() schema-integrity validation). A read_only mode opens the database for read-only workloads (e.g. analytics replicas).
The codon/ directory contains graph algorithm implementations compiled to native machine code via Codon. The bridge layer (codon/bridge/) automatically routes computations based on graph size and library availability:
# Run all tests
PYTHONPATH=. pytest tests/ -v
# Run with coverage
PYTHONPATH=. pytest tests/ --cov=server --cov-report=html
# Run specific test categories
PYTHONPATH=. pytest tests/ -m unit
PYTHONPATH=. pytest tests/ -m integration
PYTHONPATH=. pytest tests/ -m "not slow"
Registered test markers: asyncio, unit, integration, slow, real_time, real_services, performance, mock_data, load, external, database, authentication (--strict-markers is enforced).
Integration tests against real services
Database integration tests expect PostgreSQL and Redis backing services. The
ephemeral test profile brings them up (Docker / OrbStack), matching the fixture
defaults:
docker compose -f docker/docker-compose.test.yml up -d
python scripts/init_test_db.py # create the app schema in the test DB
PYTHONPATH=. pytest tests/integration/test_database_integration.py -v
docker compose -f docker/docker-compose.test.yml down -v
Without the services, PG-dependent fixtures skip cleanly; LadybugDB-backed tests run in-process against a temporary database and need no external services.
Coverage target: 85% minimum.
Production Deployment
For production, use the multi-service Docker Compose configuration:
cd docker/production
cp env.production.template .env # Configure environment variables
docker compose -f docker-compose.prod.yml up -d
This starts 7+ services: Nginx (reverse proxy), FastAPI, Streamlit, Analytics, PostgreSQL, Redis, Prometheus, and Grafana — with isolated network subnets and resource limits. A LadybugDB api-server sidecar (ghcr.io/ladybugdb/api-server) is available for external/admin graph access; pin a version tag in production.
This codebase was migrated from Kuzu 0.10.0 to LadybugDB 0.21.2 (2026-10). Key facts for anyone extending the integration:
Python API: import ladybug as lb; Connection(db) + init_connection(); snake_case result iteration (has_next() / get_next(), rows are lists)
Indexes: PK-only hash indexes (automatic); secondary-property and FULLTEXT indexes are not supported in 0.21.2 — zone maps serve filter workloads instead
Vector search: array_cosine_similarity (Kuzu's list_cosine_similarity does not exist)
Storage: a single .lbdb file; the parent directory must exist (unlike Kuzu, LadybugDB does not create it)
CLI: lbug (brew install ladybug); EXPORT DATABASE / IMPORT DATABASE supported for data migration