Skip to content

Memory API — reference

Every operation of the agent protocol with its access level, parameters and response shape, rendered from the tool table and the OpenAPI document.

Generated by scripts/gen_skill_reference.py in the Membase platform repository from docs/openapi/agent-protocol.json and the tool table.

Base URL https://api.app.membase.com. Every request: Authorization: Bearer <developer key>. MCP endpoint https://api.app.membase.com/mcp-http (Streamable HTTP): the same tools by the same names, with the same answers; it also takes a consent token from the MCP consent screen, which works there only (on /v1 it answers 401). Over MCP, search_memories takes q and limit only, without mode. No request names a Memory.

Level Tools
Read (read) search_memories, list_memories, get_memory, list_profile_facts, list_documents, get_document, list_media, get_media, search_media, ask_memory
Read & write (suggest) search_memories, list_memories, get_memory, add_memory, list_profile_facts, add_profile_fact, list_documents, get_document, add_document, list_media, get_media, search_media, ask_memory
Full (manage) search_memories, list_memories, get_memory, add_memory, forget_memory, list_profile_facts, add_profile_fact, forget_profile_fact, list_documents, get_document, add_document, delete_document, list_media, get_media, search_media, delete_media, ask_memory

A level is the ceiling of what a credential of that kind may hold. The profile tools and ask_memory are held only when a credential’s tool list names them: a developer key gets the profile when the owner ticks it — reading at Read, keeping a statement at Read & write, forgetting one at Full; ask_memory is held by an agent exposure’s credential (granted under the retired name agent_invoke). A marketplace buyer’s credential holds search_memories on the one Memory bought (and search_media when it holds photos and videos), and nothing that stands on them: no fact list, no fact read. An AI app connected through the consent screen holds what a developer key of the same level holds; it is capped at Read when the app did not ask for the write scope, and it never carries out a removal: at Full, a delete or forget is refused (a tool error saying it can only request a removal) and nothing changes; the person removes the item in the Membase app. A verb outside a credential’s tools is not offered in tools/list. Called anyway, it is refused with 403 over REST; over MCP the answer is a tool error inside an HTTP 200.

get_capabilities — What this AI app or key can do

Section titled “get_capabilities — What this AI app or key can do”

any credential; read-only.

GET /v1/capabilities

The actions this credential holds (actions: search, memories.list, profile_facts.list, …), the Memories it reaches (memories, by name and kind, never by id), the standing rules for using them (rules: citation_required, retention_notice, version) and the features on here. It is not permission: every call is still checked when made.

level Read; read-only.

POST /v1/search

Passages the Memories in reach hold on a question, most relevant first. A Memory that could not answer, or whose passages all lost to limit, is named in partial.

Field Type Required Description
limit integer or null no How many passages in all, 1–50.
mode string no full: the engine’s whole retrieval. fast: one round, no model call.
q string yes The question, in natural language.

level Read; read-only.

GET /v1/memories

The newest entries the memories in reach hold — newest by when it happened, the engine’s own order. has_more says more were left out; a memory that could not answer is named in partial and the others are still listed.

Field Type Required Description
limit (query) integer or null no How many, newest first: 1–1000, default 100.

level Read; read-only.

GET /v1/memories/{memory_id}

One entry, of any age — a search can name one older than any list shows.

Field Type Required Description
memory_id (path) string yes

level Read & write.

POST /v1/memories/add

Save one entry into the memory this key’s writes go to. The answer is the note it was written as — a document of kind note; poll GET /v1/documents/{id} for its learning.

Field Type Required Description
content string yes The entry, as said.
title string no

level Full; destructive — confirm=true from a developer key, or a request.

POST /v1/memories/{memory_id}/forget

Forget one learned entry; the material it was learned from stays.

Field Type Required Description
memory_id (path) string yes
confirm (query) boolean no True to carry it out (a Full developer key).

list_profile_facts — List the user’s profile

Section titled “list_profile_facts — List the user’s profile”

level Read; read-only; held only when named.

GET /v1/profile-facts

Who the user is: their standing statements, newest first, each with where it came from (source_kind: user_stated, imported or model_generated).

Field Type Required Description
limit (query) integer or null no How many, newest first: 1–1000, default 100.

level Read & write; held only when named.

POST /v1/profile-facts/add

Keep one standing statement about the user. The same statement again keeps the one already there (created: false).

Field Type Required Description
content string yes One standing statement about the user.

forget_profile_fact — Forget a profile fact

Section titled “forget_profile_fact — Forget a profile fact”

level Full; destructive — confirm=true from a developer key, or a request; held only when named.

POST /v1/profile-facts/{fact_id}/forget

Forget one profile fact. There is no editing one: to correct it, add the new statement and forget the old.

Field Type Required Description
fact_id (path) string yes
confirm (query) boolean no True to carry it out (a Full developer key).

level Read; read-only.

GET /v1/documents

The material the Memories in reach were given, newest first; every kind unless kind narrows it (a kind added later is listed too).

Field Type Required Description
kind (query) string or null no file (a file or page) or note (an entry as said); omit for both.
limit (query) integer or null no How many, newest first: 1–1000, default 100.

level Read; read-only.

GET /v1/documents/{document_id}

One document, with how far each Memory got in learning it.

Field Type Required Description
document_id (path) string yes

level Read & write.

POST /v1/documents/add

Hand in a document (text or a url) to the memory this key’s writes go to.

Field Type Required Description
content string or null no The document’s full text.
custom_id string no Your own id; adding the same custom_id again is a no-op.
title string no
url string or null no A public web address to fetch instead.

level Full; destructive — confirm=true from a developer key, or a request.

POST /v1/documents/{document_id}/delete

Withdraw a document and what every Memory learned from it.

Field Type Required Description
document_id (path) string yes
confirm (query) boolean no True to carry it out (a Full developer key).

level Read; read-only.

GET /v1/media

The photos and videos the media Memories in reach hold, newest first.

Field Type Required Description
limit (query) integer or null no How many, newest first: 1–1000, default 100.

level Read; read-only.

GET /v1/media/{media_id}

One photo or video with its moments: shots and spoken lines with their times, speakers and thumbnails.

Field Type Required Description
media_id (path) string yes

level Read; read-only.

POST /v1/media/search

Photos and videos matching what was seen or said, best first, each with the moments that matched (a shot or a spoken line, its time and speaker).

Field Type Required Description
kind string or null no image or video; omit for both.
limit integer or null no How many items in all, 1–50.
q string yes What was seen or said, in any language.

level Full; destructive — confirm=true from a developer key, or a request.

POST /v1/media/{media_id}/delete

Forget a photo or video and remove its file.

Field Type Required Description
media_id (path) string yes
confirm (query) boolean no True to carry it out (a Full developer key).

level Read; read-only; held only when named.

POST /v1/ask

One answer from the memory itself — the engine reads the Memories in reach and answers once, with no agent and no tools. The citations name the Memory the answer came from, never the passages.

Field Type Required Description
message string yes The question to answer.

GET /v1/media/{media_id}/file

The photo or video itself, streamed (a Range header serves part of a video); the address is a media item’s file_url. Held with get_media.

Field Type Required Description
media_id (path) string yes
Range (header) string or null no

GET /v1/media/{media_id}/thumbs/{thumb}

A thumbnail of a photo, or the frame of a video moment; the address is a media item’s or a moment’s thumb_url. Held with get_media.

Field Type Required Description
media_id (path) string yes
thumb (path) string yes

Names from earlier versions of the protocol. tools/list does not offer them, and a tools/call under one answers a tool error: call the current name. A credential minted with a retired name in its tool list still holds the current tool it stands for.

Retired Current
memory_view_query search_memories
memory_recall search_memories
memory_remember add_memory
memory_ingest add_document
memory_list_sources list_documents
memory_forget delete_document
get_profile list_profile_facts
ask_agent ask_memory
agent_invoke ask_memory
Status Code When
400 validation an empty q; both or neither of content and url; a list limit outside 1–1000
401 unauthenticated no bearer, or a consent token used on /v1 (it works only at /mcp-http)
403 unauthorized a verb above the credential’s access level, or one it does not hold at all (a delete below Full, a buyer’s fact list); over MCP, a tool error inside an HTTP 200
404 not_found an id that is not this credential’s to read: outside its reach, deleted, or not one of ours
422 validation a malformed body: a field missing, of the wrong type, or unknown (container included), or a search limit outside 1–50
422 write_target_required a write from a credential that reaches no text Memory, or several and has none chosen for its writes (Writes go to on its page)
422 capability_unavailable the account’s memory cannot run a turn here (no model); with details.reason: "dormant", the account’s paid plan has ended and its memory is asleep until the owner renews
428 confirmation_required a destructive verb without confirm=true; nothing changed, and details.id names the target
429 rate_limited the account’s concurrent-turn budget, or too many requests on one credential
429 quota_exceeded a write when the account’s storage is full or its plan is not active, or a marketplace credential whose searches for the period are used up
503 provider_unavailable retryable: the account’s memory is not ready yet, for example a write while it is still starting; try again in a moment

Read code, not only the status: 422 is several. Over MCP a refusal is a tool error inside an HTTP 200 whose text is the message alone; code and details travel over REST only.