Skip to main content
ampup-memory serve listens on port 8080 by default (ampup-memory serve [scope] [port]). Bodies are JSON. On a server with sign-in, send Authorization: Bearer <token or msk_ key> and select memory with x-memstore-org and x-memstore-team headers (or ?org=&team=). A client that isn’t an MCP client can use a member’s personal key (ampup-memory apikey create --personal), which acts as them on the memory routes below (security-model.md). serve --local takes no credentials. Examples below run against ampup-memory serve --local on localhost:8080.

The learning loop

  • /remember: acl entries must be ones the caller holds. Unset, the note is readable by everyone who reads the scope; "mine": true makes it the caller’s alone (refused for a caller with no user: entry). The episode’s source records its author as mcp:remember_memory:<caller>:<source>. document (a key under starter/) writes a new version of that document.
  • /sessions/end and /advice in a session: only the person who started the session may use it; anyone else gets 404.
  • /sessions/prs reports what became of a pull request a session opened or pushed to (merged, closed, reverted, regression). A revert or a regression marks its sessions failed; a merge marks them succeeded (0.5, then 1 once it has stood 14 days).
Details of advice, runs and sessions: advice.md.

Reading

The read routes use a row protocol so the same endpoints serve as Snowflake service functions ({"data": [[row, args…]]}, answered as {"data": [[row, result]]}) and BigQuery remote functions ({"calls": [[args…]]}, answered as {"replies": [...]}).
/browse operations: ls (a folder’s children, paged with limit and after), episode (text and the facts citing it), branches, schema, facts, advice, scopes. A path is a JSON array of segments:
Every read is filtered by what the caller may see. A path or id that holds nothing the caller may see answers 404, as if it didn’t exist.

Writing

  • /ingest: an ACL must name its readers (empty or * is a 400). A record for a whole org names group:<org>.all. Every episode must be of a known episode type; one bad record refuses the batch. replaces_source: true retires the source’s other versions once the batch commits.
  • /facts: each fact’s quote (at least 12 characters) must occur in a cited episode, and every word of its entity and value (common words aside) must occur in the cited text.
  • /forget re-ACLs the episode to an entry nobody holds; the ledger keeps the change.
  • /retract hides an episode, and every fact citing it, for every reader on every branch at every time. The bytes stay until a purge (ampup-memory org purge).

Admin and operations

The CLI’s people commands (ampup-memory org, team, member, apikey, audit) call /admin when signed in. See security-model.md.

Errors

  • 400 for a malformed body, with a reason.
  • 401 without a credential the server accepts, answered before the body is read; 403 when the caller may not do this here, with a reason code (not_member, as_denied, …).
  • 404 for anything the caller may not see.
  • 429 with Retry-After past the caller’s rate limit (a batch costs a token per item) or past its requests in flight at once (AMPUP_MEMORY_MAX_IN_FLIGHT_PER_CALLER).
  • 503 for advice with no routing model, from /ready during warm-up, and with Retry-After: 1 when the server is at its connection or in-flight cap.