save_context
Save something worth remembering across tools and sessions. Idempotent — saving the same content twice returns the same id withdeduped: true.
Parameters
The thing to remember.
The canonical memory type, which drives retrieval behavior:
fact— atomic, stable knowledge (“the project uses GraphQL”).event— something that happened at a time (a deployment, a decision).instruction— how to do something (a procedure, workflow, runbook).task— what’s being worked on right now. Ephemeral: it auto-expires after a TTL (7 days) and is swept on the next write. It’s still embedded, so it’s semantically retrievable while live.
fact (a kind of decision defaults to event).Finer-grained display flavor:
fact, decision, preference, or note.A stable topic this entry is about (e.g.
deploy-schedule,
editor-preference). A newer entry with the same topic supersedes older
ones — latest wins. Use it when updating a fact the user stated before.Where this came from, e.g.
claude-code, chatgpt, cursor.Optional freeform tags.
Returns
The id of the saved (or matched) entry.
true when the content already existed and was deduplicated.Example result
save_session
Persist what a whole session taught — comprehensively. Pass the transcript or a digest and OneLamp distills it into the reusable facts, events, instructions, and tasks worth keeping, classifies each, and saves them (deduped). This is the comprehensive backstop to per-factsave_context, and matters most for tools
without lifecycle hooks. Idle chatter and secrets are skipped.
Parameters
The session transcript, or a concise digest of everything durable the user
revealed.
Which tool this came from, e.g.
claude-code, codex, cursor.Returns
New entries saved.
Items already known.
Items distilled from the session.
The id of the recorded session digest (present when anything durable was saved),
for later
resume_session.get_context
Retrieve relevant context as a ranked pack of chunks (semantic + keyword + exact fact-key retrieval, fused with weighted RRF). Returns source material to reason over — not an answer. An empty store returns an empty pack, never an error.Parameters
What to retrieve context about.
Maximum context chunks to return (1–50).
Restrict results to these memory types (
fact, event, instruction,
task) — e.g. just instruction for runbooks. Omit to retrieve across all
types.Which context store(s) to read from:
personal (your own), team (every team you
belong to), team:<id> (one specific team you’re a member of), or all (personal
+ your teams, fused with personal winning ties). See Teams.If true, return only verified team learnings (ones a 2nd teammate has
independently corroborated), dropping unverified and contested ones. Your personal
context is always included. Default returns all, trust-weighted.
If true, strongly favor the most recent context over the most relevant —
for “what was I just working on” / “what’s the latest” reads. Default is
relevance-ranked, with recency only as a tie-breaker.
Returns
The ranked context chunks. Each pack has:
Example result
list_context
Browse your saved memory, newest first — each item’s id, title, kind,memory_type, category, a short text preview, and cross-agent reuse
(reuse_count and last_used_surface — how often it’s been retrieved and the
tool that last used it). Use it to see what’s stored (e.g. to find an id to
forget). For relevance-ranked retrieval use get_context.
Maximum items to list (1–200).
resume_session
Pick up cross-tool work where you left off. Each session digest is recorded bysave_session in any tool, so this is the cross-agent handoff
path. Without a session_id, returns your most recent sessions (recency-ranked).
With one, loads that session in full — its label/summary and the learnings it
produced.
Load one session in full by id (from a prior
resume_session / save_session).How many recent session digests to list (1–50). Ignored with
session_id.Only list sessions at/after this epoch-ms timestamp.
Only list sessions from this surface, e.g.
claude-code, cursor, codex.forget_context
Delete one saved memory by id — completely and immediately (the index row, the R2 source, and the vector). Get the id fromget_context or list_context. To
instead replace a fact that changed, prefer save_context with a stable
topic (supersession keeps history); use forget_context to remove for good.
The id of the memory to delete.
Pass
false to preview the target without deleting it — returns what would
be removed so you can confirm first.true if an entry was deleted; false if the id wasn’t found (or on a preview).These tools embody OneLamp’s core principle: writes can dedupe and supersede,
reads are retrieval-only, and your data is always exportable (export lives in
the OneLamp web app, not as an agent tool). See
Privacy & data ownership.