Skip to main content
Memory is stored by the hosted Agents API. The examples below use Client(); Client.local().memories is not implemented.

Try it

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. Each write uses your current privacy setting unless you pass delete_after_min. Pass null to keep a note until you delete it, or a positive number of minutes to expire it. Each write restarts the window. 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, or neither to use your current privacy setting. Each write resets retention. Pass - as the value to read a multiline note from stdin.