agents-memory AGENTS.md

agents-memory AGENTS.md is an instructions file for Codex, OpenCode from Lolaplex/agents-memory. It costs 1,011 tokens per session, scanned A, original, MIT.

Installation and operating instructions for agents-memory, a tool that stores reusable notes for coding agents at user and project level. They explain where its files live, how the repository is connected to the installed instructions, and how to install and maintain it.

In plain words
What is it for?
They help install agents-memory, configure its repository and user files, keep agent memory in the right locations, and clean up memory that was accidentally copied into example or tracked folders.
Why use it?
They make the installation process explicit and prevent live memory files from being committed to the repository. They also clarify which files should be edited and how memory is consolidated.

Instructions file for CodexOpenCode

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 instructions/lolaplex/agents-memory/agents-md
Clone the repo
git clone --depth 1 https://github.com/Lolaplex/agents-memory

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agents-memory AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lolaplex/agents-memory/agents-md.svg)](https://agentmods.dev/instructions/lolaplex/agents-memory/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/lolaplex/agents-memory/agents-md"><img src="https://agentmods.dev/badge/instructions/lolaplex/agents-memory/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,011 This file is loaded in full into every session.
When invoked 1,011 The same file — it is already loaded in full.
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.01011 $0.01011
Opus 5 $0.00505 $0.00505
Sonnet 5 $0.00202 $0.00202
Haiku 4.5 $0.00101 $0.00101

Measured 3d ago against content hash 2d4ed0659c80, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agents-memory AGENTS.md 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 3d ago.

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.

AGENTS.md · 41 lines

How it starts

The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent install (this repo)

You are installing local agent memory for the human. Do every step yourself. Do not dump a command list for them to run.

CLAUDE.md at this repo root is a git symlink to this file — edit AGENTS.md only. Sync does not rewrite engine-root CLAUDE.md (installed always-on lives in ~/.agents/). On Windows without symlink privilege the checkout may be a short stub; enable Developer Mode or recreate the symlink from git. Installed always-on: ~/.agents/AGENTS.md; Gemini, Zed, and ~/.claude/ bind to it. Foreign ~/.claude/CLAUDE.md is replaced on sync — back it up first. See abi/PLATFORM.md.

Live store is ~/.agents/memory (user) plus <repo>/.agents/memory (project). Never commit those live files. This clone's examples/*.example.* are scaffolding only. Run python -m agents_memory consolidate if live markdown leaked into memory/ or examples/.

Python is a package: src/agents_memory/. After pip install -e ., use python -m agents_memory (or agents-memory on PATH).

Procedure

  1. Install with the same interpreter you will keep using:
    • python -m pip install -e .
    • Windows: py -3 is fine if that is what your Agent uses. macOS/Linux: python3 if python is missing.
  2. First python -m agents_memory sync --init copies examples into ~/.agents/memory if missing, and runs consolidate_repo_leaks() so nothing live stays in this clone.
  3. Ask the human once (one short question batch):
    • name / work
    • how agents should talk
    • stack defaults
    • which folders hold their repos (absolute paths or ~/...)
    • any monorepo parents whose child repos should also be tracked → expand_children
  4. Write ~/.agents/memory/USER.md (real identity, not empty Name:) and scan.json (roots must exist on disk). agent_rule_name default user-rules.mdc is fine.
  5. Run python -m agents_memory sync --init from this repo root.
    • Copies examples only if live files are missing (never overwrites filled USER.md).
    • Writes your Agent always-on inject + canonical ~/.agents/AGENTS.md with CLAUDE.md bound to it (Gemini, ~/.claude/AGENTS.md). Does not create .agents/ or .cursor/ inside this engine clone.
    • Ensures each registered repo has .agents/memory/ files only (README.md, staging/captured.md) and projects/<slug>/README.md as a link. No empty subfolders. No .cursor/ in repos (scan skips .cursor).
    • Merges agents-memory into host MCP config (~/.cursor/mcp.json when your Agent uses it) using this Python (sys.executable -m agents_memory.mcp_server). Other MCP servers stay.
    • Merges host MCP servers into Zed context_servers and mirrors user skills into ~/.agents/skills.
  6. Run python -m agents_memory inventory. For each unknown folder: register (slug, path, role, stack) or --ignore. For missing: ask before deleting.
  7. Run python -m agents_memory ingest catalog to (re)build ~/.agents/memory/chats-index.md from local chat stores (Open AI GDPR export, Cursor, VS Code, Antigravity, Pi, …). Titles + paths only. Optional: python -m agents_memory ingest extract (Python filters → staging). Distill with MCP distill_batch / skill memory-distill.
  8. If you edited USER.md / scan.json after --init, run python -m agents_memory sync again.
  9. Tell the human one thing: reload your Agent (MCP). You cannot do that for them.

Read the full file on GitHub · 41 lines

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. 3d ago First seen · 41 lines · 1,011 tokens per session scan A 2d4ed0659c80

Subscribe to this mod's changes

agents-memory AGENTS.md is an instructions file published in the GitHub repository Lolaplex/agents-memory (3 stars, last pushed 2d ago), licensed MIT. It adds 1,011 tokens to every session, about $0.0051 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.

Related

Other instructions, from other repositories