Skip to content
1 min read · 294 words

@nhtio/adk/batteries/tools/retrievables

Pre-constructed CRUD tools for model-visible retrievable and RAG-record management.

Remarks

Pre-constructed CRUD tools that expose the ADK's @nhtio/adk!Retrievable surface to the model. Each tool delegates to the corresponding callback on the active @nhtio/adk!DispatchContext (fetchRetrievables, storeRetrievable, mutateRetrievable, deleteRetrievable) — the persistence layer is whatever the consumer wired into the runner.

Retrievables are RAG records and carry an explicit trustTier that drives the LLM battery's rendering envelope. Exposing these CRUD tools to the model is a deliberate deployer decision; the trust tier the model declares when creating or updating a record is honoured verbatim by the persistence layer. The deployer is responsible for choosing whether to register all four tools, only the read-only list_retrievables, or any subset thereof — that registration choice is exactly the trust boundary documented in the Retrievable battery contract.

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:

Variables

VariableDescription
deleteRetrievableToolRemove an existing @nhtio/adk!Retrievable by id.
listRetrievablesToolList every retrievable record currently held by the active execution context.
retrievableToolsConvenience tuple of every retrievable CRUD tool. Spread into a @nhtio/adk!ToolRegistry to register the entire category at once.
storeRetrievableToolCreate a new @nhtio/adk!Retrievable record and persist it via the context's storeRetrievable callback.
updateRetrievableToolReplace an existing @nhtio/adk!Retrievable by id.