Skip to content

Graphorin API reference v0.15.1


Graphorin API reference / @graphorin/memory / tools

tools

Eleven memory tools registered with @graphorin/tools by the createMemory() facade - plus an opt-in twelfth, deep_recall, appended only when iterative retrieval is configured. Each factory takes a MemoryToolDeps bundle so consumers can scope the tool surface (per-tier ACL, scope resolver, etc.) without rebuilding the underlying memory facade.

Tool PROFILES: 'full' (the canonical stable-order set), 'interactive' (read-only - the front-line conversational agent cannot write memory by construction; curation belongs to the reviser), and 'reviser' (the full read+write surface, semantically reserved for the sleep-time curation agent). The single-writer split mirrors the channels-wave discipline: interactive agents observe, the reviser mutates.

Interfaces

InterfaceDescription
BlockAppendInputExplicit interfaces instead of z.infer<typeof schema> - the inferred aliases baked concrete v3 zod object generics into the published d.ts, which do not typecheck under a zod@4 consumer. Interface<->schema equality is pinned by type tests.
BlockAppendOutput-
BlockReplaceInput-
BlockReplaceOutput-
BlockRethinkInput-
BlockRethinkOutput-
BuildMemoryToolsOptionsOptions for buildMemoryTools.
ConversationSearchInput-
ConversationSearchOutput-
DeepRecallHit-
DeepRecallInput-
DeepRecallOutput-
FactForgetInput-
FactForgetOutput-
FactHistoryEntry-
FactHistoryInput-
FactHistoryOutput-
FactRememberInputExplicit interfaces instead of z.infer<typeof schema> - the inferred aliases baked concrete v3 zod object generics into the published d.ts, which do not typecheck under a zod@4 consumer. Interface<->schema equality is pinned by type tests. Optionals carry `
FactRememberOutput-
FactSearchHit-
FactSearchInput-
FactSearchOutput-
FactSupersedeInput-
FactSupersedeOutput-
FactValidateInput-
FactValidateOutput-
RecallEpisodeHit-
RecallEpisodesInputExplicit interfaces (see fact-tools.ts) - no zod generics in d.ts.
RecallEpisodesOutput-
RunbookProcedureHit-
RunbookSearchInputExplicit interfaces (see fact-tools.ts) - no zod generics in d.ts.
RunbookSearchOutput-

Type Aliases

Type AliasDescription
MemoryToolProfileMemory tool profile: which slice of the canonical set an agent receives. 'interactive' is read-only by construction.

Variables

VariableDescription
MEMORY_TOOL_PROFILESThe valid profile values (runtime validation source).

Functions

FunctionDescription
buildMemoryToolsBuild the canonical memory-tool array for a profile. Order is stable for 'full' / 'reviser' - consumers can rely on the indices for snapshot tests. fact_history and fact_validate are appended last so the original nine indices are unchanged. With { includeDeepRecall: true } the gated deep_recall tool is appended after the stable eleven; runbook_search after it. Both gated appendices are reads, so they appear in every profile.
createRunbookSearchToolrunbook_search - find validated procedures matching a task description. Quarantined (unvalidated induced) procedures never surface here: they must not drive actions until validated.

References

createBlockAppendTool

Re-exports createBlockAppendTool


createBlockReplaceTool

Re-exports createBlockReplaceTool


createBlockRethinkTool

Re-exports createBlockRethinkTool


createConversationSearchTool

Re-exports createConversationSearchTool


createDeepRecallTool

Re-exports createDeepRecallTool


createFactForgetTool

Re-exports createFactForgetTool


createFactHistoryTool

Re-exports createFactHistoryTool


createFactRememberTool

Re-exports createFactRememberTool


createFactSearchTool

Re-exports createFactSearchTool


createFactSupersedeTool

Re-exports createFactSupersedeTool


createFactValidateTool

Re-exports createFactValidateTool


createRecallEpisodesTool

Re-exports createRecallEpisodesTool


MemoryToolDeps

Re-exports MemoryToolDeps


ScopeResolver

Re-exports ScopeResolver