kindex

The memory layer Claude Code doesn't have.

Kindex does one thing. It knows what you know. A persistent knowledge graph so your AI assistant never starts a session blind.

$ pip install kindex[mcp]
$ claude mcp add -s user -t stdio kindex -- kin-mcp
v0.8.0 Claude Code Plugin 22 MCP Tools 46 CLI Commands MIT License Free

Why Kindex

Memory plugins capture what happened. Kindex captures what it means and how it connects.

Most memory tools are session archives with search. Kindex is a weighted knowledge graph that grows intelligence over time — understanding relationships, surfacing constraints, and managing exactly how much context to inject based on your available token budget.

Context-Aware by Design

Five context tiers auto-select based on available tokens. When other plugins dump everything into context, Kindex gives you 200 tokens of executive summary or 4000 tokens of deep context — whatever fits. Your plugin doesn't eat the context window.

Knowledge Graph, Not Log File

Nodes have types, weights, domains, and audiences. Edges carry provenance and decay over time. The graph understands what matters — not just what was said.

Operational Guardrails

Constraints block deploys. Directives encode preferences. Watches flag attention items. Checkpoints run pre-flight. No other memory plugin has this.

Cache-Optimized LLM Retrieval

Three-tier prompt architecture with Anthropic prompt caching. Stable knowledge cached at 10% cost. Query-relevant context predicted via graph expansion. Only the question pays full price. Transparent — kin ask just works better and cheaper.

Team & Org Ready

.kin inheritance chains let a service repo inherit from a platform context, which inherits from an org voice. Private/team/org/public scoping with PII stripping on export.

Session Tags

Named work context handles that replace manual resume files. Start a tag, track focus and remaining items, segment by topic, and resume seamlessly in new sessions. kin tag start / kin tag resume.

Reminders & Actions

Natural language scheduling with recurring support. Reminders can carry shell commands and Claude instructions — the daemon executes them automatically when due. A Stop hook guard blocks session exit when actionable reminders are pending. kin remind create "deploy" --at "in 1h" --action "...".

Adaptive Scheduling

The cron daemon dynamically adjusts its check interval based on the nearest pending reminder. Reminder in 3 days? Check daily. Day of? Hourly. Within the hour? Every 5 minutes. No reminders? Daemon sleeps. Zero wasted cycles.

Getting Claude to Actually Use It

Installing tools is not enough. Claude won't use them proactively unless you tell it to.

Kindex ships with a recommended CLAUDE.md block that turns passive tools into active habits. The difference between "Claude has a knowledge graph" and "Claude actively maintains a knowledge graph" is one command.

# Print the recommended CLAUDE.md directives $ kin setup-claude-md # Or auto-append to ~/.claude/CLAUDE.md $ kin setup-claude-md --install # Install lifecycle hooks (SessionStart + Stop guard) $ kin setup-hooks

The directives add:

Session Lifecycle

Start/segment/end rules so Claude tags every session and tracks context across conversations.

Capture Triggers

Explicit rules for what to add: discoveries, decisions, key files, notable outputs, new terms, open questions.

Search Discipline

Always search before add. Always check existing knowledge before starting work. No duplicates.

Bulk Extraction

Use learn after reading long files or completing complex tasks to auto-extract and index concepts.

The SessionStart hook reinforces these directives at every session start and after context compaction, so Claude never forgets.

In Practice

A 162-file fantasy novel vault — characters, locations, magic systems, plot outlines — ingested in one pass. Cross-referenced by content mentions. Searched in milliseconds.

$ kin status Nodes: 192 Edges: 11,802 Orphans: 3 $ time kin search "the Baker" # Kindex: 10 results for "the Baker" ## [document] The Baker - Hessa's Profile and Message Broker System (w=0.70) → Thieves Guild, Five Marks, Thieves Guild Operations ## [document] Hessa the Baker's Story (w=0.70) → Mia -- Backstory, Mia -- Character Arc ## [person] Mia and The Baker (Hessa) -- Relationship (w=0.70) → Sebastian and Mia, Mia -- Motivations and Goals 0.142 total $ kin graph stats Nodes: 192 Edges: 11,802 Density: 0.3218 Components: 5 Avg degree: 122.94

192 nodes. 11,802 edges. 5 context tiers. Hybrid FTS5 + graph traversal in 142ms.

Install as Claude Code Plugin

Two commands. Zero configuration. Claude gets 22 native tools for your knowledge graph.

# Install and register (one time) $ pip install kindex[mcp] $ claude mcp add --scope user --transport stdio kindex -- kin-mcp $ kin init # That's it. Claude Code now has: search — hybrid FTS5 + graph search add — capture knowledge with auto-linking context — formatted context block at any tier show — full node details with edges ask — question classification + answer learn — extract knowledge from text link — create edges between nodes list_nodes — browse with filters status — graph health + operational summary suggest — bridge opportunity suggestions graph_stats — centrality, communities, density changelog — recent changes ingest — ingest from external sources tag_start — start a named session tag tag_update — update/segment/pause/end a session tag tag_resume — resume a session with full context remind_create — create a reminder with NL scheduling remind_list — list active reminders remind_snooze — snooze a reminder remind_done — complete a reminder remind_check — fire due reminders now remind_exec — execute a reminder's action

Or add .mcp.json to any repo for project-scope access:

{ "mcpServers": { "kindex": { "command": "kin-mcp" } } }

Also works as a standalone CLI (kin search, kin add, etc.) and via Claude Code hooks. Use whichever integration fits your workflow.

Context Tiers

The core differentiator. Other plugins inject context and hope for the best. Kindex manages exactly how much based on what's available.

TierBudgetUse Case
full~4000 tokensSession start, deep work — everything relevant
abridged~1500 tokensMid-session reference — key facts and connections
summarized~750 tokensQuick orientation — what matters right now
executive~200 tokensPost-compaction — just the essentials
index~100 tokensExistence check — "I know about X"

Auto-selected via --tokens budget or set explicitly with --level. The MCP context tool does this automatically.

Quick Start (CLI)

# Initialize a knowledge store $ kin init # Add knowledge $ kin add "Stigmergy is coordination through environmental traces" Created node: stigmergy-is-coordination-th (concept) # Search with hybrid FTS5 + graph traversal $ kin search stigmergy 0.85 stigmergy-is-coordination-th concept Stigmergy is coordination... # Ask questions (with automatic classification) $ kin ask "How does weight decay work?" [procedural question] # Track operational rules $ kin add "Never break the API contract" --type constraint --trigger pre-deploy # Ingest from all sources (GitHub, git, sessions, files) $ kin ingest all

Architecture

SQLite + FTS5 primary store and full-text search nodes: id, title, content, type, weight, audience, domains, extra edges: from_id, to_id, type, weight, provenance fts5: content synced via triggers Retrieval pipeline: FTS5 BM25 ──┐ Graph BFS ──┼── RRF merge ── tier formatter ── context block (vectors) ──┘ | full | abridged | summarized | executive | index LLM cache tiers (kin ask): Tier 1: codebook (stable node index) cached @ 10% cost Tier 2: query-relevant context cached per-topic @ 10% cost Tier 3: user question full price, tiny Reminders: reminders table (SQLite) separate from knowledge graph Time parsing: dateparser (NL) + dateutil.rrule (recurrence) + cronsim (cron) Channels: system (macOS) | slack | email | claude (hook) | terminal Daemon: launchd/cron adaptive interval ── check due ── notify ── auto-snooze Scheduling: adaptive tiers (>7d=daily, >1d=hourly, >1h=10min, <1h=5min, none=disabled) Actions: shell commands run directly | complex tasks launch claude -p Stop guard: blocks session exit when actionable reminders pending Three integration paths: MCP plugin ──> Claude calls tools natively (search, add, learn, remind, ...) CLI hooks ──> SessionStart/PreCompact/Stop lifecycle events Adapters ──> Entry-point discovery for custom ingestion sources

Node Types

Knowledge: concept, document, session, person, project, decision, question, artifact, skill

Operational: constraint (invariants), directive (soft rules), checkpoint (pre-flight checks), watch (attention flags)

.kin Voice & Inheritance

Companies publish .kin files that encode their voice, standards, and context. Teams inherit from orgs. Repos inherit from teams. The knowledge graph carries the voice forward automatically.

Org Voice

# ~/.kindex/voices/acme.kin name: acme-voice audience: org voice: tone: precise, direct principles: - Explain reasoning - Be honest about trade-offs standards: code_review: - Every PR needs a "why"

Platform Team

# platform/.kin name: platform audience: org domains: [engineering] inherits: - ~/.kindex/voices/acme.kin

Service Repo

# payments-service/.kin name: payments-service audience: team domains: [payments, python] inherits: - ../platform/.kin

The payments service gets: domains: [payments, python, engineering], Acme's voice principles, the platform's review standards, and audience: team (local wins). Parent directories are auto-walked when no explicit inherits is set. Example voice files included.

Integrations

GitHub

Ingest issues, PRs, and commits via gh CLI.

Linear

Ingest issues via GraphQL API.

Git Hooks

Post-commit records. Pre-push surfaces constraints.

File Watcher

SHA-256 change detection for registered files.

CLI Reference

47 commands organized by function. All support --data-dir, --config, and --json flags.

Core

kin search <query>Hybrid FTS5 + graph search with RRF merging
kin contextFormatted context block for AI injection (--level, --tokens)
kin add <text>Quick capture with auto-extraction and linking
kin show <id>Full node details with edges, provenance, and state
kin listList nodes (--type, --status, --mine, --limit)
kin ask <question>Question classification + LLM or context answer

Knowledge Management

kin learnExtract knowledge from sessions and inbox
kin link <a> <b>Create weighted edge between nodes
kin alias <id>Manage AKA/synonyms for a node
kin register <id> <path>Associate a file path with a node
kin orphansNodes with no connections
kin trail <id>Temporal history and provenance chain
kin decayApply weight decay to stale nodes/edges
kin recentRecently active nodes
kin tag [action]Session tags: start, update, segment, pause, end, resume, list, show
kin remind [action]Reminders: create, list, show, snooze, done, cancel, check, exec

Graph Analytics

kin graph [mode]Dashboard: stats, centrality, communities, bridges, trailheads
kin suggestBridge opportunity suggestions (--accept, --reject)
kin skills [person]Skill profile and expertise for a person
kin embedIndex all nodes for vector similarity search

Operational

kin statusGraph health + operational summary (--trigger, --owner)
kin set-audience <id>Set privacy scope (private/team/org/public)
kin set-state <id> <k> <v>Set mutable state on directives/watches
kin exportAudience-aware graph export with PII stripping
kin import <file>Import nodes/edges from JSON/JSONL
kin sync-linksUpdate node content with connection references

Ingestion

kin ingest <source>Ingest from: projects, sessions, files, commits, github, linear, all
kin cronOne-shot maintenance cycle (for crontab/launchd)
kin watchWatch for new sessions and ingest (--interval)
kin analyticsArchive session analytics and activity heatmap
kin indexWrite .kin/index.json for git tracking

Infrastructure

kin initInitialize data directory
kin config [show|get|set]View or edit configuration
kin setup-hooksInstall lifecycle hooks into Claude Code
kin setup-cronInstall periodic maintenance (launchd/crontab)
kin setup-claude-mdOutput/install recommended CLAUDE.md directives
kin stop-guardStop hook guard for actionable reminders
kin doctorHealth check with graph enforcement
kin migrateImport markdown topics into SQLite
kin budgetLLM spend tracking
kin whoamiShow current user identity
kin changelogWhat changed (--since, --days, --actor)
kin logRecent activity log
kin git-hookInstall/uninstall git hooks in a repository
kin primeGenerate context for SessionStart hook (--codebook)
kin compact-hookPre-compact knowledge capture