From Chat Wrapper to Digital Worker
Understand the job boundary between prompt user, application developer, and Agent engineer.
From Chat Wrapper to Digital Worker
"From Chat Wrapper to Digital Worker" means turning upgrade a chat assistant into a worker that accepts tasks, executes tools, saves state, and delivers results into an executable, observable, recoverable, and acceptable Harness unit. The direct output is not a prompt. It is worker job contract and lifecycle diagram. The goal is to turn the concept into boundary, architecture map, engineering objects, code comparison, and acceptance evidence.
"From Chat Wrapper to Digital Worker" means turning upgrade a chat assistant into a worker that accepts tasks, executes tools, saves state, and delivers results into an executable, observable, recoverable, and acceptable Harness unit. The direct output is not a prompt. It is worker job contract and lifecycle diagram.
It does not make the model "think harder" and it does not hide every behavior inside a chat wrapper. It defines Role ownership so Learning goal to engineering task, Agent Harness control plane, and Role matrix, deliverable list, and acceptance evidence can be traced.
If the implementation causes "Mixing prompts, app UI, and agent runtime into one vague idea", the boundary is not established. Go back to input contract, policy, or runtime and split it again.
Done means delivering worker job contract and lifecycle diagram, preserving Role matrix, deliverable list, and acceptance evidence, and reviewing it through Can explain who owns context, tools, policy, and delivery.
Mermaid source
flowchart LR
input["Input Contract"] --> boundary["Role ownership"]
boundary --> route["Learning goal to engineering task"]
route --> runtime["Agent Harness control plane"]
runtime --> policy{"Policy"}
policy -->|allow| tool["Model and Tools"]
policy -->|block| blocked["Mixing prompts, app UI, and agent runtime into one vague idea"]
tool --> state["State and Events"]
runtime --> state
state --> evidence["Role matrix, deliverable list, and acceptance evidence"]
evidence --> artifact["worker job contract and lifecycle diagram"]
artifact --> eval["Acceptance"]
classDef inputNode fill:#eef4ff,stroke:#4664ff,color:#0b1220;
classDef runtimeNode fill:#ecfdf5,stroke:#10b981,color:#0b1220;
classDef gate fill:#fff7ed,stroke:#f59e0b,color:#0b1220;
classDef stop fill:#fee2e2,stroke:#ef4444,color:#0b1220;
class input,boundary,route inputNode;
class runtime,tool,state,evidence,artifact,eval runtimeNode;
class policy gate;
class blocked stop;| Framework | Useful design | How this lesson uses it |
|---|---|---|
| Hermes | Entry points, AIAgent, tool dispatch, Session Storage, Gateway/Cron | Judge whether Learning goal to engineering task has long-running and delivery boundaries |
| Pi Agent Core | AgentSession, event stream, resource loader, compaction, save point | Implement Agent Harness control plane and a recoverable turn lifecycle |
| Fiitx | Workbench, progress stream, approval UI, model routing, history replay | Expose Role matrix, deliverable list, and acceptance evidence as a visible control plane |
| Eval | Done criteria, trace, failure case, regression | Prove worker job contract and lifecycle diagram meets acceptance criteria |
A plain LLM call returns an answer. A Harness run carries goal, boundary, tools, policy, and acceptance as parameters.
// Plain LLM call: returns text without boundary, state, or acceptance
const answer = await model.generate({
prompt: "Implement: From Chat Wrapper to Digital Worker"
});
// Agent Harness 写法:把目标、工具、策略、状态和验收写进运行合同
const result = await harness.runHarnessOrientation2DigitalWorker({
lesson: "0.2 From Chat Wrapper to Digital Worker",
goal: "Implement: From Chat Wrapper to Digital Worker",
boundary: "Role ownership",
runtime: "Agent Harness control plane",
route: "Learning goal to engineering task",
tools: runtime.tools.forBoundary("Role ownership"),
policy: {
watch: "Mixing prompts, app UI, and agent runtime into one vague idea",
requireEvidence: true
},
eval: [
"trace_complete",
"artifact_exists",
"policy_checked",
"harness_orientation_2_Digital_Worker_accepted"
]
});
assert(result.artifact === "worker job contract and lifecycle diagram");
assert(result.evidence.includes("Role matrix, deliverable list, and acceptance evidence"));Key points
- 1
Definition: "From Chat Wrapper to Digital Worker" means turning upgrade a chat assistant into a worker that accepts tasks, executes tools, saves state, and delivers results into an executable, observable, recoverable, and acceptable Harness unit. The direct output is not a prompt. It is worker job contract and lifecycle diagram.
- 2
Boundary: It does not make the model "think harder" and it does not hide every behavior inside a chat wrapper. It defines Role ownership so Learning goal to engineering task, Agent Harness control plane, and Role matrix, deliverable list, and acceptance evidence can be traced.
- 3
Code: a plain call gets answer; a Harness call must return artifact, evidence, and trace.
- 4
Acceptance: deliver worker job contract and lifecycle diagram, preserve Role matrix, deliverable list, and acceptance evidence, and guard against "Mixing prompts, app UI, and agent runtime into one vague idea".