KiroGraph-Mem gives AI agents a persistent, searchable memory layer that survives session boundaries. Every observation — a debugging decision, an architectural pattern, a known error — is compressed, linked to the code symbols it mentions, embedded for semantic search, and deduplicated via SHA-256. Future sessions surface relevant observations automatically insideDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/davide-desio-eleva/kirograph/llms.txt
Use this file to discover all available pages before exploring further.
kirograph_context and kirograph_impact results, without the agent needing to re-read source files.
Enabling Memory
AddenableMemory to .kirograph/config.json:
kirograph.db and registers all 16 memory tools with the MCP server.
How It Works
Content arrives
kirograph_mem_store. KiroGraph strips any <private>…</private> blocks, then checks exclude patterns (memoryExcludePatterns).Compression (if caveman mode is on)
content_raw when memoryKeepRaw: true.Deduplication
Symbol linking
qualified_name references in mem_symbol_links.Embedding
nomic-ai/nomic-embed-text-v1.5 by default). Enables natural-language search via kirograph_mem_search.Observation Kinds
Every observation is tagged with akind. Use the kind that best describes the nature of the information:
| Kind | When to use |
|---|---|
decision | An architectural or implementation choice and its rationale |
error | A bug, failure mode, or trap encountered during debugging |
pattern | A recurring implementation pattern worth reinforcing |
architecture | A high-level structural note about the system |
summary | A synthesis of multiple observations (used by Watchmen) |
note | Anything that does not fit the above categories |
MCP Tools
Memory requiresenableMemory: true. The 16 tools add approximately ~746 tokens of tool descriptions to the model context.
kirograph_mem_store — store an observation
kirograph_mem_store — store an observation
| Parameter | Type | Default | Description |
|---|---|---|---|
content | string | required | Observation text |
kind | string | note | decision, error, pattern, architecture, summary, note |
topicKey | string | — | Stable slug for deduplication, e.g. architecture/auth-model |
reviewAfter | number | — | Unix timestamp — surfaces observation in kirograph_mem_review after this date |
projectPath | string | cwd | Project root path |
{ "id": "obs_abc123" }. When Watchmen is enabled and the threshold is reached, the response also includes watchmenReady: true with synthesis instructions.kirograph_mem_search — search observations
kirograph_mem_search — search observations
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | required | Natural-language search query |
kind | string | — | Filter by kind |
limit | number | 10 | Max results |
sessionId | string | — | Narrow to a specific session |
projectPath | string | cwd | Project root path |
kirograph_mem_timeline — chronological view
kirograph_mem_timeline — chronological view
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 5 | Number of sessions to show |
sessionId | string | — | Show observations for a specific session only |
projectPath | string | cwd | Project root path |
kirograph_mem_status — memory stats
kirograph_mem_status — memory stats
kirograph_mem_compare — conflict detection
kirograph_mem_compare — conflict detection
topic_key values. Creates a pending relation for agent review.| Parameter | Type | Default | Description |
|---|---|---|---|
observationA | string | required | First observation ID or topic_key |
observationB | string | required | Second observation ID or topic_key |
relation | string | required | supersedes, conflicts_with, compatible, scoped, related, not_conflict |
confidence | number | 1.0 | Confidence score 0.0–1.0 |
reason | string | — | Explanation for the relation |
kirograph_mem_judge — finalize a conflict
kirograph_mem_judge — finalize a conflict
judgment_status from pending to judged.| Parameter | Type | Default | Description |
|---|---|---|---|
relationId | string | required | Relation ID from kirograph_mem_compare |
relation | string | required | Final relation type |
confidence | number | required | Final confidence 0.0–1.0 |
reason | string | — | Reasoning for the judgment |
kirograph_mem_review — stale observations
kirograph_mem_review — stale observations
review_after date — stale facts the agent should re-evaluate, update, or supersede. Reports days overdue per observation.Other memory tools
Other memory tools
| Tool | Purpose |
|---|---|
kirograph_mem_mark_reviewed | Clear an observation’s review_after date |
kirograph_mem_capture | Extract structured observations from a freeform text block with ## Key Learnings, ## Decisions, etc. sections |
kirograph_mem_save_prompt | Save the current user prompt to session memory |
kirograph_mem_suggest_topic_key | Get a deterministic slug for an observation based on kind + title |
kirograph_mem_conflicts_scan | Scan recent observations for potential conflicts via FTS similarity |
kirograph_mem_conflicts_list | List pending conflict relations |
kirograph_mem_conflicts_ignore | Dismiss a pending conflict relation |
kirograph_mem_lint | Check for stale links, model mismatches, and stale sessions |
kirograph_mem_prune | Remove observations older than a given duration |
Practical Workflow
The following shows a typical session cycle — an agent debugs a problem, stores what it learned, and future sessions benefit automatically.Session 1: Agent debugs a rate-limit issue
RateLimiter.check, the agent stores its finding:RateLimiter.check symbol and embeds it.Session 2: Agent works on AuthController
kirograph_context for a task touching the auth flow. RateLimiter.check appears in the impact graph. KiroGraph automatically appends the stored observation to the context result — no extra tool call needed.Watchmen — Automatic Brief Synthesis
Watchmen is an opt-in synthesis layer that accumulates memory observations and automatically distills them into workspace briefs and skill files. It requiresenableMemory: true.
kirograph_mem_store call, KiroGraph counts non-summary observations since the last kind: 'summary'. When the count reaches watchmenThreshold, the response includes a watchmenReady: true flag with targetFiles, skillTargetDir, and synthesis instructions.
Synthesis modes:
local (default)
onnx-community/gemma-4-E4B-it-ONNX on-device via @huggingface/transformers. No API key, no external calls. Works for all AI tools.agent (Kiro only)
askAgent hook. Higher output quality but consumes API tokens. Requires Kiro IDE.- Workspace brief — a
## KiroGraph Watchmensection upserted into the tool’s project memory file (.kiro/steering/kirograph-watchmen.mdfor Kiro,CLAUDE.mdfor Claude Code,AGENTS.mdfor others). - Skill files (Kiro only) — individual
inclusion: manualsteering files at.kiro/steering/watchmen-<slug>.mdfor recurring procedures. Files from previous synthesis runs are pruned when patterns change. - Summary observation — a
kind: 'summary'observation stored to reset the counter.
Hook-Based Capture
KiroGraph installs akirograph-mem-capture.kiro.hook that fires at agentStop. It prompts the agent to review the session and store structured observations using ## Key Learnings, ## Decisions, ## Observations, or ## Key Changes headings — which kirograph_mem_capture then parses into typed observations automatically.
This means observations are stored at the end of every session with no manual intervention, building up the memory store progressively over time.
Config Reference
| Field | Type | Default | Description |
|---|---|---|---|
enableMemory | boolean | false | Enable persistent cross-session memory |
memorySearchAlpha | number | 0.5 | Blend weight for hybrid search (0 = FTS only, 1 = vector only) |
memoryKeepRaw | boolean | true | Store original text alongside compressed version |
memoryMaxObservations | number | 10000 | Max observations before auto-pruning oldest |
memorySessionTimeout | number | 3600000 | Session timeout in ms (1 hour) |
memoryContextLimit | number | 3 | Max observations surfaced in kirograph_context |
memoryContextThreshold | number | 0.3 | Min relevance score to surface in context |
memoryExcludePatterns | string[] | [] | Glob patterns for files to exclude from symbol linking |
enableWatchmen | boolean | false | Enable Watchmen brief synthesis (requires enableMemory) |
watchmenThreshold | number | 5 | Observations since last synthesis before watchmenReady fires |
watchmenSynthesisMode | string | local | local (on-device model) or agent (Kiro only) |
watchmenLocalModel | string | onnx-community/gemma-4-E4B-it-ONNX | HuggingFace model ID for local synthesis |
