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

agent-memory-vault

Skill1 starsChanged 23 days agoMITView on GitHub

Structured, file-backed memory for autonomous agents that must recall decisions and preferences across runs. Use when a workflow needs durable facts that outlive a single session.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run from the repository root:

    line 32
  2. Distinctive:

    Run one writer at a time, or wrap calls in your scheduler's lock.

    line 57
  3. Very specific:

    If Python is unavailable, keep one topic.jsonl file and append one JSON object per line with a key and value.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “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

Agent Memory Vault

A small JSONL-backed fact store for agents. It records keyed values per topic and returns recent context at the start of a later run. It is not a transcript log, a vector index, or a multi-writer database.

Procedure

What ships

The script is skills/optional/agent-memory-vault/scripts/memory.py. It uses only the Python standard library (Python 3.10+).

Storage defaults to ~/.agent-memory/; set AGENT_MEMORY_HOME to relocate it. Each topic is an append-only .jsonl file plus an index.json summary.

Commands

Run from the repository root:

python skills/optional/agent-memory-vault/scripts/memory.py put \
  --topic=preferences --key=code-style --value="2-space indent"
python skills/optional/agent-memory-vault/scripts/memory.py get \
  --topic=preferences --key=code-style
python skills/optional/agent-memory-vault/scripts/memory.py list --topic=preferences
python skills/optional/agent-memory-vault/scripts/memory.py context --last=10

Topics

TopicWhat goes here
preferencesUser preferences (style, tools, languages)
decisionsArchitecture or design choices with rationale
project-stateWork in progress, blockers, recent changes
errorsErrors encountered and fixes
glossaryDomain-specific terms

Concurrency limit

The script appends entries and then rewrites index.json without a file lock. Two writers at the same time can interleave lines or lose an index update. Run one writer at a time, or wrap calls in your scheduler's lock. Treat this as a single-writer store, not a shared database.

Cron example

# Daily at 09:00: load preferences, then append findings.
0 9 * * * cd "$HOME/agent" && \
  <your-agent-command> "Load memory topic preferences; append today's findings to topic briefing."

Replace <your-agent-command> with your harness command. No scheduler or agent loop ships with this skill.

Manual fallback

If Python is unavailable, keep one topic.jsonl file and append one JSON object per line with a key and value. The context command will not parse it, so read the last N lines directly and state that the index is stale.

Anti-patterns

  • Storing secrets, tokens, or credentials in the vault.
  • Writing free-form notes without a topic key; they become unsearchable.
  • Running multiple cron jobs against the same topic without an external lock.
  • Treating the vault as a transcript or as project documentation.

Verification Checklist

  • put followed by get returns the same value.
  • list --topic=<topic> shows the expected entry count.
  • context --last=10 includes the new entry and no secret values.
  • A second writer was not running during the test.

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.