Agent Engineering MOC
Agent Engineering 总入口,按 LLM 基础、Agent 闭环、工具、上下文、RAG、记忆、运行时、持久执行、多 Agent、接口协议、安全、评测与生产工程组织知识体系。
#ai
#moc
#growing
#agent
[!info] related notes
Agent Engineering MOC
知识总览
filters:
and:
- 'file.ext == "md"'
- 'file.inFolder("z")'
- 'this.file.links.contains(file)'
- 'file.path != this.file.path'
formulas:
knowledge: 'file.asLink(title)'
properties:
formula.knowledge:
displayName: 知识
note.description:
displayName: Description
note.mastery:
displayName: Mastery
views:
- type: table
name: 知识总览
order:
- formula.knowledge
- note.description
- note.mastery
columnSize:
formula.knowledge: 280
note.description: 760
note.mastery: 56
[!abstract] 核心认识 Agent Engineering 不是“接一个模型 API,再套 while loop”。它研究的是:模型如何在明确目标、状态、工具、权限与停止条件下,持续观察环境、选择动作,并由运行时把不确定决策变成可恢复、可审计的执行过程。
一张图看完整体系
LLM / Structured Output
↓
Agent Loop: Observe → Decide → Act → Observe
↓
Tools + Context + RAG + Memory
↓
Runtime: State / Event / Checkpoint / Interrupt / Retry
↓
Safety / Permission / Sandbox / Human Approval
↓
Trace / Eval / Deployment / Continuous Improvement
推荐学习顺序
1. LLM 应用基础
- LLM、Structured Output、Embedding 模型
- 理解 token、context window、message role、sampling 和不确定性。
目标:知道模型输出是候选结果,不是天然可信的业务事实。
2. LLM Call、Workflow 与 Agent
- Agent
- Agentic Systems
- Augmented LLM
- Agent 执行闭环
- Agent 中的 Stopping Conditions
- Agent 在前端研发中的角色 — 把通用执行闭环映射到前端工程反馈与治理边界。
LLM Call → 一次生成
Workflow → 开发者预先确定主要路径
Agent → 模型在受控边界内动态选择下一步动作
3. Tool Use
进入 Tool Calling Engineering MOC,重点掌握:
Schema → Model selects tool → Validate
→ Authorize → Execute → Normalize result → Observe
Tool call 只是请求,不能绕过权限、业务不变量、幂等与审计。
4. Context、RAG 与 Memory
- Context Engineering MOC:这一轮模型应该看到什么。
- RAG Engineering MOC:如何获取当前外部证据。
- Agent Memory Types & Policies:哪些经验值得跨轮次保留。
最短边界:
Context → 本轮直接可见的信息包
RAG → 从外部知识源检索证据
Memory → 由使用过程沉淀、可跨轮次复用的状态
State → 当前任务的权威执行状态
5. Agent Runtime 与持久执行
- Thread / Run / Step;
- State / Event / Trace;
- Checkpoint / Interrupt / Resume / Replay;
- timeout / cancellation / retry;
- concurrency / backpressure;
- sandbox / permission boundary。
这一阶段决定 Agent 能不能在真实故障和人工审批后继续运行。
6. Workflow 与 Multi-Agent
- Prompt Chaining;
- Routing;
- Parallelization;
- Orchestrator-Workers;
- Evaluator-Optimizer。
再进入 多 Agent 编排模式、Manager as Tools、Handoffs 和 A2A。
[!warning] 选型原则 单 Agent + 清晰工具足够时,不要为了“更 Agentic”拆成多个角色。Multi-Agent 只在上下文隔离、专业分工、权限边界或并行收益明确时成立。
7. Safety、Eval 与生产闭环
- Agent Guardrails、Human-in-the-loop
- Agent Evals MOC
- Observability Engineering MOC
- AI Agent Application MOC
Offline Eval
→ Replay / Shadow
→ Canary / Quality Gate
→ Production Trace / Metrics
→ Failure Attribution
→ Repair / Promotion / Rollback
三条学习路径
面试主线
Agent vs Workflow
→ Tool Calling
→ Context / RAG / Memory
→ Runtime / Checkpoint / HITL
→ Multi-Agent
→ Eval / Safety / Production
题库:AI Agent 面试题库。
Runtime / Production 主线
Agent Loop
→ State / Event / Trace
→ Checkpoint / Interrupt / Resume
→ Idempotent Tool Side Effects
→ Permission / Sandbox
→ Eval / Observability / Deployment
Coding Agent 主线
[[coding-agent-moc|Coding Agent MOC]]
→ [[coding-agent-memory-moc|Coding Agent Memory MOC]]
→ Skills / MCP / Harness
→ Planning / Execution / Review / Repair
掌握标准
- 能用一句话区分 LLM Call、Workflow 和 Agent。
- 能解释 Tool Schema 合法为什么不代表动作已获授权。
- 能说明 Checkpoint、业务数据库、Trace 和 Memory 的边界。
- 能画出 Interrupt → Human Decision → Resume 的后端闭环。
- 能解释 Retry 为什么必须和幂等、副作用边界一起设计。
- 能为 Agent 建立 dataset、grader、trace 和上线门槛。
- 能把上述设计映射到自己的生产项目,而不是只讲框架 API。