Skip to content

Kumiho memory tools

Reference for every kumiho_memory_* MCP tool: engage, reflect, consolidate, recall, store, and more.

When [kumiho].enabled = true, Revka injects the Kumiho MCP sidecar into every non-internal agent, and the sidecar publishes a set of kumiho_memory_* tools into that agent’s tool catalog. These are the tools an agent calls to read from and write to the graph-native memory backend during its own LLM loop. This page is the per-tool reference: what each tool does, its parameters, its return shape, and when to reach for it.

Read Memory overview for the conceptual split between the no-op runtime binding and Kumiho, Kumiho setup to install the sidecar and supply auth tokens, and Kumiho graph memory for the agent-loop walkthrough. For the underlying data model — spaces, items, revisions, krefs, and edges — see Graph model: spaces, items & provenance.

Almost every Revka agent loop has the same shape: engage memory before responding, reflect after responding. Two tools carry that pattern, and the rest of the tools on this page are either deeper variants of them or maintenance operations.

  1. Before responding, call kumiho_memory_engage once with a query derived from the user’s current message. It recalls relevant memories and returns a prompt-injectable context string plus source_krefs.
  2. After responding, call kumiho_memory_reflect once with your response text and any structured captures. Pass the source_krefs from engage so new captures link back to what inspired them with DERIVED_FROM edges.
user message
kumiho_memory_engage ──► context + source_krefs
(agent reasons, responds)
kumiho_memory_reflect ──► captures stored, DERIVED_FROM edges created

When the Operator MCP is running, it exposes its own set of memory tools that mirror the sidecar tools above, so the operator itself (not just spawned sub-agents) can engage with and write to the graph. These are named without the kumiho_ prefix — memory_engage, memory_reflect, and so on — and most share the sidecar parameters. Two limits are applied operator-side from config:

  • min_score is floored by [memory].min_relevance_score.
  • limit is capped by [kumiho].memory_retrieval_limit (default 3).
Operator toolMirrors / purpose
memory_engageRecall + context build → { context, results, source_krefs, count }.
memory_reflectStore structured captures with provenance edges.
memory_retrieveSemantic search.
memory_searchStructured search by context_filter, name_filter, kind_filter.
memory_fulltextFull-text keyword search.
memory_get_itemFetch an item by kref.
memory_resolve_krefResolve a kref to concrete identifiers.
memory_get_revision_by_tagGet a revision by tag (default "published").
memory_storeStore a memory bundle with auto-stack.
memory_graphAggregate nodes + edges for force-graph visualization.

The rest of this page documents the sidecar kumiho_memory_* tools in detail. The operator-side equivalents accept the same core arguments unless noted.


Check memory before responding. Combines recall and context-building into one call: it searches the graph, builds a context summary, and returns the source krefs you pass on to reflect.

Parameters

ParameterTypeDefaultMeaning
querystring— (required)Natural-language query derived from the user’s current message.
limitnumber5Max results to return.
graph_augmentedbooleanfalseEnable graph-augmented recall for indirect or chain-of-decision questions.
space_pathsstring[]Restrict the search to these space paths (e.g. ["CognitiveMemory/Skills"]).
memory_typesstring[]Filter by memory type (e.g. ["decision", "preference"]).
min_scorenumber (0–1)0Drop results scoring below this threshold before building context.
recall_mode"full" | "summarized""summarized"summarized returns title + summary only; full includes artifact content.

Returns

  • context — a pre-built, prompt-injectable natural-language summary.
  • results — the raw memories with metadata (titles, types, created_at).
  • source_krefs — opaque identifiers to pass to the matching reflect.

Example

{
"tool": "kumiho_memory_engage",
"args": {
"query": "transport choice for the operator-daemon channel",
"graph_augmented": false,
"limit": 5,
"space_paths": ["Revka/AgentPool", "CognitiveMemory/Skills"]
}
}

Skip engage when the answer is already visible in the conversation — engaging unnecessarily wastes tokens and pollutes the graph with low-signal queries.


Capture what matters after responding. A single call buffers the assistant response for session continuity, stores each structured capture as a graph memory, and (by default) runs edge discovery against existing memories. The agent’s own LLM identifies what to remember — no external API key is required.

Parameters

ParameterTypeDefaultMeaning
session_idstring— (required)Session identifier.
responsestring— (required)The assistant response text to buffer.
capturesobject[]Structured facts to store (see below). Omit or pass [] for trivial exchanges — the response is still buffered.
source_krefsstring[]Krefs from engage results — creates DERIVED_FROM edges to the source memories.
space_pathstringDefault space path for captures without their own space_hint.
discover_edgesbooleantrueRun edge discovery on stored captures. Gracefully skipped if no server-side LLM is available.

Each entry in captures has these fields:

FieldTypeMeaning
typestring— (required) Capture type: decision, preference, fact, correction, architecture, implementation, synthesis, reflection, summary, skill.
titlestring— (required) Short title using absolute dates (e.g. "Chose gRPC on Mar 27").
contentstring— (required) The content to store.
space_hintstringPer-capture space override; wins over the top-level space_path.
tagsstring[]Classification tags.

Example

{
"tool": "kumiho_memory_reflect",
"args": {
"session_id": "sess-2026-06-18-001",
"response": "<your response text>",
"captures": [
{
"type": "decision",
"title": "Chose gRPC over REST on Jun 18",
"content": "Picked gRPC for the operator <-> daemon channel for bidirectional streaming; REST was rejected as backpressure-blind.",
"space_hint": "Revka/Plans/transport"
}
],
"source_krefs": ["kref://Revka/AgentPool/transport?r=4"],
"discover_edges": true
}
}

Search long-term memories by semantic query. Lighter than engage — it returns matching memories without buffering anything or building source krefs for a reflect round-trip. Shares the 5-second dedup guard with engage.

Parameters

ParameterTypeDefaultMeaning
querystring— (required)Natural-language search query.
limitnumber5Max results to return.
graph_augmentedbooleanfalseMulti-query reformulation + edge traversal to find connected memories vector search misses. Requires the KUMIHO_GRAPH_AUGMENTED_RECALL=1 env var.
space_pathsstring[]Restrict to these space paths.
memory_typesstring[]Filter by memory type.
min_scorenumber (0–1)0Drop results below this score.
recall_mode"full" | "summarized""summarized"full includes raw artifact content; summarized returns title + summary only.

Example

{
"tool": "kumiho_memory_recall",
"args": { "query": "gRPC decision", "limit": 5 }
}

Retrieve memory using Google-like fuzzy search with relevance ranking and automatic typo tolerance. Falls back to bundle and pattern search when needed. Use this when you want forgiving keyword-style matching rather than the strict semantic recall of engage/recall.

Parameters

ParameterTypeDefaultMeaning
querystringNatural-language query; supports fuzzy multi-word matching.
projectstring"CognitiveMemory"Project name.
space_pathsstring[]Restrict to specific space paths.
memory_typesstring[]Filter by memory type (e.g. ["decision", "summary", "error"]).
keywordsstring[]Extra keywords to include in the search.
topicsstring[]Topic names to search for.
bundle_namesstring[]Search within specific bundles.
modestring"search"search (fuzzy), first (oldest by date), or latest.
memory_item_kindstring"conversation"Item kind for memory entries.
include_revision_metadatabooleantrueAlso search revision metadata for deeper matching.
limitnumber5Max results to return.

Full-text fuzzy search across items, ranked by relevance, with automatic typo tolerance. On higher Kumiho tiers it uses hybrid search (fulltext + vector similarity) when scanning revision metadata. Prefer this over a raw item search for natural-language queries.

Parameters

ParameterTypeDefaultMeaning
querystring— (required)Search terms (fuzzy; typos tolerated).
contextstring""Restrict to a kref prefix (e.g. "CognitiveMemory/Skills"). Empty searches all.
kindstring""Exact kind match (e.g. "conversation", "bundle").
limitnumber20Max results to return.
include_deprecatedbooleanfalseInclude soft-deleted items.
include_metadatabooleanfalseInclude full item metadata in results.
include_revision_metadatabooleanfalseAlso search revision tags/metadata (slower, more thorough).
include_artifact_metadatabooleanfalseAlso search artifact names/metadata (slower).

Store a memory entry in one call — it creates or reuses the space, item, revision, artifact, bundle, and edges together. By default it searches for an existing similar item and stacks a new revision rather than creating a duplicate. Use this for direct, structured writes outside the engage/reflect flow.

Parameters (selected)

ParameterTypeDefaultMeaning
user_textstring— (required)The user-side text to store.
assistant_textstringThe assistant-side text.
titlestringItem title.
summarystringItem summary.
memory_typestring"summary"summary, decision, fact, reflection, or error.
projectstring"CognitiveMemory"Project name.
space_pathstringFull taxonomy space path.
space_hintstringShort taxonomy hint when space_path is omitted.
bundle_namestringBundle name (defaults to the topic slug).
tagsstring[]Classification tags.
source_revision_krefsstring[]Source krefs for provenance edges.
edge_typestring"DERIVED_FROM"Edge type for the provenance links.
stack_revisionsbooleantrueWhen true, find a similar item and stack a revision; false always creates a new item.
metadataobjectExtra metadata (string values only).

Ingest a user message into cognitive memory: it buffers the message in the working-memory store, recalls relevant long-term memories, and returns both working memory and long-term context. This is the message-level entry point for agents that drive a full ingest → respond → add_response loop rather than the engage/reflect pattern.

Parameters

ParameterTypeDefaultMeaning
user_idstring— (required)Stable user identifier.
messagestring— (required)The user message text.
session_idstringExisting session ID; auto-generated if omitted.
contextstring"personal"Memory context (e.g. personal, work).
recall_limitnumber5Max long-term memories to recall.
working_memory_limitnumber10Max working-memory messages to return.

Add an assistant response to the session buffer in working memory. Call this after generating a response when you are using the ingest-based loop (it is the lighter counterpart to reflect, which both buffers and captures).

Parameters

ParameterTypeMeaning
session_idstringSession identifier from ingest.
responsestringThe assistant response text.

Store a tool or command execution result as a structured memory. Successful executions are stored as action type; failures as error type. Captured stdout/stderr become artifacts — useful for building an auditable trail of what an agent actually ran.

Parameters

ParameterTypeDefaultMeaning
taskstring— (required)Description of what was executed (e.g. "git push origin main").
statusdone | failed | error | blocked"done"Execution outcome.
exit_codenumberProcess exit code (0 = success).
duration_msnumberExecution duration in milliseconds.
stdoutstringCaptured standard output.
stderrstringCaptured standard error.
toolsstring[]Tool names used.
topicsstring[]Classification topics.
space_hintstringSpace path hint for organisation.

Consolidate a conversation session into long-term memory. The sidecar summarizes the conversation with an LLM, redacts PII, writes a local artifact, stores the summary to the graph, and clears the session’s working memory. Trigger this after roughly 20 exchanges or at session end; Revka’s daemon also runs it automatically on session end, but long-running agents should self-trigger periodically.

Parameters

ParameterTypeMeaning
session_idstringThe session to consolidate.
{
"tool": "kumiho_memory_consolidate",
"args": { "session_id": "sess-2026-06-18-001" }
}

Discover and create edges from a newly stored memory to related existing memories. The server generates “implication queries” — future scenarios in which the memory would be relevant — and links to matching memories. Best run after consolidate or store.

Parameters

ParameterTypeDefaultMeaning
revision_krefstring— (required)The kref of the revision to discover edges for.
summarystring— (required)Summary text used to generate implication queries.
edge_typestring"REFERENCED"Edge type to create.
max_edgesnumber3Max edges to create.
max_queriesnumber5Max implication queries to generate.
min_scorenumber0.3Minimum similarity score for an edge candidate.
space_pathsstring[]Restrict the search; auto-derived from revision_kref if omitted.

Run a Dream State consolidation cycle — Kumiho’s background “sleep” maintenance pass. It replays new events, assesses memories with an LLM, and applies deprecation, tagging, metadata enrichment, and relationship linking across a whole project. This is how a skill-type capture gets refined and how stale memories get retired over time. Use dry_run: true to preview without writing.

Parameters

ParameterTypeDefaultMeaning
projectstring"CognitiveMemory"Kumiho project to process.
dry_runbooleanfalsePreview changes without applying them.
batch_sizenumber20Memories per LLM assessment batch.
max_deprecation_rationumber (0.1–0.9)0.5Max fraction of memories deprecated per run.
allow_published_deprecationbooleanfalseAllow deprecating published items (use with caution).
provideropenai | anthropic | geminienvLLM provider; falls back to KUMIHO_LLM_PROVIDER.
modelstringenvAssessment model; falls back to KUMIHO_LLM_MODEL.
base_urlstringenvOpenAI-compatible base URL; falls back to KUMIHO_LLM_BASE_URL.
api_keystringenvLLM API key; falls back to KUMIHO_LLM_API_KEY.

Beyond the core memory tools, the sidecar exposes the graph primitives you need to verify, inspect, and retire memories. These are most relevant when handling stale recalls (see the caution below).

ToolPurpose
kumiho_resolve_krefResolve a kref URI to a concrete file location for an artifact or a revision’s default artifact.
kumiho_get_edgesGet a revision’s edges, filterable by direction (outgoing / incoming / both) and edge_type.
kumiho_get_revision_by_tagFetch a revision by tag (default "published").
kumiho_deprecate_itemSet an item’s deprecated status; deprecated items are hidden from searches. Use deprecated: false to restore.

For the full item / revision / edge / bundle / artifact CRUD surface and the kref format (kref://space/item?r=N), see Graph model: spaces, items & provenance and the Memory graph & Asset Browser API.