--- title: "Temporal memory for OpenClaw" description: "OpenClaw stores selected context in MEMORY.md and daily notes. Add queryable temporal memory through the past.dev API." canonical: https://past.dev/integrations/openclaw last-updated: 2026-10-15 --- # Memory for OpenClaw Source: https://past.dev/integrations/openclaw OpenClaw uses MEMORY.md for durable notes, daily memory files for recent context and a pre-compaction flush for selected state. File-based memory does not provide entity resolution, fact validity periods or structured supersession. Keep identity and standing instructions in files. Store changing facts in a queryable memory service when those functions are required. ## How OpenClaw's native memory works [OpenClaw](https://github.com/openclaw/openclaw) stores identity and standing instructions in Markdown bootstrap files, durable notes in MEMORY.md and recent context in dated memory files. A flush step writes selected state before context compaction. Users can inspect these files directly. ## Where files stop scaling - **Retrieval is grep.** Finding the right note depends on the note using the words you searched. - **No time model.** A note from February and its March correction sit in the same file; the agent quotes whichever it reads first. - **Compaction.** Only content written before compaction persists. The saved content remains unstructured prose. - **Single-agent scope.** Two OpenClaw instances, or one agent plus your product, cannot share files cleanly. These are the same limits every file-based memory hits; the [LLM-wiki pattern](/what-is-agent-memory) has them too. Files hold slow knowledge well. Changing facts need structure. ## The integration: teach OpenClaw two commands OpenClaw agents run shell commands, so the integration is two curl calls the agent learns from its instructions: remember and recall. ```bash # remember: store source text at the time it happened curl -s -X POST https://api.past.dev/api/v1/ingest \ -H "Authorization: Bearer $PAST_API_KEY" \ -H "Content-Type: application/json" \ -d '{"content": "Sam approved the Q4 budget of 40k", "timestamp": "2026-08-28T14:00:00Z", "identity": "'"$PAST_IDENTITY"'"}' # recall: ask memory before answering history questions curl -s -X POST https://api.past.dev/api/v1/recall \ -H "Authorization: Bearer $PAST_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query": "What is the approved Q4 budget?", "identity": "'"$PAST_IDENTITY"'"}' ``` Set `PAST_IDENTITY` to the owner's identity in OpenClaw's environment, beside `PAST_API_KEY`, for example in `~/.openclaw/.env` ([environment variables](https://docs.openclaw.ai/gateway/configuration/environment-variables)). The commands then carry no identity that the model writes. The agent can read its own environment, so give it a key for a project that holds only data its owner may read. Add two rules to the agent instructions: write durable facts with their original timestamps, and recall before answering questions about people, decisions or history. Keep the agent's own identity and standing preferences in MEMORY.md. > **Identity** > > The application sets the identity. The model never chooses it. Recall returns what the identity in the request may read, so take the identity from the signed-in user in code, and keep it out of every value that the model fills. Recall returns ranked documents with dates and source excerpts. The application decides whether those documents support an answer, contain a disagreement, or are insufficient; HTTP failures are handled separately. ## What changes in daily use - Facts written before compaction remain available in the API with dates. - The March correction supersedes the February note instead of coexisting with it; both remain for as-of questions. - Retrieve changes for a specified period from stored validity windows. - Your OpenClaw agent and your product agents share one memory with one key model. The [quickstart](/docs/memory-api/quickstart) documents setup. [Benchmarks](/benchmarks) reports recall evaluation. [Fact supersession](/glossary/fact-supersession) explains update handling. ## Frequently asked questions ### Should I delete MEMORY.md? No. Files are the right place for identity, tone and standing preferences: slow knowledge the agent reads at startup. Move the changing facts, events, decisions and people-state into the API. ### How is this different from the memory plugins? Most OpenClaw memory plugins index local files or transcripts for search. past.dev adds a shared HTTP API with timestamps, stable source ids, identities, audience slugs, a status for each send, and source-backed recall. ## Related - [Memory for the Claude Agent SDK](https://past.dev/integrations/claude-agent-sdk) - [past.dev and claude-mem](https://past.dev/compare/claude-mem) - [Fact supersession](https://past.dev/glossary/fact-supersession) - [What is agent memory?](https://past.dev/what-is-agent-memory) - [Quickstart](https://past.dev/docs/memory-api/quickstart)