Documentation
Getting StartedMemory spaces

Memory spaces

A memory space stores what your agents learn so they can recall it on later calls. Agents write memories through tool calls, and, for spaces that opt in, the transcript of each finished call is added as well. Manage spaces under Memory in the app.

Create a space

  1. Open Memory and choose Create memory space.
  2. Enter a name. The slug is derived from it and cannot be changed later.
  3. Optionally add a description and a query prompt. One space serves all your callers, and what it stores is kept apart by the caller's phone number automatically, so there is no kind to choose.
  4. Optionally add extra filter keys. contact_phone is always present and cannot be removed.
  5. Decide whether to save call transcripts in the space (off by default).

The query prompt works like the one on a knowledge base: use the built-in default, a prompt from your registry, or none.

Filter keys

Filter keys narrow a search, for example to one case or order. Each space has contact_phone plus any optional keys you add, such as account_id, case_id, location_id, order_id or topic. Each key is a lowercase label (letters, digits and underscores, up to 32 characters, starting with a letter). The editor suggests common labels and shows how many keys you have left.

Keys you have saved can be added to but not removed or renamed.

There are two sorts of keys:

  • From the call: contact_phone is filled from the caller's phone number that the provider reports for the call, not by the agent, and it is hidden from the agent's tool. It is what isolates callers, so each caller only reaches their own memories.
  • Chosen by the agent (optional): the agent sets these during the call, only when the caller gave an explicit value. They narrow results within that caller's memories and never replace the phone isolation.

Warning: an optional key chosen by the agent narrows results but is not an access boundary. Only the caller's phone isolates callers.

Without a usable caller number (for example a web call, or the Talk button in a provider dashboard) a space keyed on the caller's phone cannot be used on that call: the memory tools refuse it and no transcript is saved there. Spaces without a caller key still record such calls.

How the number reaches the memory tool depends on the provider:

  • ElevenLabs passes the caller's number to the tool itself (the system__caller_id variable); nothing else is needed. This still needs confirming on a live call.
  • Vapi does not pass the caller to MCP tools (variables in MCP headers are not substituted, tested), so the platform looks the call up with the Vapi key of the environment and reads the caller's number from it. Nothing else is needed for calls to assistants deployed from Ellaworx. If you start or route calls yourself, you can register the caller's phone for the call before the first memory tool call; a registered number is used first. Do it in your assistant-request handler, the same way the per-call knowledge base scope is registered:
const response = await fetch(
  `${elacityUrl}/api/agents/${encodeURIComponent(stableKey)}/calls/${encodeURIComponent(message.call.id)}/caller`,
  {
    method: "PUT",
    headers: {
      "Content-Type": "application/json",
      "X-API-Key": elacityApiKey, // Keep this on your server.
    },
    body: JSON.stringify({
      orgSlug,
      callerPhone: message.call.customer?.number,
      ttlSeconds: 3600,
    }),
  },
);
if (!response.ok) throw new Error("Could not set the call's caller");
// Only after success, return the assistant to Vapi.

stableKey is the Elacity agent's stable key. The entry expires after the TTL (default one hour, at most 24 hours). Until it is registered, spaces that use contact_phone answer "not available on this call". A number attached directly to an assistant never triggers assistant-request, so such calls have no registered caller yet; register it from whatever starts or handles the call.

Agent scoping

A memory is readable only by the agent that wrote it. It is also limited to the caller's phone. Two agents that share a space and a caller do not see each other's memories. In a shared or org space from earlier testing, each agent gets its own notebook, shared by all of that agent's callers.

Memories saved before this change have no agent. Agents cannot see them; admins still see them in the Memories tab. After this change, redeploy each agent that has memory spaces so it can use them.

Call transcripts

Turn on Save call transcripts here to write each finished call into the space. It is off by default so that an agent with several spaces does not publish every call's facts into all of them. The transcript is saved under the caller's number, without any optional keys; if the provider does not send a number, the call is not saved in that space.

Recalled memories

Memories are written by callers' words, so the agent receives them as untrusted data: each one is wrapped in a labelled block, shortened and stripped of control characters, and the agent is told never to follow instructions found inside.

Corrections

The agent sees the date of each recalled memory and trusts the newest one when two conflict. When the caller corrects something the agent remembers, it saves the corrected fact and replaces the outdated memory, so only the corrected one stays. Before saving a name, number or spelling, the agent confirms it with the caller by reading it back or asking them to spell it.

Browse, add and delete memories

Open a space and choose the Memories tab to list memories, newest first. Memories are stored per environment, so pick the environment first. Use Load more to page through them. Each row can be deleted.

Every memory saved from now on records where it came from, and the row shows it as chips: the caller's number (masked to the last 4 digits), the agent, the source (a tool call, a call transcript or added by hand) and the category Mem0 assigned. The full caller number is never shown in the browser.

You can narrow the list by caller number (only for spaces with the contact_phone key; type the full number), agent, source and date range, or search by text. A text search shows the best matches without paging.

Memories saved before this change have no source information. They show no chips and are hidden while a source filter is on; the Memories tab says so.

Add a fact by hand

Organization admins see Add fact on the tab; other members do not, and the server refuses the request from them. You must also choose the agent the fact belongs to (required, from your organization's agents); only that agent can recall it. The text is stored exactly as typed, with the source "added by hand" and your user as the author. For a space with the contact_phone key you must enter the caller's number the fact belongs to; for any other space a number is not accepted. For each optional filter key of the space you can fill a value, so searches that filter on that key find the fact; leave a key empty to store the fact without it.

Key values, key filters, edit and delete all for a caller

Each row also shows its custom key values as label: value chips. For a space with custom filter keys, the folded Filters panel has one input per key; type a value and press Enter (or leave the field) to list only memories with that value. Organization admins also get Edit on each row, which changes only the fact's text (up to 2000 characters); the caller, agent and key values stay. When a caller number filter is set, admins see Delete all for this caller: after a confirmation it deletes the matching memories, at most 500 per press. If memories remain, the message says how many; press again to continue. If nothing could be deleted, the message says so and does not suggest a repeat.

Assign spaces to agents

Open an agent, choose its Memory tab, and add or remove spaces. Batch edit supports the same field for many agents at once. Redeploy the agent to apply the change.

Deleting a space

A space that agents still use cannot be deleted: unassign it from them and redeploy first. Deleting is a soft delete: stored memories are not purged and the slug cannot be reused.