agent-memory: Instructions file for Codex

AGENTS.md

agent-memory AGENTS.md is an instructions file for Codex, OpenCode from openJiuwen-ai/agent-memory. It costs 3,140 tokens per session, scanned A, original, Apache-2.0.

Project instructions for agent-memory, a system that collects, builds, searches, and stores information for later use. They describe the repository layout, instruction-file hierarchy, testing, deployment, and development rules.

In plain words
What is it for?
They help navigate the codebase, find tests and documentation, understand memory-system components, and follow the project's build and test procedures.
Why use it?
They give an agent or new contributor the project context needed to work in the right files and follow local constraints. This reduces mistakes caused by ignoring module boundaries or repository conventions.

Instructions file for CodexOpenCode

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

This is openJiuwen-ai/agent-memory's own configuration. It tells Codex and OpenCode how to work on agent-memory 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 configures →

Reuse

Borrowing it

Nothing to install: this file belongs to openJiuwen-ai/agent-memory. 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/openJiuwen-ai/agent-memory/mem2.0/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/openJiuwen-ai/agent-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 agent-memory AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/openjiuwen-ai/agent-memory/agents-md/github.svg)](https://agentmods.dev/instructions/openjiuwen-ai/agent-memory/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/openjiuwen-ai/agent-memory/agents-md"><img src="https://agentmods.dev/badge/instructions/openjiuwen-ai/agent-memory/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 AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/openjiuwen-ai/agent-memory/agents-md"><img src="https://agentmods.dev/badge/instructions/openjiuwen-ai/agent-memory/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,140 This file is loaded in full into every session.
When invoked 3,140 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.03140 $0.03140
Opus 5.5 $0.01256 $0.01256
Sonnet 5.5 $0.00628 $0.00628
Haiku 4.5 $0.00314 $0.00314

Measured 3d ago against content hash 07cce3a84a27, 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 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 · 121 lines

How it starts

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

agent-memory

结构化记忆系统 —— 负责记忆的摄入、构建、检索与生命周期管理。

项目结构

.
├── jiuwen_memory/      # 内核源码(接口/接入/构建/检索/编排/存储/共享插件)
├── tests/              # 测试(unit / integration,路径镜像 jiuwen_memory/)
├── jiuwen_memory_entry/  # 接入形态(CLI / HTTP / MCP / SDK;whl 独立顶层)
├── docs/               # 设计文档归档(design / specs / features)
├── jiuwen_memory_adapter/ # 外部 agent 插件适配(whl 独立顶层)
├── deploy/             # 部署配置(docker / local)
├── evaluation/         # 评测框架(benchmark / metrics / smoke_test)
├── examples/           # 使用示例与快速上手
├── scripts/            # 运行脚本(run-cli / run-server / run-mcp,见「环境与运行」)
└── .claude/            # AI 辅助工具配置(rules / skills / settings)

AGENTS.md 层级

AGENTS.md                        ← 本文件:项目入口,目录结构 + 测试/代码风格/归档/提交约定
jiuwen_memory/AGENTS.md          ← 内核总览:模块地图 + 数据流 + 架构铁律 + 子模块 AGENTS.md 创建规则
jiuwen_memory/<subdir>/AGENTS.md ← 模块本地:代码目录结构、文件关系、入口、行为铁律、本地约束
docs/AGENTS.md                   ← 文档归档规约:文档目录结构、命名规则、文档骨架、提交约定

职责边界:

  • 本文件:新人入口,描述项目是什么、怎么构建、代码风格、提交规范
  • jiuwen_memory/AGENTS.md:内核开发者入口,描述模块间关系和数据流走向
  • jiuwen_memory/<subdir>/AGENTS.md:模块本地规约,只写相对稳定的结构性约束(模块职责边界、行为铁律、本地约束、文件关系),不写会频繁变化的特性设计
  • docs/specs/:跨模块接口规约(接口契约、协议、不变量、公共 API),相对稳定
  • docs/features/:特性设计文档(决策、方案取舍、验证基线、已知遗留),承载会变化的特性层面内容
  • docs/AGENTS.md:只讲归档结构与命名规约,不重复模块设计内容

环境与运行

  • Python:>=3.11。包为顶层布局(jiuwen_memory / jiuwen_memory_entry / jiuwen_memory_adapter),无 src/ 布局——仓库根存在空的 src/ 目录但未纳入 [tool.setuptools.packages.find],不要往里放代码或从中导入。
  • 安装:pip install -e ".[dev]" 装开发依赖。按需追加 extras:deploy(Milvus/ES/Redis/PG 真后端 + api_reranker 出站 httpx)、mcp(MCP server)、nlp(spacy/hanlp)、embed(FlagEmbedding/torch)。pyproject.toml 已配 uv 阿里云镜像。
  • 运行入口用 scripts/run-{cli,server,mcp}.sh:它们已把 PYTHONPATH 设为 仓库根:jiuwen_memory_entry/core;直接 python -m jiuwen_memory_entry... 会因缺 jiuwen_memory_entry/core 路径导致导入失败。
    • CLI:scripts/run-cli.sh
    • HTTP server:scripts/run-server.sh
    • MCP:scripts/run-mcp.sh(需先 pip install ".[mcp]";默认 stdio,设 MCP_TRANSPORT=http + MCP_PORT 切 Streamable HTTP)
  • Postgres schema:scripts/pg_schema.sql(deploy 后端用)。

Read the full file on GitHub · 121 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 · 121 lines · 3,140 tokens per session scan A 07cce3a84a27

Subscribe to this mod's changes

agent-memory AGENTS.md is an instructions file published in the GitHub repository openJiuwen-ai/agent-memory (72 stars, last pushed yesterday), licensed Apache-2.0. It adds 3,140 tokens to every session, about $0.0126 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-10-22.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,581 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens