Field names and error codes follow the latest published official docs. This page helps you run the first loop.
Four doors, the same data
HTTP, the Python Client, MCP, and the CLI all talk to the same Server. Coverage differs.
The local Server can also open its API notes:
/docs is a public API notes page. It still opens after you enable Server auth. /openapi.json and the API calls themselves need a Bearer header. Do not put a token in the URL. The full field list still follows the official docs.
Prepare the example project
The previous page installed the client extra. Createapi_tour.py with this complete script.
What this script proves
Writing Memory does not need a Source first
remember_memory writes long-term knowledge you already accept. source_refs is normally empty in this example.
The first effective write returns:
- an exact Memory Artifact ref;
- a logical
entry_id; - an exact
entry_version_id; - current entry content and state.
entry is null. Do not assume that every remember_memory response has response.entry.citation.
Empty search has two normal cases
The Scope has no Memory lifecycle:PreparedContext is already the final envelope
prepared.content already contains the trust marker, boundaries, and Citations. An Agent can put it into this request as untrusted historical evidence. Do not rebuild it from search hits.
When status="empty":
status="ready", the actual UTF-8 length equals content_bytes and does not exceed request max_bytes.
Reading history and changing content use different version rules
An old Citation can still read history throughget_memory_entry.
revise_memory_entry and retire_memory_entry accept only the current-head Citation. After a Memory change moves the Revision forward, changing with the old Citation returns HTTP 409 revision_conflict.
Use the new Citation from the change response.
Retire does not delete
After retirement:- default listing no longer includes the entry;
- active search and recall stop selecting it;
include_inactive=Truestill supports audit;- exact historical read still works.
What to read when it fails
The Python Client keeps the HTTP status, stable error code, Server message, andX-PowerContext-Request-ID.
After a 409, read the current value before you decide whether to retry. Do not guess the Revision.
MCP and HTTP do not cover the same surface
MCP is the tool set an Agent calls explicitly. HTTP is the full API.POST /v1/context/prepare and Python Client prepare_context are not MCP tools. A hook or framework adapter usually prepares the final PreparedContext at request time. MCP also does not reproduce each integration’s automatic recall, capture, and flush.
To connect a client and see which tools you can call, open Connect with MCP.
How you know it worked
The terminal should show:- The first write returns an exact entry Citation.
- A duplicate write is a no-op with
entry=None. - Full-text search /
autofinds the active entry. - PreparedContext is
ready, and the byte count matches. - After revise, the old Citation still reads exactly.
- Changing with the old Citation returns 409.
- After retire, the default list is empty. Inactive history is still readable.
Next step
Check the counts in Dashboard
The Dashboard does not show Memory text. Configure the Scope you just used and check
total=1, active=0, and inactive=1.Source and Memory
The next path captures a Source first, then extracts Memory. A successful capture does not mean knowledge stayed.

