agentleFS
youcislayoucisla/Agent-Foundry/skills/optional/persistent-memory/SKILL.md

persistent-memory

Skill1 starsChanged 23 days agoMITView on GitHub

Decide when a cross-session memory backend is worth adopting, then set capture, retention, redaction, and injection limits before enabling it. Use when an agent must recall decisions across sessions and the harness has no built-in memory.

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If any answer is missing, write a handoff note instead.

    line 31
  2. Distinctive:

    Start in a scratch project with a canary secret in the transcript.

    line 48
  3. Distinctive:

    Verify the canary never appears in stored records or injected context.

    line 49
  4. Distinctive:

    Run one session with the backend disabled to confirm work continues.

    line 51

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Persistent Memory

Instruction-only guidance for adopting a cross-session memory backend. No memory service, hook, or database ships with this skill.

The license field records Apache-2.0 for this skill's text. Any backend you choose carries its own license and terms; check them separately.

Procedure

The decision

Adopt a backend only when all three are true:

  1. The harness loses context that the next session genuinely needs.
  2. Project docs and a short handoff note cannot carry that context.
  3. You can name what is captured, where it is stored, and how it is deleted.

If any answer is missing, write a handoff note instead.

What a backend must specify

QuestionRequired answer
Capture scopeWhich events: prompts, tool calls, file paths, outputs?
RedactionWhich patterns are removed before storage, and when?
StorageLocal file, local database, or remote service? Encryption at rest?
RetentionHow long, and what triggers deletion?
InjectionMaximum characters or tokens added to a future prompt?
Failure modeWhat happens when the backend is unavailable?
ExitHow does a user disable capture and delete existing records?

Adoption procedure

  1. Record the answers above in the project's docs, not only in chat.
  2. Start in a scratch project with a canary secret in the transcript.
  3. Verify the canary never appears in stored records or injected context.
  4. Cap injection to the smallest useful window; review what was injected.
  5. Run one session with the backend disabled to confirm work continues.
  6. Enable it project-wide only after steps 1-5 pass.

Platform scope

Harness integrations differ and change. This repository does not certify Claude Code, Codex, Cursor, Gemini, Hermes, or OpenCode support. Check the backend's own documentation for the current adapter and test it in your environment before relying on it.

Anti-patterns

  • Capturing transcripts before redaction is configured.
  • Using memory as a substitute for project docs or design rationale.
  • Enabling injection with no size cap or review step.
  • Keeping records with no deletion path.
  • Assuming a first session has history to inject.

Verification Checklist

  • A canary secret was absent from storage and from injected context.
  • The injection cap is configured and visibly enforced.
  • Deleting records removes them from every configured store.
  • A session with the backend disabled still completes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.