Skip to content

Agent Memory

Memory is what separates a stateless chatbot from a useful agent. Horizon’s memory system lets agents retain context across conversation turns and even across separate conversations, building up knowledge about your business over time.

Horizon agents have three distinct memory layers, each serving a different purpose.

Working memory is the agent’s short-term scratchpad. It holds information relevant to the current task within the active conversation.

  • Scope: current conversation turn and the immediately preceding turns.
  • Lifetime: cleared when the conversation ends (unless promoted to episodic memory).
  • Use case: holding intermediate results, tracking multi-step tasks, remembering what the user just said.

Working memory is automatic — you do not need to configure it. The model’s context window effectively defines its capacity.

Example: A user asks “What are the outstanding invoices for Acme Corp?” The agent queries QuickBooks, receives 15 invoices, and holds them in working memory so it can answer follow-up questions like “Which of those are overdue?” without querying again.

Each memory entry has a scope that controls its lifetime:

Scope Lifetime Cleared when
Session Active conversation only Conversation ends
Persistent Across conversations Manually cleared, retention period expires, or agent is deleted
  • Working memory is always session-scoped.
  • Episodic memory is always persistent (but subject to retention settings).
  • Semantic memory is always persistent.

There is no user-facing retention configuration. What memory an agent loads is bounded by engine defaults:

Default Value
Maximum memories loaded per run 50
Episodic look-back window 30 days
Episodic memories loaded 20

A semantic memory may carry a confidence value, but it is worth being precise about what it is and is not.

It is supplied by whoever writes the memory. It is an optional field on the write, and it is nullable — the platform does not compute it, does not assign one when the caller omits it, and does not adjust it over time. A memory with no confidence is entirely normal.

Nothing currently reads it. Confidence is stored and returned, and that is all. It does not change whether or how a memory is retrieved, and it does not change how the agent treats a memory once retrieved.

If you are writing memories through the API, treat confidence as a field for your own bookkeeping — a number you can store now and filter on yourself later — rather than a signal the platform acts on.

The user-facing memory control has three settings:

Setting Behaviour
Off Memory is not used.
Ask First The agent asks before writing a memory.
On Memory is used and written without prompting.

memorySetting is an engine-level control. It is not currently surfaced in the Horizon dashboard.

Memory is managed through the agent memory API, not through a dashboard tab. Per agent, the API supports:

Operation Endpoint
List memories GET /
Memory statistics GET /stats
Read one memory GET /:key
Create or update a memory PUT /:key
Delete one memory DELETE /:key
Delete all memories DELETE /
  1. Let memory build naturally — resist the urge to pre-load hundreds of semantic memories. Agents learn best from real conversations.
  2. Review memories periodically — list them through the API and remove outdated or incorrect entries.
  3. Correct wrong memories directly — if an agent keeps making a wrong assumption, find the memory behind it and edit or delete it. Lowering a confidence value will not change the agent’s behaviour, because nothing reads it.
  4. Delete rather than rely on retention — there is no configurable retention period, so in compliance-sensitive environments remove memories explicitly (DELETE /:key, or DELETE / for all of an agent’s).
  5. Keep the memory set small — each retrieved memory consumes tokens on every run, and retrieval is capped at 50 rather than tuned per agent. The lever is fewer stored memories, not a smaller limit.