Agent Design Guidelines: Engineering Thin Harness and Fat Skills
“Thin Harness, Fat Skills” is often reduced to a slogan: keep the agent shell thin and the skills fat. This article explains the engineering boundary behind that idea, why skill hype fails in production, and a practical path for contracts, state, observability, and governance.
“Thin Harness, Fat Skills” is often reduced to a slogan: keep an agent’s orchestration shell thin and its skills fat. Understanding the guideline means returning to an engineering boundary: what stays thin is runtime orchestration responsibility, and what becomes fat is the degree to which a skill is turned into an engineering asset. Thin does not mean weak, and fat does not mean a longer prompt.
Many projects treat “write a skill description and leave the rest to the model” as a universal path. The result is often an impressive demo and a fragile production system. Starting from the paradigm shift, this article breaks down the traps behind skill hype and outlines a systematic path that can actually be implemented.
1. A Paradigm Shift Does Not Mean Giving Up Determinism
Moving from rule-based traditional automation to reasoning-based dynamic agents is an important shift. The former is good at deterministic processes. The latter can handle unstructured input, ambiguous intent, and dynamic decisions. The core constraints of enterprise systems do not disappear: parameters must be valid, permissions must be isolated, state must be recoverable, errors must be classifiable, and results must be auditable.
An agent is therefore not “natural language replacing engineering.” It is “semantic understanding strengthening engineering.” Natural language is suitable for expressing intent, explaining boundaries, and assisting parameter extraction. Actual execution still needs strict contracts, type constraints, state machines, and observability. Confusing semantic understanding with engineering reliability is the root of skill hype.
2. What the Guideline Means: Where the Harness Is Thin and Skills Are Fat
Thin Harness means the agent runtime shell should stay lightweight and replaceable. It handles general governance: model invocation, context trimming, candidate skill retrieval, tool routing, budgets and timeouts, permission injection, structured error return, and log tracing. It should not carry concrete business rules, and it should not try to “reason out” a complex process on the spot with a prompt in every conversation turn.
Fat Skills means each skill should be a complete engineering package with at least three layers:
- Semantic layer: purpose, boundaries, counterexamples, parameter descriptions, and cost and latency hints, so the model can select the skill correctly.
- Execution layer: input and output contracts, schema validation, type conversion, business rules, error codes, idempotency strategy, timeouts, and retries.
- Governance layer: version management, permission declarations, audit fields, metrics, test cases, and regression strategy.
In short: a skill description is only a mount point, not the execution body. A “skill” without an execution layer and a governance layer is only a prompt fragment, not a capability that can go live.
3. Three Skill Traps Hidden by Impressive Demos
3.1 The Conflict Between Semantic Ambiguity and Execution Determinism
Natural language is inherently ambiguous, while business APIs require a precise fit. Writing “query an order” only expresses intent. A model may predict parameters that “look correct,” but production needs enumerations, formats, ranges, tenant isolation, and business validation. Driving a deterministic API with description alone makes the failure rate rise with scenario complexity.
The correct approach is to treat model output as “input pending validation.” At the execution entry point, apply schema validation, type constraints, business-rule checks, and structured correction feedback, and limit the number of retries.
3.2 The Conflict Between Stateless Descriptions and Stateful Business
Real processes often include resume-from-breakpoint, conditional branches, asynchronous callbacks, idempotent retries, and compensation. Asking a model to “reason out” the state machine on the spot in every turn is expensive and fragile. The state machine should live outside the prompt, in the skill or workflow layer, and be driven by persisted state and events. The harness only dispatches events and calls the model for nondeterministic judgments. Deterministic transitions should not be handed to a probabilistic model.
3.3 The Conflict Between Demo Observability and Production Observability
A demo looks only at the final answer. Production must look at the tool-call chain: parameter snapshots, validation failure rate, retry rate, P95 latency, error classification, human intervention rate, and cost. Without traces and metrics, you cannot tell whether the model selected the wrong skill, the parameters were wrong, or a downstream call timed out.
Least privilege, a second confirmation for high-risk operations, masking of sensitive fields, and audit logs must be declared in the skill contract and implemented by the execution body.
4. An Engineering Implementation Path
Step 1: Draw the determinism boundary. Split the process into parts that must execute deterministically and parts that can be reasoned about semantically. Side-effect operations such as queries, writes, payments, and refunds need strict contracts and permission control. Intent recognition, information completion, and unstructured summarization can be left to the model.
Step 2: Turn skills into contracts. Describe each skill’s inputs and outputs with a machine-checkable schema, not natural language alone. For example:
{"name": "query_order","description": "Query order status; read-only, does not refund or modify","input_schema": {"type": "object","properties": {"order_id": {"type": "string", "pattern": "^[A-Z0-9-]{8,32}$"},"user_id": {"type": "string", "minLength": 1},"time_range": {"type": "object","properties": {"start": {"type": "string", "format": "date-time"},"end": {"type": "string", "format": "date-time"}},"required": ["start", "end"],"additionalProperties": false}},"oneOf": [{"required": ["order_id"]},{"required": ["user_id", "time_range"]}],"additionalProperties": false},"output_schema": {"type": "object","properties": {"orders": {"type": "array"},"truncated": {"type": "boolean"}},"required": ["orders", "truncated"]},"side_effect": "read_only","timeout_ms": 3000,"error_codes": ["INVALID_ARGUMENT", "NOT_FOUND", "UPSTREAM_TIMEOUT"]}
The execution body validates at the entry point before running business logic. Validation failure returns a structured error so the model can correct it within a limited number of attempts:
def query_order(args, ctx):validate(args, QUERY_ORDER_SCHEMA)if args.get("order_id"):row = order_repo.get_by_id(args["order_id"], ctx.tenant_id)return normalize([row])require(args.get("time_range"))rows = order_repo.query_by_user(args["user_id"], args["time_range"], ctx.tenant_id, limit=50)return {"orders": [normalize(r) for r in rows], "truncated": len(rows) == 50}
Step 3: Externalize the state machine. Model long-running processes as explicit states and events instead of stuffing them into a prompt. For example:
CREATED -> VALIDATING -> QUERYING -> WAITING_CALLBACK -> SUCCEEDED\-> RETRYABLE -> WAITING_RETRY -> QUERYING\-> FINAL_FAILED
Persist state in a database or drive it through a message queue. The skill handles idempotency keys, compensation, and timeouts. The harness only dispatches events and uses the model for assisted decisions, avoiding “reasoning out the state machine on the spot in every turn.”
Step 4: Close the loop with observability and evaluation. Offline, build cases for normal paths, boundaries, adversarial input, permissions, and timeouts. Online, monitor skill-call success rate, parameter-validation failure rate, retry rate, P95 latency, cost, and human intervention rate. Run a new skill in shadow mode first, then release it gradually, and keep the ability to roll back.
Step 5: Govern permissions and versions. Skills should declare least privilege, tenant isolation, sensitive-field masking, and confirmation for high-risk operations. Version the schema and the execution body, and keep backward compatibility and a deprecation strategy. On a cloud platform that already provides general capabilities such as function compute, message queues, logging, and monitoring and alerting—for example, Baidu AI Cloud—the skill execution body, state storage, and observability chain can be composed into a production loop.
5. Implementation Checklist
- Does the skill have a machine-checkable input and output schema?
- Is model output validated before execution, and do failures return structured corrections?
- Do side-effect operations declare permissions, idempotency, and high-risk confirmation?
- Do long-running processes have an explicit state machine, timeouts, retries, and compensation?
- Are there traces, metrics, audit logs, and offline regression cases?
- Does the harness only perform general governance, without carrying business rules?
- Can the skill be tested, released, and rolled back independently?
Conclusion
The essence of “Thin Harness, Fat Skills” is not a thicker prompt. It is thicker engineering assets: leave uncertainty to semantic understanding, and hand determinism to contracts, validation, state machines, and observability. Only then can an agent move from the demo stage into a production system.
