Skip to main content

Try it

Memory is stored by the hosted Agents API: use Client(). Client.local().memories is not implemented.
Two sessions share the namespace market-research. The researcher finds a price and saves it. The writer, in a later session, reports it from memory.
The writer answers from the researcher’s note, with the price and the day it was found. With cURL, poll the new session’s changes for its answer. A stored agent takes memory the same way.
Each session of an agent with memory gets four tools and the h/memory skill, which tells it when to use them:The agent saves what a later session would otherwise find out again: preferences, procedures that worked, ids, conclusions. The skill tells it to avoid secrets and check what it reads; this is guidance, not an access restriction. memory is null by default.
  • Namespace. 1 to 127 characters, shared by every agent of your organization that names it.
  • Keys. Slash paths that group by topic, such as prices/kindle-paperwhite or preferences/report-format.
  • Values. Text, up to 64 KB.
  • Retention. A note is kept until you delete it, unless you pass delete_after_min with a positive number of minutes to expire it. Your privacy retention setting does not apply to notes. Each write restarts the window and chooses the retention again. See retention.
A note can carry what a page told the agent. Give memory to agents whose sources you trust, and keep secrets out of their tasks.

Manage notes

The CLI, SDKs and API can create, list, read, update, and delete notes. Writing the same namespace and key replaces the note.
List responses are paginated; request the next page while there are more results. With the CLI, use --page and --size, and --json for the full response. holo memories set replaces a note by namespace and key; update addresses it by ID. Pass --forever to keep it until deletion, --expires-in MINUTES to expire it. Without either, the note is kept until deletion. Each write resets retention. Pass - as the value to read a multiline note from stdin.