Skip to main content

Documentation 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’s memory subsystem gives AI agents a persistent, queryable store of project observations — decisions made, errors encountered, architectural patterns discovered, and session summaries produced. Unlike conversation history, memory survives across sessions and is stored in the same SQLite database as the code graph, enabling symbol-linked retrieval. All tools in this group require enableMemory: true. Watchmen synthesis tools additionally require enableWatchmen: true.
Memory is stored per-project in .kirograph/memory.db (or co-located with the main graph database). Observations are optionally embedded for semantic search. If your embedding model changes, run kirograph mem reembed to update stale vectors.

Core Memory Tools

kirograph_mem_store

Store an observation in project memory. Duplicate content is silently ignored — re-storing the same text returns the existing ID.
content
string
required
Observation text. Should be factual and specific.
kind
string
default:"note"
Observation kind. Options: decision, error, pattern, architecture, summary, note.
topicKey
string
Stable semantic key for this observation (e.g. "architecture/auth-model"). Enables addressing by concept across sessions.
reviewAfter
number
Epoch millisecond timestamp after which this observation should be reviewed. Observations past this date appear in kirograph_mem_review.
projectPath
string
default:"cwd"
Project root path.
Response: Returns a plain text string confirming the stored observation ID and kind:
Stored observation obs_abc123 [decision]
Returns "Observation already exists (duplicate content)." if the same text was stored before.
When enableWatchmen: true and the observation count since the last kind: 'summary' crosses the configured threshold, the Watchmen hook (installed as a Kiro agentStop hook) calls kirograph_watchmen_status and kirograph_watchmen_synthesize to produce a workspace brief automatically. The kirograph_mem_store MCP tool itself always returns a plain string — Watchmen orchestration runs separately.

Search project memory for past decisions, errors, patterns, and context. Results are ranked by semantic similarity if embeddings are enabled, otherwise by FTS score.
query
string
required
Natural language search query.
kind
string
Filter by observation kind. Options: decision, error, pattern, architecture, summary, note.
limit
number
default:"10"
Maximum results to return.
sessionId
string
Filter observations to a specific session.
asOf
number
Query facts valid at this timestamp (epoch ms). Filters out expired or superseded observations.
projectPath
string
default:"cwd"
Project root path.
{
  "tool": "kirograph_mem_search",
  "arguments": {
    "query": "authentication architecture decisions",
    "kind": "decision",
    "limit": 5
  }
}

kirograph_mem_timeline

List recent sessions and their observations chronologically. Useful for reconstructing what happened in previous agent sessions.
limit
number
default:"5"
Number of sessions to show.
sessionId
string
Show observations for a specific session only.
projectPath
string
default:"cwd"
Project root path.

kirograph_mem_status

Memory subsystem health check. Returns session count, total observations, embedding coverage, model mismatch detection, relation count, and pending conflicts.
projectPath
string
default:"cwd"
Project root path.

kirograph_mem_capture

Extract and store structured learnings from a freeform text block. Looks for ## Key Learnings, ## Observations, ## Decisions, and ## Key Changes sections and saves each bullet point as a separate typed observation. Pure structural parser — no LLM required.
content
string
required
Text block containing structured sections with bullet-point observations.
projectPath
string
default:"cwd"
Project root path.

kirograph_mem_save_prompt

Save the current user prompt to session memory for context reconstruction in future sessions.
content
string
required
Prompt content to save.
projectPath
string
default:"cwd"
Project root path.

Review and Maintenance Tools

kirograph_mem_review

List observations past their review_after date — stale facts the agent should re-evaluate, update, or supersede. Reports how many days overdue each observation is.
limit
number
default:"20"
Maximum results to return.
projectPath
string
default:"cwd"
Project root path.

kirograph_mem_mark_reviewed

Mark an observation as reviewed. Clears its review_after date, removing it from the review queue returned by kirograph_mem_review.
id
string
required
Observation ID to mark as reviewed.
projectPath
string
default:"cwd"
Project root path.

kirograph_mem_prune

Remove memory observations older than a given duration. Use periodically to keep the memory store lean and reduce embedding overhead.
olderThan
string
default:"90d"
Duration threshold. Accepts h (hours), d (days), w (weeks), m (months) — e.g. "30d", "6m", "2w".
projectPath
string
default:"cwd"
Project root path.

kirograph_mem_lint

Memory health check: stale symbol links, model mismatch detection, and orphaned sessions. Optionally auto-removes stale links.
fix
boolean
default:"false"
When true, automatically remove stale symbol links.
projectPath
string
default:"cwd"
Project root path.

kirograph_mem_suggest_topic_key

Suggest a stable topic_key for an observation based on its kind and content. Returns a deterministic slug like "architecture/auth-model" that can be used to address the observation by concept rather than by ID.
kind
string
required
Observation kind. Options: decision, error, pattern, architecture, summary, note.
title
string
required
Short title or first sentence of the observation.
projectPath
string
default:"cwd"
Project root path.

Conflict Management Tools

Memory relations let the agent model how observations relate to one another — when a new decision supersedes an old one, when two observations conflict, or when they are compatible. The workflow is: scancomparejudge (or ignore).

kirograph_mem_conflicts_scan

Scan recent observations for potential conflicts using FTS similarity. Returns candidate pairs that may need a relation established via kirograph_mem_compare.
limit
number
default:"50"
Maximum observations to scan.
projectPath
string
default:"cwd"
Project root path.

kirograph_mem_compare

Establish a typed relation between two observations. Accepts observation IDs or topic_key values. Creates a pending relation for agent review via kirograph_mem_judge.
observationA
string
required
First observation ID or topic_key.
observationB
string
required
Second observation ID or topic_key.
relation
string
required
Relation type. Options: supersedes, conflicts_with, compatible, scoped, related, not_conflict.
confidence
number
default:"1.0"
Confidence score from 0.0 to 1.0.
reason
string
Explanation for the relation.
evidence
string
Supporting evidence text.
projectPath
string
default:"cwd"
Project root path.

kirograph_mem_conflicts_list

List pending conflict relations that need resolution. Each entry shows the relation ID, relation type, the two observation IDs involved, and the reason if provided.
limit
number
default:"20"
Maximum results to return.
projectPath
string
default:"cwd"
Project root path.

kirograph_mem_judge

Finalize a pending conflict relation — confirm, revise, or reclassify it. Changes the judgment_status from pending to judged.
relationId
string
required
Relation ID from kirograph_mem_compare or kirograph_mem_conflicts_list.
relation
string
required
Final relation type after judgment.
confidence
number
required
Final confidence score (0.0–1.0).
reason
string
Reasoning for the judgment.
evidence
string
Supporting evidence text.
projectPath
string
default:"cwd"
Project root path.

kirograph_mem_conflicts_ignore

Dismiss a pending conflict relation as not relevant. The relation is marked ignored and will no longer appear in kirograph_mem_conflicts_list.
relationId
string
required
Relation ID to dismiss (from kirograph_mem_conflicts_list).
projectPath
string
default:"cwd"
Project root path.

Watchmen Tools (require enableMemory: true + enableWatchmen: true)

Watchmen monitors observation accumulation and prompts the agent to synthesize a workspace brief when a threshold is reached. The brief is written to configured target files (e.g. .kiro/steering/workspace.md) and individual skill files for recurring procedures.

kirograph_watchmen_status

Show Watchmen status: pending observation count since last synthesis, the synthesis threshold, and which brief files would be written on next synthesis.
projectPath
string
default:"cwd"
Project root path.

kirograph_watchmen_synthesize

Run Watchmen synthesis immediately using the local model (requires watchmenSynthesisMode: "local" in config). Processes pending observations into a workspace brief without waiting for the threshold to be reached.
force
boolean
default:"false"
Run even if the pending observation count is below the threshold.
projectPath
string
default:"cwd"
Project root path.

kirograph_watchmen_reset

Reset the Watchmen synthesis counter by storing a kind: 'summary' observation, without running full synthesis. Use when you want to reset the counter after manually writing the workspace brief.
projectPath
string
default:"cwd"
Project root path.

Typical Memory Workflow

1

Store observations throughout a session

Call kirograph_mem_store with appropriate kind values as you make decisions, encounter errors, or discover patterns.
2

Search at the start of related tasks

Call kirograph_mem_search at the beginning of a new session or task to surface relevant past observations before reading code.
3

Scan and resolve conflicts periodically

Run kirograph_mem_conflicts_scan periodically. For each candidate pair, call kirograph_mem_compare then kirograph_mem_judge to establish the correct relation.
4

Review stale facts

Run kirograph_mem_review to find observations past their review_after date. Update, supersede, or mark them reviewed.
5

Synthesize when Watchmen fires

When kirograph_mem_store returns watchmenReady: true, search memory for each kind, write the workspace brief, and store a kind: 'summary' to reset the counter.
{
  "tool": "kirograph_mem_store",
  "arguments": {
    "content": "Decided to use Redis for session storage instead of JWT cookies — supports revocation and multi-device logout.",
    "kind": "decision",
    "topicKey": "architecture/session-storage",
    "reviewAfter": 1767225600000
  }
}

Build docs developers (and LLMs) love