Self-evolving agents自进化智能体
A scheduled loop that studies its own logs, promotes what is corroborated, and is graded on sealed tests.一个定时运行的循环:研究自己的日志,把得到印证的内容晋升为规则,并接受封存测试的评分。
What it is and why it exists它是什么,为什么需要它
What是什么
A self-evolving agent improves between conversations. This module builds the loop: observe failures in the logs, gather evidence across days, pass a promotion gate, test the proposed change on sealed evals, then apply or reject it.自进化智能体在两次对话之间变得更好。本模块搭建这个循环:从日志中观察失败、跨天积累证据、通过晋升关卡、在封存评估上测试拟议的改动,然后应用或否决。
Why为什么
Most improvement comes from noticing the same failure repeatedly and encoding the fix. Automating that is powerful and dangerous. The loop changes no model weights. It changes stored rules, and those reach an answer only through the prompt.大部分改进来自反复注意到同一种失败,并把修复方法固化下来。把这个过程自动化既强大又危险。这个循环不改变任何模型权重,它改变的是存储的规则,而规则只能通过提示词影响回答。
How it works工作原理
- Observation looks for failures that can be confirmed mechanically: an empty result that returns rows when one filter is removed.观察环节寻找可以机械确认的失败:某个结果为空,但去掉一个过滤条件后就有数据返回。
- Evidence is keyed by claim, origin, and day. Ten repeats in one day are one piece of evidence.证据以论断、来源和日期为键。同一天重复十次,只算一条证据。
- The gate promotes a candidate only after it is seen on enough separate days.关卡只在候选项在足够多的不同日期被观察到之后才予以晋升。
- Before a change is applied, the sealed agent eval runs with and without it. Worse means rejected.应用改动之前,分别在带与不带该改动的情况下运行封存的智能体评估。变差就否决。
- The loop writes one file of learned rules. It cannot write the evals, the gate, or the model.循环只写一个学到的规则文件。它无法改写评估、关卡或模型。
Where it sits in the build order它在搭建顺序中的位置
Needs first前置模块
- Evaluation评估A loop optimizes what it can measure. Sealed evals have to exist before the loop runs, or it grades itself.循环会优化它能测量的东西。封存评估必须先于循环存在,否则它就是在给自己打分。Build out of order不按顺序搭建 Stand in with:可用以下替代: None that is safe. You may run the loop in report mode without evals. Do not let it apply changes.没有安全的替代方案。没有评估时可以用报告模式运行循环,但不要让它应用任何改动。
- Memory记忆Learned rules are memory that belongs to the agent. They use the same store and the same status discipline.学到的规则是属于智能体自身的记忆。它们使用同一个存储和同样的状态管理方式。Build out of order不按顺序搭建 Stand in with:可用以下替代: Append findings to a Markdown file for a person to review.把发现追加到一个 Markdown 文件,交人审阅。
- Guardrails and verification护栏与验证The promotion gate is guard logic applied to stored knowledge, and it follows the same observe-first practice.晋升关卡是应用在已存储知识上的护栏逻辑,同样遵循先观察的做法。Build out of order不按顺序搭建 Stand in with:可用以下替代: Human approval of every promotion.每次晋升都由人工批准。
- RAG and knowledge graphRAG 与知识图谱When the loop studies documents, it reads indexed chunks and must skip the held-out ones.循环学习文档时读取的是已索引的文本块,并且必须跳过留出的那些。Build out of order不按顺序搭建 Stand in with:可用以下替代: Learn from logs only, as the lab does.只从日志中学习,lab 就是这么做的。
Unlocks解锁
Nothing depends on this. It is an end point of the map.没有模块依赖它。它是地图上的一个终点。
In the reference build在参考系统中
| Path路径 | Role作用 |
|---|---|
| apps/agent-server/nightly/self_observe.py | Finds confident wrong answers in the logs.从日志中找出自信但错误的回答。 |
| apps/agent-server/nightly/scheduler.py | Duty cycle and preemption for background work.后台任务的占空比控制和抢占机制。 |
| apps/agent-server/nightly/corroboration_audit.py | Checks that support is independent.检查支持证据是否相互独立。 |
| apps/agent-server/nightly/claim_verify.py | Two-vote check that takes unsupported claims out of service.双票核查,把没有依据的论断停用。 |
| SELF-EVOLUTION-LESSONS.md | What went wrong and what was changed.出过什么问题,以及做了哪些修改。 |
Process map流程图
One night of the loop循环的一个夜晚
- 1Read new log lines读取新的日志行A cursor makes sure each line is seen once.游标保证每一行只被处理一次。
- 2Confirm findings确认发现Re-run each empty tool call with one filter removed. Rows mean a parameter problem.把每个结果为空的工具调用去掉一个过滤条件后重新执行。有数据返回就说明是参数问题。
- 3Record evidence记录证据One row per claim, origin, and day.每个论断、来源和日期一行。
- 4Promotion gate晋升关卡Seen on enough separate days?是否在足够多的不同日期被观察到?
- 5Sealed eval, before and after封存评估:改动前后The proposed rule must not lower the score.拟议的规则不能让得分下降。
- 6Apply, reject, or report应用、否决或报告Report mode writes nothing. Apply mode appends one rule.报告模式什么都不写。应用模式追加一条规则。
Build steps搭建步骤
Follow them in order the first time. Each step names what it uses from earlier steps and what it leaves for later ones. Code is read from the lab files, and output is what the lab printed when it was run.第一次请按顺序做。每一步都写明它用到前面步骤的什么成果,又为后面的步骤留下什么。代码直接读取自 lab 文件,输出是 lab 实际运行时打印的内容。
- 1Check the four preconditions检查四项前提条件
- 2Observe: find failures that prove themselves观察:找出能自我证明的失败
- 3Record evidence so repetition cannot pose as support记录证据,不让重复冒充支持
- 4Assemble the nightly loop with the eval gate组装夜间循环,并加上评估关卡
- 5Run in report mode and read three days以报告模式运行,查看三天的情况
- 6Switch to apply and confirm the change切换到应用模式并确认改动
- 7Know what the lab does not prove明确 lab 没有证明什么
- 8Extend the loop to learn from documents把循环扩展到从文档中学习
- 9Keep rollback one command away让回滚只需一条命令
01Check the four preconditions检查四项前提条件
- the two log files两份日志文件 ← Harness engineeringHarness 工程 7: Assemble run(): guard, retry, log, record组装 run():护栏、重试、日志、记录
- read_new_lines()read_new_lines() ← State and storage状态与存储 6: Give every background job a cursor给每个后台任务一个游标
- the sealed agent eval封存的智能体评估 ← Evaluation评估 7: Evaluate the whole agent with mechanical checks用代码检查评估整个智能体
- the tested way to undo learning经过验证的撤销学习的方法 ← State and storage状态与存储 7: Check that learned state can be dropped alone确认学到的状态可以单独清除
Do this操作
- Logs: the harness writes tool calls and requests as JSON lines, and tool calls record empty results.日志:Harness 以 JSON Lines 记录工具调用和请求,并且工具调用会标明结果是否为空。
- Cursor: a job can read only new lines.游标:任务只能读到新增的行。
- Seal: the agent eval refuses to run on changed files.封存:文件被改动时,智能体评估拒绝运行。
- Reset: you have tested dropping learned state alone.重置:你已经测试过单独清除学到的状态。
- Self-evolving agents自进化智能体 2: Observe: find failures that prove themselves观察:找出能自我证明的失败 (logs and a cursor日志和游标)
02Observe: find failures that prove themselves观察:找出能自我证明的失败
- logs and a cursor日志和游标 ← Self-evolving agents自进化智能体 1: Check the four preconditions检查四项前提条件
- the call log's empty flag, and a registry to re-run calls调用日志里的 empty 标记,以及用来重新执行调用的注册表 ← Tools and MCP工具与 MCP 4: Check errors, caps, and cost检查错误处理、截断和开销
Do this操作
- Read new tool-call lines through the cursor.通过游标读取新的工具调用记录。
- For each empty result, re-run the call once per filter with that filter removed.对每个空结果,每次去掉一个过滤条件,重新执行调用。
- If a relaxed call returns rows, record a finding with the proof and the day.如果放宽后的调用返回了数据,就记录一条发现,附上证明和日期。
- Also record budget exhaustion and blocked calls as signals.同时把预算耗尽和被阻止的调用也记录为信号。
def observe(db: sqlite3.Connection, log_dir: Path, registry: Registry, day: str) -> list:
"""Read only the log lines not seen before (cursor), return findings tagged with the day."""
findings = []
for rec in read_new_lines(db, "observe:tool_calls", log_dir / "tool_calls.jsonl"):
if rec.get("blocked"):
findings.append({"signal": "blocked_call", "key": rec["tool"], "day": day})
elif rec.get("empty") and rec.get("arguments"):
for drop in rec["arguments"]: # confirm by re-running, minus one filter
relaxed = {k: v for k, v in rec["arguments"].items() if k != drop}
again = registry.call(rec["tool"], relaxed)
if again.get("rows") or again.get("results"):
findings.append({"signal": "recoverable_empty", "key": f"{rec['tool']}.relax_{drop}", "day": day,
"proof": f"{rec['arguments']} -> 0 rows; without {drop} -> {again.get('count', len(again.get('results', [])))} rows"})
break
for rec in read_new_lines(db, "observe:requests", log_dir / "requests.jsonl"):
if rec.get("budget_exhausted"):
findings.append({"signal": "budget_exhaustion", "key": "rounds", "day": day})
return findings03Record evidence so repetition cannot pose as support记录证据,不让重复冒充支持
- findings发现 ← Self-evolving agents自进化智能体 2: Observe: find failures that prove themselves观察:找出能自我证明的失败
- brain_claims and brain_evidencebrain_claims 和 brain_evidence 表 ← State and storage状态与存储 3: Create the schema, grouped by owner按归属分组建表
Do this操作
- Insert the claim as a candidate if it is new.如果是新的论断,就作为候选项插入。
- Insert evidence with a primary key of claim, origin, and day. A second insert on the same day is ignored.以论断、来源、日期为主键插入证据。同一天的第二次插入会被忽略。
- For claims from documents the origin is the document, so copies of one text count once.对来自文档的论断,来源就是文档,所以同一文本的多份副本只算一次。
def add_evidence(db: sqlite3.Connection, findings: list) -> None:
for f in findings:
if f["signal"] != "recoverable_empty":
continue
db.execute("INSERT OR IGNORE INTO brain_claims (kind, text, source_ref, status, formed_at) VALUES (?,?,?,?,?)",
("self_observation", f["key"], "logs/tool_calls.jsonl", "candidate", f["day"]))
claim_id = db.execute("SELECT claim_id FROM brain_claims WHERE kind='self_observation' AND text=?",
(f["key"],)).fetchone()[0]
db.execute("INSERT OR IGNORE INTO brain_evidence VALUES (?,?,?)", (claim_id, "self", f["day"])) # one per day
db.commit()
def ready_for_promotion(db: sqlite3.Connection) -> list:
"""Candidates seen on enough distinct days."""
rows = db.execute("""SELECT c.claim_id, c.text, count(DISTINCT e.day) FROM brain_claims c
JOIN brain_evidence e USING (claim_id)
WHERE c.status='candidate' GROUP BY c.claim_id HAVING count(DISTINCT e.day) >= ?""",
(DAYS_REQUIRED,)).fetchall()
return [{"claim_id": r[0], "key": r[1], "days": r[2], "rule": RULE_TEXT.get(r[1])} for r in rows if r[1] in RULE_TEXT]
def standing(db: sqlite3.Connection) -> list:
return db.execute("""SELECT c.text, c.status, count(DISTINCT e.day) FROM brain_claims c
LEFT JOIN brain_evidence e USING (claim_id) GROUP BY c.claim_id ORDER BY c.claim_id""").fetchall()04Assemble the nightly loop with the eval gate组装夜间循环,并加上评估关卡
- the gate关卡 ← Self-evolving agents自进化智能体 3: Record evidence so repetition cannot pose as support记录证据,不让重复冒充支持
- agent_eval.run()agent_eval.run() ← Evaluation评估 7: Evaluate the whole agent with mechanical checks用代码检查评估整个智能体
- the base prompt the rules are appended to规则所附加到的基础提示词 ← Harness engineeringHarness 工程 5: Compose the system prompt from parts分部分组装系统提示词
Do this操作
- Observe, then add evidence.先观察,再添加证据。
- For each candidate past the gate: build the proposed rules text.对每个通过关卡的候选项:生成拟议的规则文本。
- Run the sealed agent eval with the current rules, then with the proposed rules.先用当前规则运行封存的智能体评估,再用拟议规则运行一次。
- Worse: retire the candidate. Otherwise in apply mode: append the rule and mark it trusted. In report mode: list it and write nothing.变差:让候选项退役。否则,在应用模式下:追加规则并标记为可信;在报告模式下:列出它,什么都不写。
def nightly(db: sqlite3.Connection, log_dir: Path, registry: Registry, eval_dir: Path, rules_path: Path,
make_agent: Callable[[str], object], day: str, mode: str = "report") -> dict:
"""make_agent(rules_text) builds an agent whose prompt includes those rules."""
report = {"day": day, "mode": mode, "applied": [], "rejected": [], "pending": []}
findings = observe(db, log_dir, registry, day) # 1 look at yesterday
report["findings"] = [f["key"] for f in findings if f["signal"] == "recoverable_empty"]
add_evidence(db, findings) # 2 one piece of evidence per day
for cand in ready_for_promotion(db): # 3 the gate
current = read_rules(rules_path)
proposed = current + cand["rule"] + "\n"
before = agent_eval.run(lambda rep: make_agent(current), eval_dir) # 4 sealed eval, without
after = agent_eval.run(lambda rep: make_agent(proposed), eval_dir) # and with the change
entry = {"key": cand["key"], "days": cand["days"], "before": before["totals"][0], "after": after["totals"][0]}
if after["totals"][0] < before["totals"][0]:
db.execute("UPDATE brain_claims SET status='retired' WHERE claim_id=?", (cand["claim_id"],))
report["rejected"].append(entry) # worse on the sealed set: never applied
elif mode == "apply":
rules_path.write_text(proposed) # 5 the only file this loop writes
db.execute("UPDATE brain_claims SET status='trusted' WHERE claim_id=?", (cand["claim_id"],))
report["applied"].append(entry)
else:
report["pending"].append(entry) # report mode: a human decides
db.commit()
return report- Self-evolving agents自进化智能体 5: Run in report mode and read three days以报告模式运行,查看三天的情况 (nightly() in report mode报告模式下的 nightly())
- Operations and deployment运维与部署 8: Wire the nightly window把夜间时间窗串起来 (the learning loop unit学习循环单元)
05Run in report mode and read three days以报告模式运行,查看三天的情况
- nightly() in report mode报告模式下的 nightly() ← Self-evolving agents自进化智能体 4: Assemble the nightly loop with the eval gate组装夜间循环,并加上评估关卡
Do this操作
- Run the demo. It simulates three days of traffic with an out-of-range month on each day.运行 demo。它模拟三天的流量,每天都有一个超出数据范围的月份。
- Read line 0: the sealed eval before learning, and which question fails.看第 0 行:学习之前的封存评估结果,以及哪道题没通过。
- Read each day: the finding, and the candidate's standing in days.逐天查看:当天的发现,以及候选项累计的天数。
- On day three the gate passes and report mode writes nothing.第三天关卡通过,而报告模式什么都没写。
python3 -m labs.m13_evolve.demo0 sealed eval before any learning: 5 of 6 | failing: ['How much was spent on meals in 2026-07?']
2026-07-01: found ['query_expenses.relax_month', 'query_expenses.relax_month'] | standing [('query_expenses.relax_month', 'candidate', '1 day(s)')]
2026-07-02: found ['query_expenses.relax_month'] | standing [('query_expenses.relax_month', 'candidate', '2 day(s)')]
2026-07-03: found ['query_expenses.relax_month'] | standing [('query_expenses.relax_month', 'candidate', '3 day(s)')]
gate passed, report mode, nothing written: [{'key': 'query_expenses.relax_month', 'days': 3, 'before': 5, 'after': 6}]- Self-evolving agents自进化智能体 6: Switch to apply and confirm the change切换到应用模式并确认改动 (a reviewed pending change一个经过审阅的待定改动)
06Switch to apply and confirm the change切换到应用模式并确认改动
- a reviewed pending change一个经过审阅的待定改动 ← Self-evolving agents自进化智能体 5: Run in report mode and read three days以报告模式运行,查看三天的情况
Do this操作
- Run the loop once more in apply mode.以应用模式再运行一次循环。
- Read the rules file: one line was appended.查看规则文件:追加了一行。
- Read the sealed eval after: 6 of 6.查看之后的封存评估:6/6。
- Ask the original question again. The agent now retries without the month and reports what exists.再问一次原来的问题。智能体现在会去掉月份重试,并报告实际存在的数据。
apply: [{'key': 'query_expenses.relax_month', 'days': 3, 'before': 5, 'after': 6}]
rules file now: RULE query_expenses.relax_month: when the month filter empties a result, run the query again without month and report what exists.
sealed eval after: 6 of 6
same question now: Nothing is recorded for 2026-07. Without the month filter there are 5 matching records totaling 358.60 dollars, in 2026-03, 2026-04, 2026-05, 2026-06.
tools used: ['query_expenses', 'query_expenses']- Self-evolving agents自进化智能体 7: Know what the lab does not prove明确 lab 没有证明什么 (the demo result to interpret需要解读的 demo 结果)
- Self-evolving agents自进化智能体 9: Keep rollback one command away让回滚只需一条命令 (applied rules to undo要撤销的已应用规则)
07Know what the lab does not prove明确 lab 没有证明什么Not executed in the labslab 中未执行
- the demo result to interpret需要解读的 demo 结果 ← Self-evolving agents自进化智能体 6: Switch to apply and confirm the change切换到应用模式并确认改动
- the noise floor of the agent eval智能体评估的噪声基线 ← Evaluation评估 8: Repeat, and report the spread重复运行,并报告波动范围
Do this操作
- The fake model follows the rule because its script contains that behavior. With a real model, a rule is text in the prompt and the model may ignore it.假模型之所以遵守规则,是因为它的脚本里写了这种行为。对真实模型来说,规则只是提示词里的文字,模型可能不理会它。
- That is why the eval gate matters more with a real model: it is the only evidence that a rule changed behavior.这正是评估关卡在真实模型上更重要的原因:它是规则改变了行为的唯一证据。
- A real model is also noisy. Run the before and after evals several times and compare the spread.真实模型还有噪声。改动前后的评估都要多跑几次,并比较波动范围。
- The reference build measured this directly: one instrument showed a large gain from learned knowledge, a larger one showed almost none.参考系统直接测量过这一点:一套测量工具显示学到的知识带来很大提升,另一套更大的测量工具显示几乎没有提升。
This step describes work on your own machine or account. Its commands were not run when the labs were tested.这一步描述的是在你自己的机器或账号上的操作。测试 lab 时没有运行这些命令。
This step is checked by hand.这一步需要人工检查。
08Extend the loop to learn from documents把循环扩展到从文档中学习Not executed in the labslab 中未执行
- studiable(), the exclusion liststudiable(),即排除清单 ← Evaluation评估 3: Seal the test material before anything learns在任何学习发生之前封存测试材料
- verify(), the two-vote checkverify(),即双票核查 ← Multi-agent patterns多智能体模式 5: Build two independent judges搭建两个相互独立的裁判
- tiers to order the reading queue用于给阅读队列排序的等级 ← Knowledge management知识管理 3: Write the authority rules编写权威等级规则
Do this操作
- Read only chunks returned by `studiable()`.只读取 `studiable()` 返回的文本块。
- Order the reading queue by authority tier.阅读队列按权威等级排序。
- Extract claims in stages: define terms, outline, claims, links.分阶段提取论断:定义术语、列提纲、提取论断、建立关联。
- Promote a claim only with support from two independent documents. Copies of one text count once.只有得到两份相互独立的文档支持,论断才能晋升。同一文本的副本只算一次。
- Check served claims against their source with two votes, and take those failing both out of service.用双票核查已启用的论断与其来源,两票都不通过的予以停用。
This step describes work on your own machine or account. Its commands were not run when the labs were tested.这一步描述的是在你自己的机器或账号上的操作。测试 lab 时没有运行这些命令。
This step is checked by hand.这一步需要人工检查。
09Keep rollback one command away让回滚只需一条命令Not executed in the labslab 中未执行
- applied rules to undo要撤销的已应用规则 ← Self-evolving agents自进化智能体 6: Switch to apply and confirm the change切换到应用模式并确认改动
- dropping learned tables删除学到的表 ← State and storage状态与存储 7: Check that learned state can be dropped alone确认学到的状态可以单独清除
Do this操作
- Keep the rules file under version control. One rule per line makes a revert one line.把规则文件纳入版本控制。每条规则一行,回滚时只需撤销一行。
- To undo everything: delete the rules file and drop the learned tables.要全部撤销:删除规则文件,并删除学到的那些表。
- Re-run the sealed eval after any rollback.每次回滚之后重新运行封存评估。
git log --oneline -- learned-rules.md # every applied rule is a commit
git revert <commit> # undo one rule
# then re-run your sealed agent eval and compare with the pre-learning scoreThis step describes work on your own machine or account. Its commands were not run when the labs were tested.这一步描述的是在你自己的机器或账号上的操作。测试 lab 时没有运行这些命令。
python3 labs/machine/check.py --writeHow it works with the other parts它如何与其他部分协作
- Evaluation评估The sealed agent eval gates every change. The seal stops the loop from reading or editing its test.封存的智能体评估为每次改动把关。封存机制阻止循环读取或修改自己的考题。
- Harness engineeringHarness 工程The loop reads the harness logs and writes text that the harness appends to the prompt.循环读取 Harness 的日志,并写出由 Harness 附加到提示词的文本。
- Tools and MCP工具与 MCPFindings are confirmed by re-running tool calls through the registry.发现是通过注册表重新执行工具调用来确认的。
- Operations and deployment运维与部署The loop runs in a scheduled window and pauses for live requests.循环在预定的时间窗口内运行,遇到实时请求时暂停。
What went wrong in the real build真实搭建中踩过的坑
Self-observation fabricated its own corroboration自我观察给自己编造了印证
- What happened发生了什么
- Findings were re-logged every hour and each re-log counted as new support. 184 bad findings had to be removed.发现每小时被重新记录一次,每次重新记录都被算作新的支持。最后不得不移除 184 条错误的发现。
- Fix修复
- Key evidence by day and origin.证据以日期和来源为键。
- Lesson教训
- Count independent observations. Repetition by the same observer is one observation.只统计相互独立的观察。同一观察者的重复只算一次观察。
The experience half of the loop was switched off循环中“经验”那一半其实是关着的
- What happened发生了什么
- The loop studied documents every night and never read its own failures. The setting for that half was disabled.循环每晚都在学习文档,却从未读过自己的失败记录。那一半的设置被关掉了。
- Fix修复
- Turn it on, and print in the daily report which halves ran.把它打开,并在每日报告里输出哪几部分实际运行了。
- Lesson教训
- Report what ran. A loop that silently skips a stage looks the same as one that works.要报告实际运行了什么。悄悄跳过某个阶段的循环,看起来和正常工作的循环没有区别。
A learner that reported gains nobody could reproduce学习任务报告的提升没有人能复现
- What happened发生了什么
- After about 100 hours of autonomous running, headline numbers looked good and each one was misleading on inspection.自主运行约 100 小时后,核心数字看起来不错,但细看之下每一个都有误导性。
- Fix修复
- Sealed evals, repeats, and a report line per eval.封存评估、重复运行、每项评估在报告里占一行。
- Lesson教训
- A learning loop is finished when its measurement is trusted. The loop itself is the easy part.学习循环什么时候算完成?当它的测量结果值得信任时。循环本身反而是容易的部分。
The same idea on other platforms同样的思路在其他平台上
| Platform平台 | How this module maps本模块如何对应 |
|---|---|
| Databricks | Lakeflow Jobs schedule the loop. Traces and labeled feedback are the raw material. Evaluation datasets grow from production traces, and judges can be aligned with human labels.用 Lakeflow Jobs 给循环排程。trace 和带标注的反馈是原材料。评估数据集从生产 trace 中不断积累,裁判可以用人工标注来校准。 |
| IBM watsonx | Schedule jobs outside Orchestrate and write results to a governed store. Monitors in watsonx.governance provide drift signals.在 Orchestrate 之外给任务排程,并把结果写入受管控的存储。watsonx.governance 的监控提供漂移信号。 |
| Codex | A scheduled headless run can review logs and propose changes to AGENTS.md or skills as a pull request for review.定时的无界面运行可以审阅日志,并以 pull request 的形式提出对 AGENTS.md 或技能的修改,供人审查。 |
| Cursor | Background agents can do the same review and open a pull request.后台智能体可以做同样的审阅并发起 pull request。 |
| Claude Code / Agent SDK | A scheduled headless session can read logs and propose skill or instruction edits. Keep a human merge step.定时的无界面会话可以读取日志,并提出对技能或指令的修改。保留人工合并这一步。 |
| Another machine | A scheduler such as launchd, systemd timers, or cron, plus the same scripts.launchd、systemd timer 或 cron 这类调度器,加上同样的脚本。 |
Step-by-step guides per platform各平台的分步指南
Explain it back讲给自己听
Answer aloud first. Then open the answer and compare.先自己说一遍答案,再展开对照。
What does the loop change, and what does it never change?这个循环会改变什么?绝不会改变什么?
Why is evidence keyed by day and origin?为什么证据要以日期和来源为键?
The gate passed. Why run the sealed eval as well?关卡已经通过了。为什么还要运行封存评估?
What does the lab not prove about self-evolution?关于自进化,lab 没有证明什么?
Name every earlier module this loop depends on and what it takes from each.说出这个循环依赖的每个前序模块,以及从每个模块取用了什么。
Terms术语
| Candidate候选项 | A finding recorded and not yet trusted.已记录但尚未被信任的发现。 |
| Corroboration印证 | Support from independent origins or separate days.来自独立来源或不同日期的支持。 |
| Promotion gate晋升关卡 | The rule that decides when a candidate may become a rule.决定候选项何时可以成为规则的条件。 |
| Report mode报告模式 | The loop runs every step and writes nothing.循环执行每一步,但不写入任何东西。 |
From the live build来自实时构建
Recent changes and files the sync job filed under this module. These lines are in English as written in the build.同步任务归到本模块下的近期变更和文件。这些内容保留了构建系统中的英文原文。
- Corroboration needs two independent texts: copies of one passage count once; duplicate the regulation copy retired from the learner queue
- Learner: 8 minutes of source checks in every window, so claim verification keeps pace with what is written
- Claim judges: the agency and the agency are one name; claims rejected for that are checked again
- claim_verify: a simplification alone keeps a claim in service; --redecide re-applies the rule to recorded votes
- Claim verification live: nightly two-vote check, claims failing both leave service as 'unsupported'; omission alone keeps a claim; VERIFY line in the daily report
- claim_verify: two-vote check of served claims against their source (dry run and calibration); off-topic the oversight body reports retired from the learner queue
- Out of tool rounds: one final turn without tools answers from the evidence gathered; restate standing after promotion; ordered promotion queue
- BUSY sentinel is held until a streamed response finishes, so the learner pauses for the whole chat answer
- Spending orchestration
- CLAUDE.md — build-host Mac Studio
- Fixes applied — 2026-09-07
- Self-evolution: what was broken, what changed
- BUILD-HOST — user guide
- What the failures teach about making the agent actually get smarter
- two copies of one text are one voice. venv/bin/python3 nightly/corroboration_audit.py # incremental venv/bin/python3 nightly/corroboration_audit.py --all # every claim with 2+ documents venv/bin/python3 nightly/corroboration_audit.py --stats "Corroborated" means a claim is ...
- the circadian clock (BRAIN-ARCHITECTURE.md §4.0). This is the piece that turns "a script you remember to run" into a system that runs itself. It owns two things and nothing else: R1 When the Vercel app calls the LLM server, learning PAUSES. External requests always win.
- check served claims against their source, two votes, and take the ones that fail both out of service.
- do the claims the agent serves say what their source says? venv/bin/python3 nightly/claim_fidelity.py --n 200 # print only venv/bin/python3 nightly/claim_fidelity.py --n 200 --write # + history "Authoritative" means the source document is tier 1.
- lets the agent answer questions ABOUT ITS OWN LEARNING with facts instead of assumptions. WHY THIS EXISTS --------------- Asked "what new knowledge did you gain in the last 100 hours?", the agent answered: "Honest answer: nothing. And that's not a gap — it's by design.
- go over EVERY file, in stages, resumably. This replaces the first Diet B, which walked 81,636 chunks in database order and had no idea what any of them were.
- learn from what people actually said. python3 nightly/conversation_learn.py # report, write nothing python3 nightly/conversation_learn.py --apply # record python3 nightly/conversation_learn.py --all # ignore the cursor WHY THIS EXISTS =============== This system had three ways ...
- Phase 1 of the nightly loop (BRAIN-ARCHITECTURE.md §4.1). "Hippocampal replay": read the day's traffic, find where the agent failed, turn each failure into a gap the agent can later study.