Skip to main content

Memory page

The Memory page lists the memories agents have stored through the /v1/memory API and lets you add, change and delete them. Each memory is a key with a text value that can be injected into an LLM's context, plus optional JSON metadata. Open it at /ui/memory. It sits in the left nav in the AI Gateway group under Agentic, as the last item after Run Ledger. The nav shows it to proxy admins and proxy admin viewers only. The page checks the same roles itself, and anyone else who opens the URL sees "Memory is only available to admin users." The page has no license gate.

Scenario​

A support assistant keeps telling new engineers that releases are cut on Tuesdays, but the team moved them to Wednesdays last month. An admin opens the Memory page, searches for the project/platform/ prefix, opens the summary memory, fixes one word with Edit, and every conversation from then on gets the right day. No agent code changes and no redeploy.

Steps​

  1. Sign in as a proxy admin and open Memory under Agentic in the left nav, or go to /ui/memory.

  2. Type the key prefix or a memory id in the search box. The list narrows 300 ms after you stop typing. The same list from the API looks like this.

    curl "http://localhost:4000/v1/memory?key_prefix=project/platform/" -H "Authorization: Bearer $SPANWAY_API_KEY"
  3. Click the memory's ID to open the detail drawer and read the full Value and Metadata.

  4. Choose Edit from the row's actions menu, change the Value and click Save. To add a new one click New memory, fill Key and Value and click Create. To remove one choose Delete, type the key exactly and click Delete.

Expected result​

The list answers 200 with the matching memories and a total.

{"memories": [{"memory_id": "3f6c2a9e-7b41-4d8a-9c55-1e2f3a4b5c6d", "key": "project/platform/summary", "value": "Platform is a monorepo. Releases cut from main every Wednesday.", "metadata": {"source": "onboarding"}, "user_id": "jane", "team_id": "team-platform", "updated_at": "2026-11-21T09:12:00Z"}], "total": 1}

After Save a toast reads "Updated project/platform/summary", the Updated column shows the new time, and the next GET /v1/memory/project/platform/summary from the agent returns the corrected text.

Deprecation banner​

A banner at the top reads "Memory is on a draft deprecation list". It says Memory is one of several experimental features being considered for removal, says no removal date is set and the list is not final, and links to Spanway support for feedback. The close button (an X) hides the banner until the page is loaded again.

Memory list​

The header reads Memory, "Inspect what your agents have stored under /v1/memory". The description says the list is scoped to memories visible to your user and team, and that admins see all.

ControlTypeWhat it does
New memoryButtonOpens the Create memory dialog.
SearchText fieldPlaceholder "Search by key prefix or memory ID…". Matches memories whose key starts with the text, or whose memory id equals it. The search runs 300 ms after you stop typing and returns to the first page.
RefreshButtonLoads the current page again.

The table is paginated by the gateway, 50 rows to a page.

ColumnMeaning
IDThe memory id. Click it to open the detail drawer.
NameThe memory key.
PreviewThe start of the value, with the full value on hover.
User IDThe user the memory belongs to, linked to that user's page, or empty.
Team IDThe team the memory belongs to, linked to that team's page, or empty.
UpdatedWhen it last changed.
ActionsA menu with View, Edit and Delete.

Detail drawer​

View, or clicking an id, opens a drawer titled with the key. It shows the Memory ID, User ID, Team ID, the full Value, the Metadata as formatted JSON when there is any, and when the memory was created and last updated, with who did it when recorded. The drawer is read only.

Create memory and Edit dialogs​

New memory opens Create memory. Edit opens the same form titled "Edit" followed by the key.

ControlTypeWhat it does
KeyText field, requiredPlaceholder "e.g. user_role". Keys are unique across the whole gateway, so two memories cannot share one. Namespace your keys, for example user:123:notes, if you need one per user. The key cannot be changed when editing. "Key is required" if empty.
ValueText area, requiredMarkdown or plain text that is injected into LLM context. Placeholder "What the agent should remember…". "Value is required" if empty.
Metadata (optional JSON)Text areaOptional structured metadata. It must be valid JSON, or the save stops with "Metadata must be valid JSON (or leave empty)." When editing, emptying the field clears the stored metadata. When creating, leaving it empty stores none.
Create or SaveButtonSaves the memory. On success a toast reads "Created ..." or "Updated ...", the dialog closes and the list reloads. On failure a toast reads "Save failed" with the gateway's message and the dialog stays open.
CancelButtonCloses the dialog without saving.

A new memory is stamped with the user and team of the session that created it.

Delete memory dialog​

Delete opens Delete memory, which reads "This action cannot be undone." and lists the memory's Key, Memory ID, User ID and Team ID. You must type the key exactly before Delete is enabled. Deleting removes the memory for every agent that reads it, and it cannot be undone. On success a toast reads "Deleted ...". On failure a toast reads "Delete failed" with the reason and the dialog stays open so you can retry or cancel.

Empty, error and disabled states​

With no memories the table reads "No memories stored yet" and "Memories your agents store under /v1/memory will appear here." A search with no match reads "No matching memories". If the list cannot be loaded, the table shows "Couldn't load memories" followed by the reason and "This is not an empty list. Check your connection and permissions, then retry." Retry loads the list again. Create, edit and delete failures appear as toasts.

Differences by role and license​

WhoWhat changes
Proxy adminSees every memory and can create, edit and delete any of them.
Proxy admin viewerThe page shows the view-only banner but does not hide its own New memory, Edit and Delete controls. The gateway refuses writes from view only admins, so those actions fail with an error toast.
Everyone elseThe page shows the admin only notice.

Memory needs no license.

Errors​

What you seeWhat it meansFix
"Memory is only available to admin users."The session is not a proxy admin or admin viewer.Sign in as a proxy admin.
"Couldn't load memories" with a reasonThe list request failed, for example the database is not connected.Fix the cause, check your connection and click Retry.
"Key is required" or "Value is required"A required field is empty.Fill the field before Create or Save.
"Metadata must be valid JSON (or leave empty)."The Metadata (optional JSON) text does not parse.Fix the JSON or clear the field.
"Save failed" with a 409A memory with that key already exists anywhere on the gateway, possibly in a scope you cannot see, because keys are unique across the whole gateway.Edit the existing memory, or pick a namespaced key such as user:123:notes.
"Save failed" or "Delete failed" with a 403The session is an admin viewer, which the gateway treats as read only.Sign in as a proxy admin.
"No matching memories"Nothing starts with the prefix and no id equals the text.Check the key on the agent side, keys are case sensitive.
  • Memory API covers the routes, scopes and visibility rules.
  • Custom agents do not read memory by themselves. An agent's tools or backend can call the memory API with a proxy admin key.