agentmemory AGENTS.md

Project-specific instructions for an AI coding agent working on agentmemory, a system that stores information for future coding sessions. They describe its structure, development tools, and rules for keeping related files consistent.

In plain words
What is it for?
Following the repository's design, registering functions and triggers correctly, building the TypeScript project, and running its tests.
Why use it?
They reduce mistakes caused by ignoring the project's architecture or updating only part of a change. They also show which files must be changed together when adding or removing tools.

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/rohitg00/agentmemory/agents-md
Clone the repo
git clone --depth 1 https://github.com/rohitg00/agentmemory

Made for: Codex, OpenCode.

Per session 1,546 This file is loaded in full into every session.
When invoked 1,546 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.01546 $0.01546
Opus 5 $0.00773 $0.00773
Sonnet 5 $0.00309 $0.00309
Haiku 4.5 $0.00155 $0.00155

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

Security

Grade A, and why

agentmemory 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 2d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 125 lines

How it starts

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

agentmemory — Agent Instructions

Architecture

agentmemory is a persistent memory system for AI coding agents, built on iii-engine's three primitives (Worker/Function/Trigger). Everything goes through registerFunction/registerTrigger/sdk.trigger() — never bypass iii-engine with standalone SQLite or in-process alternatives.

  • Engine: iii-sdk (WebSocket to iii-engine on port 49134)
  • State: File-based SQLite via iii-engine's StateModule (./data/state_store.db)
  • Build: TypeScript → ESM via tsdown, output to dist/
  • Test: vitest (npm test excludes integration tests)

Consistency Rules

When adding or removing MCP tools, you MUST update ALL of the following:

  1. src/mcp/tools-registry.ts — tool definition + getAllTools() array
  2. src/mcp/server.ts — handler case in the mcp::tools::call switch
  3. src/triggers/api.ts — REST endpoint registration
  4. src/index.ts — function registration + endpoint count in the log line
  5. test/mcp-standalone.test.ts — tool count assertion
  6. README.md — tool counts (search for "MCP tools")
  7. plugin/.claude-plugin/plugin.json — tool count in description
  8. plugin/plugin.json and plugin/.mcp.copilot.json (when present) — tool count or MCP exposure

When adding REST endpoints, you MUST update:

  1. src/triggers/api.ts — endpoint registration
  2. src/index.ts — endpoint count in the log line
  3. README.md — endpoint count (search for "REST endpoints" and "endpoints on port")

When bumping version, you MUST update ALL of the following:

  1. package.json — version field
  2. src/version.ts — VERSION constant and type union
  3. src/types.ts — ExportData version union
  4. src/functions/export-import.ts — supportedVersions set
  5. test/export-import.test.ts — version assertion
  6. plugin/.claude-plugin/plugin.json — version field
  7. plugin/plugin.json (when present) — version field

When adding new KV scopes:

  1. src/state/schema.ts — add to the KV object
  2. src/types.ts — add the corresponding interface

Read the full file on GitHub · 125 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. 2d ago First seen · 125 lines · 1,546 tokens per session scan A 99185c14088f

Subscribe to this mod's changes

agentmemory AGENTS.md is an instructions file published in the GitHub repository rohitg00/agentmemory (27,906 stars, last pushed 2d ago), licensed Apache-2.0. It adds 1,546 tokens to every session, about $0.0077 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-30.

Related

Other instructions, from other repositories

clicodelog CLAUDE.md

Instructions for monk1337/clicodelog, covering claude.md, commands, run the app, or without installing and common flags.

monk1337/clicodelog · 1,558 tokens

claude-code-setup CLAUDE.md

Claude Code instructions for petekp/claude-code-setup: This repo is my version-controlled configuration for Claude Code and Codex: skills, hook scripts, settings, and the symlink setup that wires them into /.claude and /.codex. It is bash and markdown only — no application code, build step, or test suite.

petekp/claude-code-setup · 816 tokens

claude-code-setup AGENTS.md

AGENTS.md instructions for petekp/claude-code-setup: This repo is my version-controlled configuration for Claude Code and Codex: skills, hook scripts, settings, and the symlink setup that wires them into /.claude and /.codex. It is bash and markdown only — no application code, build step, or test suite.

petekp/claude-code-setup · 258 tokens

aeon CLAUDE.md

Instructions for aeonfun/aeon, covering aeon, how aeon works, strategy, voice and soul file hierarchy (read in this order).

aeonfun/aeon · 3,720 tokens

ken CLAUDE.md

Instructions for townsendmerino/ken, covering claude.md, what this is, repository ownership (read this first), commands and embedding parity & golden fixtures (now in aikit).

townsendmerino/ken · 6,633 tokens

gangsta GEMINI.md

Instructions for kucherenko/gangsta, a project described as: AI agentic skills framework for spec-driven development, built on the organizational model of mafia.

kucherenko/gangsta · 29 tokens