# Harness Memory

> Harness Memory gives an agent long-term memory that lasts across tasks. An agent keeps what it learns and recalls it in later tasks, with each of your users' memories kept apart and nothing searched that the agent was not granted.

Canonical URL: https://harnessrouter.ai/docs/harness-memory
Section: Agent capabilities

## What it is

Harness Memory gives a harness's agent a memory of its own. It is loaded when a task starts, used through memory tools during each turn, and kept when the turn ends, so the next task starts from what earlier tasks learned.

A memory holds records of six kinds: episodes, facts, notes, procedures, links and entities. Memories can nest, a parent with children, and a recall can search a memory and the ones below it. A memory can be shared with other agents and harnesses.

## Turning it on

- Open Memory in the console's rail to see the organization's memories, create one, browse and edit its records, and share it.
- In the harness's Settings, under Memory, every memory the agent can use has a switch. On lets the agent recall from it and add to it; Off takes it away. Changes apply at once.
- With every memory off, the agent keeps and recalls nothing between tasks.

## One memory per person

When your product serves many people, send your own id for the person on each task. That task's agent then reads and writes that person's memory only, and what one person told it never reaches another.

A task for one of your users:

```
POST /{harness_id}/v1/responses
Content-Type: application/json

{
  "input": "Plan my week the way I like it.",
  "user": "<your id for this person>"
}
```

> **Read from your server only.** `user` is read from requests made with an API key, and only for a harness that keeps memory; anywhere else the response lists it in `metadata.ignored_fields`. In the console a person is always themselves. Send an id your server chose, never one the browser supplied.

## What the agent can do

The agent recalls records that match what it is working on, remembers new ones, reads, revises and forgets a record, lists what it has and follows the links between records. Where a memory supports it, the agent can also run a structured query over it.

At the start of each turn about 2,000 tokens of standing records go into the agent's instructions, so what matters most is there before it asks.

## What it costs

$0.0019 per memory operation, each time an agent keeps or recalls a long-term memory, the same on every self-serve plan and for every kind of record; Enterprise is agreed with you. Storage is included. Harness Memory is in beta, and its price can change with advance notice.

- [Pricing](https://harnessrouter.ai/pricing): Long-term memory sits with the other usage rates.
- [Harness Memory](https://harnessrouter.ai/harness-memory): The product page.

## Limits

- **One recall:** 1 to 100 records, 8 by default, searching at most 200 memories.
- **Standing records:** About 2,000 tokens at the start of each turn.
- **One tool result:** Up to 60,000 characters.

## What it does not do

- It never searches a memory the agent was not granted.
- A person's memory is never shown to the other people the agent talks to.
- Turning a memory off never deletes it.
