@nhtio/adk/batteries/tools/memory
Pre-constructed CRUD tools for model-visible ADK memory management.
Remarks
Pre-constructed CRUD tools that expose the ADK's @nhtio/adk!Memory surface to the model. Each tool delegates to the corresponding callback on the active @nhtio/adk!DispatchContext (fetchMemories, storeMemory, mutateMemory, deleteMemory) — the persistence layer is whatever the consumer wired into the runner.
Memory entries carry agent-internal confidence / importance scores and are rendered through the LLM battery's recall-tier envelope. Letting the model author and curate its own memories is the canonical use case for these tools; deployers who do not want the model to mutate memory should simply not register the relevant tools.
Output is JSON for every tool so consumers can parse the result without re-tokenising — the artifact constructor is set to @nhtio/adk!SpooledJsonArtifact.
Tools:
- listMemoriesTool — read-only list of every memory currently held by the context.
- storeMemoryTool — create a new memory (auto-generates
id/createdAt/updatedAtunless explicit values are supplied). - updateMemoryTool — replace an existing memory by
id. BumpsupdatedAt. - deleteMemoryTool — remove a memory by
id.
Variables
| Variable | Description |
|---|---|
| deleteMemoryTool | Remove an existing @nhtio/adk!Memory by id. |
| listMemoriesTool | List every memory currently held by the active execution context. |
| memoryTools | Convenience tuple of every memory CRUD tool. Spread into a @nhtio/adk!ToolRegistry to register the entire category at once: registry.register(...memoryTools). |
| storeMemoryTool | Create a new @nhtio/adk!Memory record and persist it via the context's storeMemory callback. |
| updateMemoryTool | Replace an existing @nhtio/adk!Memory by id. |