Build an agent stack, and know why each step comes when it does.搭建一套智能体系统,并明白每一步为什么排在那里。
Fifteen modules and one runnable lab for each. Every step states what it uses from earlier steps, what it produces, and how you know it worked. Code and expected output come from labs that were actually run.十五个模块,每个模块配一个可运行的 lab。每一步都写明它用到前面哪些步骤的成果、它产出什么,以及如何确认它成功了。代码和预期输出都来自实际运行过的 lab。
Run all labs运行全部 lab
Clone the repository and run every lab once against the fake model. This takes about 20 seconds and proves your Python works before any model is involved.克隆仓库,用假模型把所有 lab 运行一遍。大约需要 20 秒,可以在涉及任何模型之前先确认 Python 环境正常。
git clone <your repository url> aitutor && cd aitutor
python3 -m labs.run_all # every lab, offline, about 20 seconds
python3 -m labs.m07_harness.demo # one lab
# use your own model instead of the fake one
export LAB_BASE_URL=http://127.0.0.1:11434/v1
export LAB_MODEL=<your model tag>Why does A come before B?为什么 A 排在 B 前面?
Pick any two modules. If one depends on the other you get the chain of reasons. If neither does, you can build them in either order.任选两个模块。如果一个依赖另一个,你会看到一连串理由。如果互不依赖,两者的搭建顺序可以随意。
Knowledge management知识管理 comes before排在前面,之后是 Self-evolving agents自进化智能体
- Evaluation评估 needs需要 Knowledge management知识管理
Held-out material is sampled from the corpus. You cannot seal chunks that have not been ingested.留出材料是从语料中抽样的。没有入库的文本块无法封存。 - Self-evolving agents自进化智能体 needs需要 Evaluation评估
A loop optimizes what it can measure. Sealed evals have to exist before the loop runs, or it grades itself.循环会优化它能测量的东西。封存评估必须先于循环存在,否则它就是在给自己打分。
All fifteen modules全部十五个模块
Inference engineering推理工程
Serve models on fixed hardware and know what each second costs.在固定硬件上部署模型,并弄清每一秒花在哪里。
API and gatewayAPI 与网关
One contract for every caller, with keys, scopes, limits, and a single public door.所有调用方共用一套接口契约,配上密钥、权限范围、限额,以及唯一的对外入口。
Knowledge management知识管理
Collect, validate, name, tier, and retire documents before any index sees them.在任何索引接触文档之前,先完成收集、校验、命名、分级和退役。
State and storage状态与存储
Where facts live between calls, who may write them, and how concurrent writers stay safe.两次调用之间数据存在哪里、谁可以写,以及多个写入方如何互不破坏。
RAG and knowledge graphRAG 与知识图谱
Find the right passage, prove it, and add graph edges where similarity misses.找到正确的段落并证明它,在相似度检索漏掉的地方用图的边补上。
Tools and MCP工具与 MCP
Give the model typed actions, and serve them over a protocol any harness can call.给模型提供带类型的动作,并通过任何 Harness 都能调用的协议对外提供。
Harness engineeringHarness 工程
The loop around the model: prompt assembly, tool execution, budgets, checks, logs.包裹模型的那层循环:组装提示词、执行工具、控制预算、检查结果、记录日志。
Skills技能(Skills)
Instruction files loaded on demand, so routing knowledge costs nothing until it is needed.按需加载的指令文件,路由知识在用到之前不占任何开销。
Memory记忆
What the agent keeps about a user, and how it gets back into the prompt.智能体为用户保留了什么,以及这些内容如何回到提示词里。
Guardrails and verification护栏与验证
Deterministic checks on tool calls and on answers, each one written from a real failure.对工具调用和回答做确定性检查,每一条都源自一次真实的失败。
Evaluation评估
Sealed test sets, layered metrics, and enough repeats to trust a difference.封存的测试集、分层的指标,以及足够多次的重复,让差异值得相信。
Multi-agent patterns多智能体模式
Several model roles with separate context, tools, and budgets, coordinated by code.多个模型角色,各有独立的上下文、工具和预算,由代码协调。
Self-evolving agents自进化智能体
A scheduled loop that studies its own logs, promotes what is corroborated, and is graded on sealed tests.一个定时运行的循环:研究自己的日志,把得到印证的内容晋升为规则,并接受封存测试的评分。
SDKs and frameworksSDK 与框架
What agent SDKs give you, mapped onto parts you have already built by hand.智能体 SDK 提供了什么,对照你已经亲手搭建过的各个部件来理解。
Operations and deployment运维与部署
Supervision, scheduling, logs, backups, and recovery, so the system runs when nobody is watching.进程守护、调度、日志、备份和恢复,让系统在没人盯着的时候也能运行。
From the live build来自实时构建
Last snapshot 2026-10-08: 58 changes, 44 design notes, 136 source files, sorted into modules.最近快照 2026-10-08:58 项变更、44 篇设计笔记、136 个源文件,已按模块归类。 See what changed查看变更