Agent Memory

How an agent remembers between conversations — the per-deployment switch, whether memories belong to each person or are shared, what the agent saves, and how long memories last.

Memory lets an agent keep what it learns in one conversation and use it in later ones. It is off until you turn it on for a deployment, and the agent itself decides what to save.

Turning memory on and off

You set memory per deployment, with two controls. They appear when you deploy an agent, and afterwards on the deployment’s page:

ControlValuesDefault
Agent memory (memoryEnabled)On or offOff
Who the memories belong to (memoryScope)Each person (user) or Shared across the organization (org)Each person
  • Who the memories belong to is shown only while memory is on.
  • A change takes effect from the agent’s next run. Horizon reads both settings each time a run starts.
  • Only the person who deployed the agent, or an organization owner or admin, can change them.
  • Turning memory off does not delete anything. The agent loads no memories and is offered no memory tools, and its memories come back when you turn it on again.
  • Switching between Each person and Shared does not delete anything either. The two sets are stored apart, so switching back restores the set that was there.

Whose memories an agent uses

With Each person, everyone who talks to the agent has their own memories, and nobody else sees what the agent saves for them. With Shared across the organization, the agent keeps one set for everyone who uses it, so something it learns from one person can come up with another. The agent is told which of the two it is using.

On an Each person agent, “the person” is the identity the run comes from:

  • Slack: the Slack user who sent the message.
  • Microsoft Teams: the Teams user who sent the message.
  • The Operator window in Horizon: your Horizon account.
  • An agent webhook: the Horizon account of the person who created the webhook. See Webhook runs.

These are different identities, so one person has separate memories in Slack, in Teams and in Horizon. A run with no person behind it gets no memory at all on an Each person agent: no memories are loaded and no memory tools are offered. It does not fall back to a shared set, because that would expose memories the deployer chose not to share.

Webhook runs

Since 24 September 2026, a webhook run acts for the person who created the webhook. A user_id sent in the webhook request is ignored and cannot choose whose memories the run uses. Webhooks has the details.

  • On an Each person agent, a webhook run reads and writes its creator’s memories. Whoever holds the webhook URL decides what that run is asked to do.
  • Moving or taking over a webhook changes whose memories its runs use: once an owner or admin moves it to themselves with Move webhooks to me or Take over, its runs read and write that admin’s memories instead of the original creator’s.
  • A webhook created before 24 September 2026 has no creator on record. It runs as no one, so on an Each person agent it has no memory. Create a new webhook to give it one.
  • On a Shared agent, a webhook run uses the shared set, like every other run.
  • A webhook run is never offered the tools an agent uses to change its own instructions, even when Agent can update its instructions is on for the deployment.
Caution

Treat the URL of a webhook on an Each person agent as a secret: anyone who has it can make the agent read and write its creator’s memories. Rotating the webhook’s token stops the old URL working immediately, and deleting the webhook stops it altogether.

Memory layers

When memory is on, Horizon gives the agent five memory tools and standing instructions on how to use them. Nothing is saved automatically. A memory exists only because the agent saved it during a run.

The agent chooses a type for each memory it saves, and the type sets its scope:

TypeUsed forScope
semanticA lasting fact or preference, such as a person’s timezone or how they like reports laid outpersistent
episodicSomething that happened, such as an outcome or a commitment the agent madepersistent
workingA scratch note needed only during the current conversationsession

What the agent can remember and forget

The five tools act only on the set of memories the run is using:

  • memory_upsert saves a memory under a key, or replaces the memory already saved under that key. The agent gives a one-line subject of at most 150 characters, the full text of up to 10,000 characters, and the type. It can also link the memory to up to 20 related ones and give it an expiry date.
  • memory_get reads up to 10 memories in full, with the memories each one links to and is linked from.
  • memory_list lists memories as one line each, key and subject, filtered by type or key prefix. It returns 50 by default and at most 200.
  • memory_delete deletes one memory by its key, with its links.
  • memory_clear deletes all of the set’s memories, or all of one type. On a Shared agent that clears them for everyone.

Keys are 1 to 255 characters long, made of letters, digits, ., _ and -.

The standing instructions tell the agent to save a memory when someone asks it to remember something, when it learns something that will still be true and useful next time, and when something happens that is worth recalling. They tell it never to save passwords, API keys, access tokens, card or bank account numbers, government ID numbers, health or medical information, anything the person asks it not to keep, or details that matter only for the current conversation. When someone asks it to forget something, it is told to delete it with memory_delete. When it saves something nobody asked it to remember, it is told to say so in a few words, so that the person can correct it or ask it to forget.

Caution

These are instructions to the model, not a filter. Nothing in Horizon checks what the agent saves, so a memory can still hold something the agent was told not to keep. To remove one, ask the agent to forget it.

Session vs persistent scope

How long a memory lasts depends on its scope, not on a setting:

  • session memories belong to the conversation that wrote them. A cleanup pass runs every six hours and deletes session memories whose conversation has completed, errored or been abandoned.
  • persistent memories last until the agent deletes them, or until an expiry date the agent gave them when saving passes. They have no age limit.
  • Expired memories stop being returned as soon as their date passes, and the next cleanup pass deletes them.
  • A persistent memory nobody has read or saved for 180 days is flagged as stale. It is not deleted or hidden. The agent sees it marked “not read or updated since” the date it was last used, with a prompt to confirm it before relying on it.
  • Each set holds at most 500 persistent memories. On an Each person agent that limit is per person. Once a set is full, saving a new memory fails until one is deleted. Replacing an existing memory under the same key still works.

Retrieval limits

At the start of every run with memory on, Horizon adds an index of the agent’s memories to its prompt, when there are any to list. The index is one line per memory, its key and subject, not the full text. The agent reads the full text of a memory with memory_get.

LimitValue
Lines in the index150 at most, semantic memories first
Episodic memories in the index30 at most, first saved in the last 30 days
Working memories in the indexNone

Within each type, the memories most recently read or saved come first. Appearing in the index does not count as being read. When the agent holds more memories than the index shows, the index says so, and the agent can find the others with memory_list.

These limits are fixed. You cannot change them per agent.

Confidence

A memory can carry a confidence value, but the agent never sets one: memory_upsert has no confidence field. When a memory does have a confidence below 1, the agent sees the number next to that memory. No part of Horizon acts on it: it does not affect which memories are loaded or in what order.

Viewing and managing memory

You cannot list, read, edit or delete an agent’s memories yourself. The Horizon dashboard has no view of them, and the Horizon App API has no memory endpoints. To change what an agent remembers, ask the agent: it can list, read, save and delete memories with the tools above, within the set the run uses. Turning memory off hides all of them from the agent without deleting them.

Best practices

  1. Choose Each person unless the memories are meant for everyone. On a Shared agent, anything one person tells the agent can come up in someone else’s conversation.
  2. Keep the memory set small. The index of up to 150 lines is part of the prompt on every run with memory on.