curl example, choose your Cloud region. For authenticated calls, it must be the same region as your key. The examples below use MIROBODY_API_BASE:
store and retention are orthogonal — one governs the conversation, the other governs the data plane:
retention governs explicit data-plane writes; it does not govern a stored conversation. A stored conversation can also produce health records and memories from its content — delete those with DELETE /v1/data, or erase the Subject. store=false conversations produce none.
Conversation state (store)
store defaults to true (OpenAI parity). A stored response persists three things: the response object (for GET /v1/responses/{id}), the conversation thread (so previous_response_id can continue it), and what the turn contributes to the platform’s conversation memory.
previous_response_id on an unknown, expired, or deleted response returns 404 — treat a chained conversation older than 30 days as gone unless it was session_id-bound. A response that ended in a client-tool handoff must be continued with function_call_output items first — see Function calling.Cleanup
DELETE /v1/responses/{id} always removes that stored response. Only when it is the last live response in its conversation does the platform tear down the conversation history and retract conversation-derived memory. See Agent API → Delete.
Cross-session memory
Stored conversations let the agent remember durable facts about a Subject across later conversations.store: false turns stay out of it entirely. Deleting the last live response in a conversation retracts that conversation’s derived memory; deleting an earlier one retracts nothing while other responses in the thread remain.
Journaling
A subjective journal entry — “headache all afternoon, eased after two coffees” — is a single-turnPOST /v1/responses with store: true. No dedicated endpoint: the knobs on this page already compose into the recipe. Give each entry its own session_id (for example, journal-{entry_id}) so it never hits the 30-day TTL and can be deleted independently. builtin_tools: "none" plus a short-acknowledgement instructions keeps the reply — which you don’t consume — as cheap as possible:
- Indicators and memories are extracted for you. Mirobody pulls any quantifiable indicators and durable memories out of the stored entry shortly after the write, independent of the reply.
- Read back a single entry with
GET /v1/responses/{id}. There is no list endpoint (OpenAI parity) — keep your own(entry → response_id)index. The platform is the data/intelligence layer, not a note-taking app. - Delete one entry with
DELETE /v1/responses/{id}. With the recommended one-response-per-session_iddesign, that response is the conversation’s last live response, so its conversation-derived memory is also retracted. If several responses share asession_id, the shared memory is retracted only once you delete all of them. - Delete session-scoped working data with
DELETE /v1/sessions/{id}. It does not delete stored response objects. - Erase the Subject with
DELETE /v1/subjects/{user}. - One nuance: readings already extracted into the data plane are ordinary records — deleting the journal entry retracts memories but leaves those readings; remove them with
DELETE /v1/data(byidorindicator) or the Subject-level wipe.
Data-plane retention (retention)
Health records and files carry their own lifetime, set where the data is written — POST /v1/data (required), POST /v1/files (optional), POST /v1/standardize (required when store=true):
There is no
retention: "none" — writing to the store while asking not to store is contradictory. For use-and-forget analysis, run POST /v1/standardize with store=false (dry-run, zero side effects), write with retention: "1h" (auto-expires), or use retention: "session" and delete the session when done.
Common patterns
See also
- Agent API (Responses) — the endpoint
storebelongs to. - Data Lifecycle — deleting stored responses and Subjects.
- Structured Records — the
retentionset where data is written.