Thin Harness, Fat Skills: A Design Principle for Production AI Agents

    As AI agents move from rule-based automation to reasoning-driven systems, a recurring design principle has emerged: keep the runtime harness thin and the skills fat. This article explains what that division of responsibility means in practice—covering the paradigm shift to probabilistic planning with deterministic execution, three common sources of confusion (semantic ambiguity vs. execution certainty, stateless descriptions vs. stateful business processes, black-box execution vs. observability), what belongs in the harness versus the skills, why state machines should not be left to runtime inference, and how to approach observability, evaluation, rollout, and architecture self-checks. Readers will come away with a concrete framework for building agents that are reliable, testable, and operable in enterprise environments.

    Moving from rule-based automation to reasoning-driven agents does not mean handing your business processes over to a paragraph of natural language. A design principle that keeps resurfacing in industry discussions can be summarized as “Thin Harness, Fat Skills”: keep the runtime skeleton as thin as possible, and make skill implementations as substantial as possible. The harness is responsible for scheduling, constraints, observability, and failure handling. Skills are responsible for turning each class of business action into a repeatable, verifiable, replayable execution unit. Get this backwards and you fall into “Skill hype”: believing that if you write “You are an expert. You can use this skill to query orders and generate reports,” the model has somehow learned your production logic.

    1. What the Paradigm Shift Actually Changes

    Traditional automation encodes branches, timeouts, retries, and field mappings into process definitions. It is highly deterministic but rigid when facing unstructured input and exception paths. Reasoning-driven agents hand planning, tool selection, and partial parameter filling to the model, which suits open-ended tasks and long-tail phrasing. The appeal is adaptability; the risk is that probabilistic output gets wired directly to enterprise interfaces that must fit together exactly.

    Models are good at producing a “plausible-looking” next step under incomplete information. They are not good at single-handedly guaranteeing types, permissions, idempotency, and transaction boundaries. An agent is therefore not a looser script—it is a “probabilistic planner plus a deterministic executor.” Thin Harness means the runtime layer around the planner must be narrow and hard: it handles orchestration, policy, and guardrails only, without scattering business rules across prompts. Fat Skills means every callable capability ships with its own contract, validation, side-effect documentation, and failure semantics—not a one-line description bolted onto a bare interface.

    2. Three Pairs of Contradictions That Get Confused

    Semantic ambiguity vs. execution certainty. Natural language is polysemous. “Query orders” might mean by order ID, by customer, or by time window, and may imply permission scopes and masking requirements. A model can predict correctly shaped parameters, but it cannot recover unstated invariants from a single sentence. The description is only a mount point: it tells the planner “here is a capability, and here is the intent it serves.” The execution unit must be a typed function: input schema, enums, ranges, required and mutually exclusive fields, sources of defaults, and pre-invocation authorization. Without schema validation and transformation, failures compound exponentially along the call chain, because every small deviation at one step becomes a condition for the next.

    Stateless description vs. stateful business. Real processes have checkpoints, human confirmations, asynchronous receipts, and compensations. Writing “if A fails, try B; if B doesn’t respond, wait and retry” in a prompt just re-infers a state machine in every conversation turn—expensive and irreproducible. Without explicit state across turns, the model forgets side effects that were already committed, duplicating orders or skipping compensation. Skills may expose atomic actions, but “wait, branch, timeout, resume” should live in the persistent state of the harness or a workflow engine—not in the hope that the context window remembers business facts.

    Black-box execution vs. observability. When a task fails, you need to distinguish: the planner misunderstood skill boundaries; parameters were rejected before validation; a downstream timeout; insufficient permissions; or misinterpreted results. If skills are just prompts, your logs contain only generated text and the failure cannot be located. Observability is not a dashboard added afterward—it is part of the skill contract: every call carries a correlation identifier and records a sanitized input summary, validation result, downstream latency, error code, and whether side effects occurred.

    3. Where the Thin Harness Should Be Thin

    A thin harness is not about having fewer features. It is about single responsibility, stable implementation, and carrying as little volatile business logic as possible. Five categories of capability suffice:

    Scheduling and the loop. Receive a goal, maintain the current plan, completed steps, and pending confirmations; decide when to ask the model for the next step and when to execute a settled skill directly. The loop must enforce maximum steps, maximum tokens, and maximum side-effect count to prevent the planner from spinning.

    Tool registry and retrieval. Skills are exposed as structured manifests: name, applicable intents, input/output schemas, read-only flag, idempotency, estimated latency, and required permissions. Retrieval can be rule-based or vector-based, but the final selected set should be small and explicit—avoid dumping dozens of vague descriptions into the context.

    Policy guardrails. Intercept after model output and before side effects: on schema validation failure, return the error in structured form so the planner can correct itself rather than hitting downstream systems directly. Permissions, tenancy, and data classification are enforced uniformly by the harness, not by a “please keep this confidential” line in the prompt.

    State and recovery. Persist plans, step states, and external correlation IDs. After a process restart, resume from the last confirmed state instead of replaying the whole conversation. When asynchronous skills complete, update state via callbacks or polling; the planner consumes facts and never fabricates “it should have succeeded by now.”

    Observability and evaluation hooks. Unified tracing, metrics, and audit. The harness does not judge business correctness, but it must make every decision and every call correlatable.

    Do not hardcode “a specific customer’s discount rules” or “a specific report’s column order” into the harness. These change. Put them into skills or an independent policy service—otherwise every business adjustment requires a runtime change, and the agent system degenerates into yet another hard-to-test monolithic workflow.

    4. Where Fat Skills Should Be Fat

    A fat skill means a complete implementation, not a verbose prompt. A production-ready skill contains at least the following layers.

    Keep the intent and boundary description short. A few sentences on when to use it, when not to, and how it differs from neighboring skills. Long role-play cannot replace constraints. If “generate report” actually scans a large table, state explicitly that it is read-only, with a maximum time range and a maximum row count, so the planner does not treat it as an arbitrary query.

    A machine-readable contract. Use schemas to describe field types, formats, enums, and mutual exclusions. An illustrative vendor-neutral pseudo-structure:

    1. skill: query_orders
    2. read_only: true
    3. idempotent: true
    4. input:
    5. order_id: {type: string, pattern: "^[A-Z0-9]{8,32}$", required: false}
    6. customer_id: {type: string, required: false}
    7. time_range: {type: object, required: false}
    8. constraints:
    9. - exactly_one_of: [order_id, customer_id]
    10. - if: customer_id
    11. then: time_range.max_span_days <= 31
    12. output:
    13. orders: {type: array, max_items: 200}
    14. errors: [VALIDATION, NOT_FOUND, PERMISSION, TIMEOUT, UPSTREAM]

    On validation failure, return a stable error code and actionable guidance; do not hand the raw exception stack to the model for free-form improvisation. Transformation logic (time zones, currencies, enum mapping) lives inside the skill, guaranteeing that the same input always produces the same normalized request.

    Side-effect classification. Separate read-only queries, retryable writes, and irreversible actions. Irreversible actions require an explicit confirmation token or a human node; the confirmation fact is written into state rather than the model verbally asserting “the user has agreed.” Idempotency keys are generated by the harness and passed into the skill, which uses them for downstream deduplication.

    Explicit failure semantics. Whether a timeout is retryable, whether a retry could double-charge, and how partial success is compensated—expressed as enums, not prose. The harness uses these to choose retry, backoff, or escalation to a human, instead of the model improvising “wait five minutes.” Waiting and timers belong to scheduling policy; parameters may be configurable, but the timer never lives in the prompt.

    Testability. A skill should be unit-testable without any model involvement: valid input, missing fields, mutual-exclusion conflicts, downstream timeouts, permission denials. Contract tests lock in error codes. The model only appears in upper-layer evaluation, so interface regressions are not tied to the variance of generated output.

    5. Don’t Hand the State Machine to Runtime Inference

    Splitting complex flows into explicit states is more reliable. Typical states include: collecting parameters, validating, awaiting confirmation, submitted, awaiting async result, succeeded, retryable failure, compensation required, human takeover. Transitions are event-driven: user supplementation, validation pass, downstream receipt, timeout. Each state permits only a declared subset of skills to be called, mechanically reducing unauthorized invocations.

    “If A fails, try B” should be written as a transition with guard conditions: which error classes from A permit B, what B’s preconditions are, and how the idempotency of the two attempts relates. Waiting uses persistent timers; timeout events enter a designated state. This keeps costs estimable and behavior replayable. Re-inferring the state machine through the model every turn is both expensive and impossible to reconcile.

    The model still adds value: extracting slots from natural language, choosing among multiple legal skills, and explaining structured results to users. Its output is a proposal; the harness decides whether to execute. Invalid proposals are rejected with a reason, forming a short closed loop—free text is never treated directly as interface payload.

    6. Observability, Evaluation, and Rollout

    Before going live, record at least four classes of signals. Planning quality: wrong skill selection, illegal parameters, redundant steps. Skill quality: validation rejection rate, downstream error distribution, P95 latency. Business outcomes: task completion rate, human takeover rate, count of duplicated side effects. Cost: steps, tokens, downstream calls. Failure samples must be replayable by correlation ID, covering input, proposal, validation result, and downstream summary.

    Build evaluation sets by scenario, not by flashy demos: missing-parameter follow-ups, ambiguity resolution, insufficient permissions, timeout retries, late async arrivals, compensation. When comparing a “description only” implementation against a “contract plus state machine” implementation, look at whether failures are explainable and whether side effects are duplicated—not whether a single conversation feels smooth. Roll out gradually: new skills start as read-only or shadow invocations, with write access enabled only after reconciliation matches. Treat any contract change as a breaking change: keep versions so old plans never reference new fields.

    7. Common Failure Modes in Practice

    Stuffing long retrieved documents into the skill description. This crowds the context and buries key constraints. Use a short description plus a strict schema; keep details in execution code and on-demand fragments from knowledge-base retrieval.

    One skill that queries, mutates data, and sends notifications. The planner cannot judge side effects and retry policy cannot discriminate. Split by side effect and let the harness compose them.

    Concatenating model output directly into queries or scripts. Restrict to structured parameters; the skill accesses downstream systems through parameterized calls. Never treat unvalidated text as executable statements.

    Disabling validation in demos to “improve success rates.” Production failures will arrive all at once. Validation should fail clearly from day one.

    Allowing automatic retry without idempotency and compensation. Stacked uncertainty makes ledger-vs-reality mismatches far worse than a single error.

    8. How to Tell Whether Your Architecture Is Right

    Three self-check questions. First: if you remove the model, can the skills still be used safely by other callers? If not, business determinism is still tied to prompts and the skills are not fat enough. Second: when you swap or upgrade the model, do the harness’s state, permissions, and audit remain unchanged? If every model change forces a process rewrite, the harness is not thin enough and boundaries are unclear. Third: for any given failure, can you answer whether it was a planning, validation, permission, or downstream problem? If not, observability has not entered the design.

    Thin Harness, Fat Skills is not a slogan—it is a division of responsibility. The harness is thin so the runtime is provable and recoverable. The skills are fat so every side effect is constrained and testable. Natural language proposes the next step; engineering contracts permit it to happen. Build along this boundary, and agents can leave the “impressive demo, breaks in production” zone and become operable enterprise automation—rather than another, harder-to-debug black box.