DEEPSEEK HARNESS · OFFLINE TUTORIAL
10 · Sandbox / Subagent / Jobs / UI
从单 Agent 到产品运行时
1. Sandbox / Shell / Subprocess
tool-shell
│
▼
ctx.shell
│
▼
shell provider
│
▼
ctx.subprocess
│
▼
local / remote execution
继续使用 Definition / Provider / Consumer / Policy / Events 五分法,不要死记包名。
2. Subagent
- parent agent 如何引用 child session;
- child agent 生命周期由谁拥有;
- delegation result 如何回流;
- 是否能从本地 child agent 切换到远程 delegation provider。
3. Jobs / Workflow
| 概念 | 定位 |
|---|---|
| Agent Step | 前台交互式推理 |
| Job | 后台工作能力 |
| Workflow | 更高层编排与状态推进 |
不要把所有异步工作都硬塞进 Agent Loop。
4. UI / API 为什么最后读
UI / API
│
├─ drive ctx.agents
└─ render session/event projection
产品表面不拥有 conversation truth;Session 才是事实源。
5. Composition over Branching
不要:
if web
if local
if sandbox
if provider
if permission
...
而要:
不同产品 = 不同 plugin tree