Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.linksee.app/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Linksee Memory is a single-process Node.js MCP server using SQLite (via better-sqlite3) with WAL mode for concurrent read access.

Database tables

Core tables

TablePurpose
entitiesPeople, companies, projects, concepts, files with normalized dedup and momentum cache
memories6-layer structured memories with importance, protected flag, thread_id, and 3 virtual generated columns
memories_ftsFTS5 virtual table with trigram tokenizer for full-text search (supports CJK)

Relationship tables

TablePurpose
memory_edgesDirected relationships between memories (supersedes, resolves, implements, contradicts, extends)
edgesEntity-to-entity graph relationships

File tracking

TablePurpose
file_snapshotsDiff cache for read_smart — per-file content snapshots with chunk hashes
file_factsExtracted facts per file chunk
sessionsAgent/conversation tracking
session_file_editsConversation-to-file linkage with context_snippet

Lifecycle

TablePurpose
eventsTime-series log driving momentum calculation
consolidationsAudit trail of what got compressed into what
metaSchema version tracking (currently v7)

Virtual generated columns

The memories table has 3 virtual columns auto-extracted from structured JSON content:
altitude  TEXT GENERATED ALWAYS AS (json_extract(content, '$.altitude'))
mem_type  TEXT GENERATED ALWAYS AS (json_extract(content, '$.type'))
mem_state TEXT GENERATED ALWAYS AS (json_extract(content, '$.state'))
These enable SQL-level filtering without parsing JSON at query time.

FTS5 configuration

CREATE VIRTUAL TABLE memories_fts USING fts5(
  content,
  content=memories,
  content_rowid=id,
  tokenize='trigram'
);
The trigram tokenizer handles both English and Japanese text without language-specific stemming.

SQLite pragmas

PRAGMA journal_mode = WAL;
PRAGMA foreign_keys = ON;
WAL mode allows concurrent reads from multiple MCP clients while maintaining write safety.