Engram
v0.5.0Cognitive memory for coding agents: hybrid recall, remember/forget, knowledge graph, nightly dreams.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
recall
Retrieve relevant memories from past Claude Code conversations and extracted knowledge. Uses hybrid semantic + keyword search with token-budgeted output across episodic and semantic memory stores. Search BEFORE every task to recover decisions, solutions, and context. Time-scope with after/before (YYYY-MM-DD) or a natural-language dateHint ("last week", "in March", "this day last year", "on this day"); dateBasis picks whether dates mean when a memory was filed or when the events it describes happened. The applied window is echoed in <date_filter>. Retrieval records access bookkeeping on the ret…
| Parameter | Type | Description |
|---|---|---|
query * | string | |
after | string | Only results after this date (YYYY-MM-DD) |
before | string | Only results before this date (YYYY-MM-DD; that day is excluded) |
budget | integer | Max tokens in response |
dateBasis | string | What the dates refer to: 'filed' = when the memory was recorded (memories IN March); 'event' = when the described events happened, via source-exchange timestamps (memories ABOUT March). Episodic resul… |
dateHint | string | Natural-language date window, resolved in UTC: today, yesterday, this/last week|month|year, N days|weeks|months ago, this day last year, in <month>, <month> <year>, since <phrase>, before <phrase>, on… |
depth | string | |
read_scopes | array | Explicit scopes to read from (e.g. ["global", "hermes:career"]). Overrides ENGRAM_READ_SCOPES for this call only. |
reinforce | boolean | Reinforce the semantic memories this call returns (FSRS: bumps access_count/last_accessed and grows stability). Set false for read-only or diagnostic callers that must not mutate the store. |
scope | string | Tenant identity for this call (e.g. "hermes:career"); reads default to global + this scope. Overrides ENGRAM_SCOPE for this call only. |
sources | array | Which memory stores to search. Defaults to episodic and semantic. |
remember
Store a fact, preference, decision, or other knowledge as a semantic memory. Use this to explicitly record important information that should persist across conversations. Automatically deduplicates against existing memories.
| Parameter | Type | Description |
|---|---|---|
content * | string | The fact, preference, or knowledge to remember |
context | string | Provenance note stored alongside the memory (e.g. what produced this write) |
importance | number | Importance score (0-1) |
scope | string | Tenant scope to stamp on this write (e.g. "hermes:career"). Overrides the ENGRAM_SCOPE env default for this call only. |
source | string | Source of this memory (user, dream, rlm, import, hermes-mirror) |
type | string | Type of memory |
remember_batch
Store multiple facts, preferences, decisions, or other knowledge items as semantic memories in a single call. Supports up to 50 items per batch. Automatically deduplicates against existing memories and within the batch. Use for bulk ingestion from RLM agents or dream pipeline. Optionally link each memory to existing graph entities via relates_to_entities.
| Parameter | Type | Description |
|---|---|---|
memories * | array | Array of memories to store (max 50) |
scope | string | Tenant scope to stamp on this write (e.g. "hermes:career"). Overrides the ENGRAM_SCOPE env default for this call only. |
show
Read full conversations to extract detailed context after finding relevant results with recall. Use startLine/endLine pagination for large conversations.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
endLine | integer | |
startLine | integer |
explore
Explore connections in the knowledge graph starting from an entity. Shows what a concept, tool, project, or technology is connected to. Use after recall to understand how things relate to each other.
| Parameter | Type | Description |
|---|---|---|
entity * | string | Entity name to explore (e.g., 'TypeScript', 'engram', 'SQLite') |
budget | integer | Max tokens in response |
depth | integer | Number of hops to traverse (1-3) |
limit | integer | Max neighbors to return, sorted by weight (1-50) |
read_scopes | array | Explicit scopes to read from (e.g. ["global", "hermes:career"]). Overrides ENGRAM_READ_SCOPES for this call only (#25). |
relationship_types | array | Filter by relationship types |
scope | string | Tenant identity for this call (e.g. "hermes:career"); derives the read default global + own |
reflect
View emergent patterns and structure in the knowledge graph. Shows topic communities with meaningful names, bridge entities connecting different domains, temporal patterns, and graph health. Use after working on a topic to understand how it connects to other knowledge domains.
| Parameter | Type | Description |
|---|---|---|
mode | string | What to reflect on. |
refresh | boolean | Force a fresh analysis instead of using cached results. |
recall_session
Create or continue an iterative search session for multi-step memory exploration. Omit session_id to start a new session; provide session_id to refine with a new query. Sessions track accumulated results and remaining token budget. Use recall_drill to expand individual results. Retrieval records access bookkeeping on the returned memories (access_count, last_accessed, stability); pass reinforce: false to opt out.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query |
budget | integer | Max total token budget for this session |
read_scopes | array | Explicit scopes to read from (e.g. ["global", "hermes:career"]). Overrides ENGRAM_READ_SCOPES for this call only. |
reinforce | boolean | Reinforce the semantic memories this call returns (FSRS: bumps access_count/last_accessed and grows stability). Set false for read-only or diagnostic callers that must not mutate the store. |
scope | string | Tenant identity for this call (e.g. "hermes:career"); reads default to global + this scope. Overrides ENGRAM_SCOPE for this call only. |
session_id | string | Existing session ID to refine (omit to create new) |
sources | array | Which memory stores to search |
recall_drill
Drill into a specific result from a recall session to get expanded context. For episodic results: shows surrounding conversation exchanges. For semantic results: shows source conversation segments. For graph results: shows entity with full relationship neighborhood. Retrieval records access bookkeeping on the returned memories (access_count, last_accessed, stability); pass reinforce: false to opt out.
| Parameter | Type | Description |
|---|---|---|
result_index * | integer | 0-based index into session results |
session_id * | string | Session ID from recall_session |
reinforce | boolean | Reinforce the semantic memories this call returns (FSRS: bumps access_count/last_accessed and grows stability). Set false for read-only or diagnostic callers that must not mutate the store. |
explore_selective
Explore the knowledge graph selectively by expanding only branches relevant to specified criteria. Unlike explore (fixed-depth BFS), this uses embedding similarity to prune irrelevant neighbors and recursively follows only relevant paths. Use when you want to find connections related to a specific topic or question.
| Parameter | Type | Description |
|---|---|---|
criteria * | string | What makes a neighbor relevant (e.g., 'build tooling', 'performance optimization') |
entity * | string | Starting entity name (e.g., 'TypeScript', 'engram', 'SQLite') |
max_depth | integer | Maximum traversal depth (1-5) |
max_nodes | integer | Safety cap on total nodes returned (1-50) |
read_scopes | array | Explicit scopes to read from (e.g. ["global", "hermes:career"]). Overrides ENGRAM_READ_SCOPES for this call only (#25). |
relationship_types | array | Filter by relationship types |
scope | string | Tenant identity for this call (e.g. "hermes:career"); derives the read default global + own |
fetch_snippets
Fetch multiple line ranges from a single file in one call. Ranges are merged when overlapping, padded with optional context lines, and joined with gap markers. More efficient than multiple show calls for targeted code reading.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
ranges * | array | Line ranges to fetch (max 20) |
context | integer | Number of padding lines around each range (0-50) |
session_id | string | Optional session ID for token budget tracking |
scan_file
Scan a file server-side with regex patterns and return structured matches with surrounding context. The file is read on the server and never loaded into conversation context. Supports multiple patterns, context windows, overlap deduplication, and function context detection.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to the file to scan |
patterns * | array | Regex patterns to search for (max 10) |
context_lines | integer | Lines of context before and after each match (0-10) |
deduplicate_overlaps | boolean | Merge overlapping context windows to avoid duplicate lines |
group_by | string | Order results by file location or grouped by pattern |
max_matches | integer | Maximum matches to return (1-500) |
session_id | string | Optional session ID for token budget tracking |
index_file_structure
Parse a source file to extract function, class, and module definitions, then index them as entities in the knowledge graph with 'contains' relationships. Enables RLM to discover file contents without reading the full file.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to the source file to index |
commitments
List tracked commitments — first-person promises, intentions and follow-ups owed by others, extracted nightly from conversations ("mention once, never dropped"). Default: pending items, overdue first, then by due date, then newest. Use include_due_within_days to surface only what is due soon or overdue.
| Parameter | Type | Description |
|---|---|---|
budget | integer | Token budget for the XML response |
include_due_within_days | number | Only items with a due date within this many days (overdue items included) |
limit | integer | Max items |
read_scopes | array | Explicit scopes to read from (e.g. ["global", "hermes:career"]). Overrides ENGRAM_READ_SCOPES for this call only (#25). |
scope | string | Tenant identity for this call (e.g. "hermes:career"); derives the read default global + own |
status | string | Lifecycle state to list |
commitments_update
Resolve a tracked commitment once the user confirms it is handled: mark it done, dropped, or superseded by another commitment. Accepts the full id or a unique prefix (6+ characters).
| Parameter | Type | Description |
|---|---|---|
id * | string | Commitment id (from the commitments tool) or a unique prefix |
status * | string | Resolution |
superseded_by | string | Id of the commitment that replaces this one (required when status is superseded) |
ingest_turn
Record one user/assistant turn of an external agent conversation (e.g. a Hermes profile) in engram's episodic layer so it becomes searchable and feeds the nightly dream extraction. Idempotent: re-sending the same session_id + turn_index updates the turn in place. The conversation carries the given tenant scope, and every memory later extracted from it inherits that scope. An optional author {id, name, is_bot} is stored on the turn.
| Parameter | Type | Description |
|---|---|---|
assistant_text * | string | The assistant's reply for this turn |
scope * | string | Tenant scope of the conversation (e.g. "hermes:career") |
session_id * | string | Caller's conversation/session identifier (stable across turns) |
turn_index * | integer | 0-based position of this turn within the session |
user_text * | string | The user's message for this turn |
author | object | Who authored the user side of the turn (stored as JSON on the exchange) |
source | string | Platform/source label; part of the conversation key (default "hermes") |
timestamp | string | ISO-8601 time of the turn (default: now) |
tool_calls | array | Tools invoked during the turn (input/output are truncated to 1000 chars) |
forget
Remove a memory the user says is wrong or stale. Pass the memory_id from a recall result (<semantic id="…">) to forget it in one call. Pass query instead to search for candidates: the tool returns matching memories with their ids and forgets nothing unless confirm is true AND exactly one memory matches (a single result, or a single result whose content equals the query). The memory is soft-deleted (kept for ENGRAM_FORGET_RETENTION_DAYS, then purged by the dream pipeline), drops out of every recall path immediately, is logged in the change log with this client's name, and will not be re-extra…
| Parameter | Type | Description |
|---|---|---|
confirm | boolean | In query mode: forget the match when exactly one memory matches |
hard | boolean | Delete the row outright instead of the soft delete + retention purge |
memory_id | string | Id of the memory to forget (from recall's <semantic id>), or a unique prefix of 6+ characters |
query | string | Find candidate memories instead of naming one; returns ids, deletes nothing unless confirm + a single match |
read_scopes | array | Scopes this call may act on (e.g. ["global", "hermes:career"]). Overrides ENGRAM_READ_SCOPES for this call only. |
scope | string | Tenant identity for this call (e.g. "hermes:career"); reads default to global + this scope. "global" acts on a memory in any scope. |