AGENTS.md@internal/memoryA

AGENTS.md@internal/memory from iohub/yagent is an AGENTS.md file: the standing instructions coding agents read in that repo.

Install it, pinned
mdr add iohub/yagent/internal/memory/AGENTS.md@git:20261024.9b44441

Pins git:20261024.9b44441 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
AGENTS.md file
Repository
iohub/yagent
Path
internal/memory/AGENTS.md
Versions recorded
3
Latest version
git:20261024.9b44441, committed Oct 24, 2026
First version recorded
Oct 21, 2026
Size
9,465 bytes
Repository stars
31
License
Apache-2.0

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# internal/memory — rollout 账本与重放读侧

> 范围:本目录内不可派生的约束。全局见仓库根 `AGENTS.md` §6.7。

## 边界

rollout JSONL 的**唯一写入者与唯一事实来源**:`/resume`、检查点、重放都只读它。
只管"会话账本":不管压缩策略、不管委派编排、不判断业务对错。
仓库级持久知识不在这里(那是 `internal/blueprint`)——顺带住在这里的 KV 存储
(`SharedMemory` / `LocalMemory`)已于 2026-10-22 随知识整理机制一并删除。
任务记忆 `~/.yagent/tasks/*.jsonl` 在 `internal/datamanager`,**不是**断点续跑的事实来源。

## 硬约束

**1. 检查点指纹只能由读侧计算**(`rollout_checkpoint.go:93-104`)。写侧必须调用与重放端同一个
`FinalizeCheckpoint`,对**整份文件重建出的**消息序列算 sha256。按内存里那份算的后果:任何触发过
压缩的会话(=每一个长任务)都会在自己的检查点上对不上号,B 层恰好死在它最该起作用的地方。
`Reasoning` 必须算进指纹(`:35-37`,thinking 要回灌给 provider,漏算不是"少几个 token"而是
"整次重放被判成不可信");`IsAnchored` / `TruncationMarker` 刻意不在(`:38-40`)。

**2. 读自己写过的文件之前必须先排干。** 落盘是攒批的(32 条 / 20ms,`rollout_writer.go:45-46`)。
自己拼 `Flush + FinalizeCheckpoint(path)` 的调用点一定会拿到"少几条"的指纹——它不报错,
只是把能重放的会话判成损坏(`rollout_checkpoint.go:124-143`、`rollout_writer.go:286-291`)。

**3. `ConversationMemory.messages` 不导出,读写只走方法**:`Snapshot()` 拿拷贝、
`Append`/`Add*` 写、`Replace` 整体装载(不触发 MaxSize 截断)、`LastMessage()` 返回**拷贝**
(`memory.go:62-70`)。注释给出的三条理由:并发注入跑在工作线程上(planner 在主线程写同一份);
留一个导出字段就等于承诺"锁保护一切",而改之前它有 31 处包外直接读写、`datamanager` 甚至会 append;
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add iohub/yagent/internal/memory/AGENTS.md@sha256:ff0847e08822dea4

The line at the top of this page pins the label git:20261024.9b44441, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_ambcodg5rukvwsm4.svg)](https://markdownregistry.com/a/art_ambcodg5rukvwsm4)

2 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 3 versions of this file, between Oct 21, 2026 and Oct 24, 2026, about one every 2 days.

versioncommittedcommitsizeaudit
git:20261024.9b44441 latest2026-10-24 9b44441 9,465 BA view · diff
git:20261022.53411ac2026-10-22 53411ac 4,482 BA view · diff
git:20261021.9f5bf872026-10-21 9f5bf87 4,569 BA view

Audit of the latest version

A  14 of 14 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Size between 200 bytes and 200 KB (9465 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

iohub/yagent · 31 stars · license Apache-2.0 · pushed 2026-11-05 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_ambcodg5rukvwsm4
GET https://markdownregistry.com/api/v1/resolve?ref=iohub/yagent/internal/memory/AGENTS.md
GET https://markdownregistry.com/api/v1/blob/ff0847e08822dea45bca702ddb67236b619fabcb76e4000a2bc1e32cb5feb538

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: how to write a good AGENTS.md · AGENTS.md vs CLAUDE.md · which agent file does what.

More from iohub/yagent

AGENTS.md AGENTS.md file
iohub/yagent · AGENTS.md
git:20261103.104f21a · audit A · 31 stars
AGENTS.md@internal AGENTS.md file
iohub/yagent · internal/AGENTS.md
git:20261026.7381d71 · audit A · 31 stars
AGENTS.md@internal/agents AGENTS.md file
iohub/yagent · internal/agents/AGENTS.md
git:20261103.104f21a · audit A · 31 stars
AGENTS.md@internal/agents/director AGENTS.md file
iohub/yagent · internal/agents/director/AGENTS.md
git:20261103.104f21a · audit A · 31 stars
AGENTS.md@internal/app AGENTS.md file
iohub/yagent · internal/app/AGENTS.md
git:20261024.9b44441 · audit A · 31 stars
AGENTS.md@internal/blackboard AGENTS.md file
iohub/yagent · internal/blackboard/AGENTS.md
git:20261026.89c0391 · audit A · 31 stars
AGENTS.md@internal/blueprint AGENTS.md file
iohub/yagent · internal/blueprint/AGENTS.md
git:20261026.9762922 · audit A · 31 stars
AGENTS.md@internal/browserctl AGENTS.md file
iohub/yagent · internal/browserctl/AGENTS.md
git:20261030.25a3126 · audit A · 31 stars
AGENTS.md@internal/compression AGENTS.md file
iohub/yagent · internal/compression/AGENTS.md
git:20261028.19903d6 · audit A · 31 stars
AGENTS.md@internal/config AGENTS.md file
iohub/yagent · internal/config/AGENTS.md
git:20261024.9b44441 · audit A · 31 stars
AGENTS.md@internal/http AGENTS.md file
iohub/yagent · internal/http/AGENTS.md
git:20261026.7381d71 · audit A · 31 stars
AGENTS.md@internal/llm AGENTS.md file
iohub/yagent · internal/llm/AGENTS.md
git:20261027.0637c8b · audit A · 31 stars

Every file in iohub/yagent

Browse by kind, by grade A, or by owner.