Skip to content

Tools

pastepile_remember

Save the current state of a piece of work to durable memory, keyed by a session name the assistant chooses, so no slug ever has to be carried between calls.

3 min read · Updated

Creates or updates one memory, addressed by a session string the assistant picks. The first call under a session creates the memory. Every call after it replaces the content and keeps the previous copy as a version. A call whose content has not changed does nothing at all.

That last property is what makes unattended saving safe. An assistant can call this after every meaningful step without filling an account with near-identical revisions, because an unchanged save is recognized and discarded server side.

Requires an API key. A free key is enough. Memory belongs to the key that wrote it, so there is nothing to attach an anonymous memory to.

Parameters

ParameterTypeDescription
sessionstringrequiredA stable name for this thread of work that the assistant can reproduce on the next call, e.g. acme-api/auth-refactor. Reusing it is what makes a save an update instead of a duplicate. 1 to 120 characters of letters, digits, spaces and . _ : @ / # -, starting with a letter, digit, or slash, so an absolute repository path works unchanged.
contentstringrequiredThe complete memory as it stands now, not a delta. It replaces the current content; the previous copy is preserved as a version.
titlestringoptionalA short, stable title. Keeping it the same across saves makes the history read as one thing changing over time. Defaults to the session name.
languagestringoptionalSyntax-highlighting language. Defaults to markdown, which fits conversation memory.
tagsstring[]optionalUp to 20 labels for later retrieval. Lowercase letters, digits and single hyphens; a tag that cannot be normalized is rejected rather than silently dropped, so a memory is never quietly untagged.
kindenumoptionalconversation, decision, code, research, note, or log. Defaults to conversation.
pilestringoptionalOptional named collection to file this memory into, created on first use. Lets a set of related memories be opened and shared with one link.

Example

Keep track of what we decided about the auth refactor.
Request
{
  "name": "pastepile_remember",
  "arguments": {
    "session": "acme-api/auth-refactor",
    "title": "Auth refactor decisions",
    "content": "## Decided\n\nToken refresh moves into edge middleware...",
    "tags": ["auth", "edge"],
    "kind": "decision"
  }
}
Result
{
  "remembered": true,
  "action": "created",
  "session": "acme-api/auth-refactor",
  "slug": "aB3xY9z",
  "url": "https://www.pastepile.com/p/aB3xY9z",
  "checkpoints": 1,
  "version_no": 0,
  "expires_in_days": 30,
  "next_save": "Call pastepile_remember again with session \"acme-api/auth-refactor\" to update this memory. You do not need the slug for that."
}

What action means

actionWhat happened
createdFirst save under this session. A new memory now exists.
checkpointedThe memory was updated. The content it replaced is now in version history.
unchangedThe content matched what was already stored, so nothing was written. Counted, so an over-eager autosave policy is visible rather than invisible.
deduplicatedThis exact content already existed under a different session, so the session now points at that memory instead of a second copy being made.

Behavior notes

  • Deduplication is by a hash of title plus content across everything the key has stored, not just within one session. Saving the same thing under two names produces one memory with two names pointing at it.
  • A free key cannot hold a never-expiring paste, so memory on a free key is a rolling 30-day window. The exact expiry date is returned on every save rather than left to be discovered when something disappears.
  • Marked non-destructive and idempotent: nothing this tool can be called with removes data, and repeating a call with the same content is a genuine no-op. Hosts can therefore run it without a confirmation prompt.

Errors

ErrorCause
No API keyThe tool fails locally without a request and points at /keys. Memory has an owner by definition.
invalid_session (400)The session name is empty, too long, or has stray characters.
invalid_tags (400)A tag could not be normalized. The message names the offending tag.
invalid_kind (400)The kind is not one of the six.
payload_too_large (413)A single memory is capped at 1 MB.
rate_limited (429)The per-key request budget is exhausted.

Related documentation