Agent_Memory_Techniques: Instructions file for Codex

AGENTS.md

Agent_Memory_Techniques AGENTS.md is an instructions file for Codex, OpenCode from NirDiamant/Agent_Memory_Techniques. It costs 975 tokens per session, scanned A, original, Apache-2.0.

A teaching repository containing runnable notebooks about memory techniques for AI agents. It explains ways to retain, retrieve, and evaluate information in large-language-model applications, rather than providing a package to install.

In plain words
What is it for?
Use it to study conversation buffers, vector and graph stores, retrieval, memory frameworks, evaluation, and production deployment patterns for AI agents.
Why use it?
It gives learners working examples and explanations instead of requiring them to assemble the concepts from separate sources. Each technique also documents when it helps and where it falls short.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is NirDiamant/Agent_Memory_Techniques's own configuration. It tells Codex and OpenCode how to work on Agent_Memory_Techniques itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Agent_Memory_Techniques configures →

About the project

NirDiamant/Agent_Memory_Techniques is a collection of runnable Jupyter notebooks that teaches how LLM agents retain and retrieve information, including conversation history, vector stores, knowledge graphs, and episodic or semantic memory. It is for learners and developers studying agent-memory designs and production patterns. The catalogue instruction supports working through these techniques with a coding agent.

NirDiamant/Agent_Memory_Techniques · 1,133 stars · on GitHub · diamantai.substack.com

Reuse

Borrowing it

Nothing to install: this file belongs to NirDiamant/Agent_Memory_Techniques. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/NirDiamant/Agent_Memory_Techniques/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/NirDiamant/Agent_Memory_Techniques

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 Agent_Memory_Techniques AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/nirdiamant/agent_memory_techniques/agents-md/github.svg)](https://agentmods.dev/instructions/nirdiamant/agent_memory_techniques/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/nirdiamant/agent_memory_techniques/agents-md"><img src="https://agentmods.dev/badge/instructions/nirdiamant/agent_memory_techniques/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Agent_Memory_Techniques AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/nirdiamant/agent_memory_techniques/agents-md"><img src="https://agentmods.dev/badge/instructions/nirdiamant/agent_memory_techniques/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 975 This file is loaded in full into every session.
When invoked 975 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00975 $0.00975
Opus 5.5 $0.00390 $0.00390
Sonnet 5.5 $0.00195 $0.00195
Haiku 4.5 $0.00097 $0.00097

Measured 14d ago against content hash 4bb1e9f2007f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Agent_Memory_Techniques 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 14d 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 · 56 lines

How it starts

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

AGENTS.md

Guidance for AI coding agents working in this repository. Humans are welcome to read it too; it is plain Markdown and GitHub renders it.

What this repository is

Agent_Memory_Techniques is a hands-on cookbook for agent memory in LLM applications: 30 runnable Jupyter notebooks covering every major memory pattern, from short-term conversation buffers through vector and graph stores, cognitive architectures, retrieval patterns, the major frameworks (Mem0, Letta/MemGPT, Zep, Graphiti), evaluation and production deployment. Each notebook is paired with a sub-README explaining the technique, when to use it, its limitations and an architecture diagram.

It is a teaching repository, not a library. There is no package to install.

Layout

Path What lives there
all_techniques/ The 30 technique directories, numbered 01_ to 30_. Each holds a notebook plus its own README.
docs/ CONTENT_STANDARDS.md, glossary.md, learning_path.md, architecture.md.
utils/ Shared helpers imported across notebooks.
tests/ Import and smoke tests.
data/ Sample data.
llms.txt Machine-readable link map of the whole repository.
CITATION.cff Citation metadata.
ROADMAP.md Current state and upcoming work.

Working here

  • docs/CONTENT_STANDARDS.md is binding. Short sentences, active voice, no marketing words, analogy first. Read it before writing any prose in this repository. It overrides your default writing style.
  • One technique, one numbered directory, containing the notebook and a README that covers what the technique is, when to use it, when not to, and a diagram.
  • Numbering is meaningful. 01-05 short-term, 06-11 long-term, 12-19 cognitive architectures, 20-23 retrieval and multi-agent, 24-27 frameworks, 28-30 evaluation and production. A new technique goes where it belongs in that progression.
  • Every new term goes in docs/glossary.md.
  • Update llms.txt and README.md whenever you add, rename or remove a technique.
  • Notebooks must run top to bottom from a clean kernel. API keys come from the environment.
  • Read .github/CONTRIBUTING.md before opening a pull request. It supersedes this file where they differ.

Read the full file on GitHub · 56 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. 14d ago Changed · -1 lines · -16 tokens per session 4bb1e9f2007f
  2. 1mo ago First seen · 57 lines · 991 tokens per session scan A 4c02d1f1a58e

Subscribe to this mod's changes

Agent_Memory_Techniques AGENTS.md is an instructions file published in the GitHub repository NirDiamant/Agent_Memory_Techniques (1,133 stars, last pushed 5d ago), licensed Apache-2.0. It adds 975 tokens to every session, about $0.0039 per session on Opus 5.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-09-16.

Related

Agent_Memory_Techniques AGENTS.md compared with instructions from other repositories

Agent_Memory_Techniques AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Agent_Memory_Techniques AGENTS.mdNirDiamant/Agent_Memory_TechniquesInstructions file1.1k5d agoApache-2.0A975Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode