Office 工作流

Agent 可验证办公工作流

用一个真实任务讲清楚:杂乱的邮件导出和附件线索,如何变成可归档、可检查的交付物。

案例 · invoice-email-archive-manifest
01 / 05

展开 workspace

顶层目录 → 选中的证据文件
input/workspace/
├─ ▾ mail_export/
│  ├─ 2026-04/thread_cedar_booth/ │  │  ├─ message_0412.json │  │  ├─ packet_a_textlayer.pdf │  │  └─ packet_a_supplement.md │  └─ 2026-05/thread_delta_service/ │     └─ service_packet_textlayer.extract.txt
├─ inventory_shards/ ├─ failed_exports/ ├─ stale_outputs/ └─ archive_out/
JSON
messagemessage_0412.json
message_id: msg-20260412-cedar-01thread_id: thread_cedar_boothattachment_refs: packet_a_textlayer.pdf
PDF
packetpacket_a_textlayer.pdf
Packet title: Cedar booth packettext layer: readable invoice pagehint: check correction mail
MD
notepacket_a_supplement.md
supplement: archive policy noteuse: decision contextnot: standalone invoice
TXT
sidecarservice_packet...txt
Supplier: Delta Field ServicesDocument: DFS-0503-CALLAmount: 1,128.00 USD

Agent 如何整理归档包

引用 → workspace 文件 → 证据 → archive_out/
① 邮件中引用
② workspace 文件 → 判断
③ 写入 archive_out/
message_0412.json引用文件
{  "attachment_refs": ["packet_a.pdf","missing_ref.pdf"  ]}
packet_a.pdf · found已打开读取
INVOICE PACKETPDF · p.1
doc typeInvoice packet
packet idPKT-A-0412
amount1,128.00 USD
已关联文档 · 确认为发票
archive_out/输出归档包
archive_out/ 目录
├─ candidate_docs/
│  └ packet_a.pdf
├─ missing_refs/
│  └ missing_ref.txt
├─ reference_only/
│  └ retry.log
└─ validation/
   ├ archive_manifest.json
   └ archive_report.md
archive_manifest.json
bucketsourcestatuscandidatepacket_afoundmissingmissing_refabsentreferenceretry.loghist
archive_report.md
packet_a.pdf 已复制
!missing_ref.pdf 未找到
iretry.log 作为参考保留
missing_ref.pdf查找
?workspace 中未找到
缺失来源
failed_exports/retry.log在磁盘上
磁盘工作区上的日志未被任何邮件引用
retry.log · read已打开读取
status: failedexport retry tracenot an invoice doc
仅作历史记录 · 不归档为发票

输入目录变成输出目录

Agent 在 archive_out/ 下写入新文件
input/workspace/+6 个新文件写入 archive_out/
├─ mail_export/ 未改动 ├─ inventory_shards/ 未改动 ├─ failed_exports/ 未改动 ├─ stale_outputs/ 未改动 └─ archive_out/之前仅有 validation/.keep
   ├─ candidate_docs/+ 新增    │  └─ packet_a.pdf    ├─ missing_refs/+ 新增    │  └─ missing_ref.txt    ├─ reference_only/+ 新增    │  └─ retry.log    └─ validation/       ├─ archive_manifest.json+ 新增       └─ archive_report.md+ 新增
PDFcandidate_docs/packet_a.pdf
INVOICE PACKETp.1
doc typeInvoice packet
amount1,128.00 USD
status找到 · 已核验
JSONvalidation/archive_manifest.json
bucketsourcestatuscandidatepacket_afoundmissingmissing_refabsentreferenceretry.loghistory
MDvalidation/archive_report.md
packet_a.pdf 已复制
!missing_ref.pdf 未找到
iretry.log 作为参考保留

已验证的输出

交付物 · 按最终 workspace 状态评分
archive_out/├─ candidate_docs/
│  └ packet_a.pdf
├─ missing_refs/
│  └ missing_ref.txt
├─ reference_only/
│  └ retry.log
└─ validation/
   ├ archive_manifest.json
   └ archive_report.md
JSONarchive_manifest.json
bucketitemtracecandidate_docspacket_a.pdf来自 message_0412missing_refsmissing_ref.pdf被引用,未找到reference_onlyretry.log仅历史记录
MDarchive_report.md
Found:
- packet_a.pdf matched an attachment reference
Needs review:
- missing_ref.pdf was referenced but absent
Reference only:
- retry.log kept as failure-history evidence
TXTmissing_refs/missing_ref.txt
missing_ref.pdf
source: message_0412 attachment_refs
status: workspace 中未找到

Verifier / Judge

规则 + Judge 检查交付文件
必要目录已创建
已复制找到的附件
已记录缺失引用
已分离 reference-only 日志
manifest 与 report 一致
没有编造来源文件
按最终 workspace 状态评分通过 · 6/6

任务要做什么

不是问答 · 而是一项 workspace 工作
整理导出的杂乱邮件。
1读取导出的邮件线程和附件引用
2区分发票候选、弱关联和缺失引用
3在 archive_out/ 下写入 manifest.json 和 report.md
单个真实案例复制而非移动不访问真实邮箱不做 OCR/VLM
input/workspace/
├─ mail_export/
├─ inventory_shards/
├─ failed_exports/
├─ stale_outputs/
└─ archive_out/
JSON邮件引用
PDF发票包
TXT文本证据
OUT交付物
真实:单个 WB Bench 任务,不混合多个案例 workspace。安全:预览为重绘示意,不暴露 hidden gold,不录制 GUI。