Skill

agent-memory-vault

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.

Category
optional
Version
1.0.0
License
MIT
Status
active
Length
89 lines
Source
skills/optional/agent-memory-vault/SKILL.md

Install and discovery

npx --yes --package @youcisla/agent-foundry agent-foundry-install

After the installer runs, this record is available as agent-memory-vault. See the docs for harness roots and verification steps.

Contents

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.