setup

A setup command for the agmem project-memory tool. It checks whether the command-line tool is installed, initializes and indexes the repository, and runs a sample search.

In plain words
What is it for?
Use it when enabling agmem in a repository, verifying that indexing works, and optionally preparing automatic updates from Git commits or pulls.
Why use it?
It removes the manual steps needed to prepare a repository for persistent project memory.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/albedoweb/agmem/setup
Clone the repo
git clone --depth 1 https://github.com/albedoweb/agmem
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 416 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00013 $0.00416
Opus 5 $0.00006 $0.00208
Sonnet 5 $0.00003 $0.00083
Haiku 4.5 $0.00001 $0.00042

Measured yesterday against content hash bef55c24ae32, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/commands/setup.md · 40 lines

What it actually says

Set up agmem (persistent project memory) for the current repository. Follow these steps, reporting progress briefly after each:

  1. Check the binary. Run command -v agmem. If missing, install it — prefer whichever tool the user has:

    • uv tool install --from git+https://github.com/albedoweb/agmem agmem
    • or pipx install git+https://github.com/albedoweb/agmem Do NOT use pip install agmem — that is an unrelated PyPI package.
  2. Initialize and index. From the repo root:

    agmem init && agmem index
    

    init is idempotent. Do not pass --install-hook — this plugin already provides the UserPromptSubmit hook, and installing both would inject context twice. (If the user previously ran agmem init --install-hook in this repo, suggest removing that hook from .claude/settings.json.)

  3. Optional git hooks. Ask the user if they want memory auto-updated on commits and pulls; if yes:

    agmem init --install-git-hook
    
  4. Verify. Run a sample query with identifier-style tokens taken from the repo (a module name, a resource, a distinctive file basename):

    agmem context "<identifiers from this repo>" -n 4
    

    Show the user the output. If results look thin, mention that memory improves as rules/facts are saved with agmem remember.

  5. Point the user at agmem --help and note that everything lives in .agmem/ as plain JSONL they can inspect with cat and commit to git if they want to share memory with teammates.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 40 lines · 13 tokens per session scan A bef55c24ae32

Subscribe to this mod's changes

setup is a command published in the GitHub repository albedoweb/agmem (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 13 tokens to every session and 416 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.