Agent Design Principles: Thin Harness and Fat Skills Explained

    This article breaks down the "Thin Harness, Fat Skills" principle for building maintainable AI agents. It explains the responsibility boundaries between a lightweight orchestration shell and a heavy skill layer, how to decide whether a task belongs in the language latent space or the deterministic space, and the engineering conventions for skill directories and invocation contracts. It also covers common anti-patterns, their fixes, and the infrastructure needed to operate skills as versioned, observable software assets.

    1. Where the Problem Starts: Why Agents Get Harder to Maintain

    In the early stage of agent development, teams often cram all logic into one giant prompt template: role definition, tool descriptions, business rules, exception handling, and output format all mixed into the same block of text. The system may pass a demo after launch, but three problems show up quickly: conflicting instructions in the prompt cause behavior drift; every new capability requires changes to the main flow; and when something breaks, it is impossible to tell whether the model made a bad judgment or the code failed during execution.

    “Thin Harness, Fat Skills” is a layering principle aimed at exactly this structural flaw. Its core claim is a single sentence: keep the orchestration shell (the Harness) as thin as possible, and keep the capability-bearing Skills as thick as possible. The shell only perceives context, selects skills, and assembles results. Real business knowledge, judgment logic, and deterministic computation all sink down into skill units that can be developed, tested, and reused independently.

    2. Responsibility Boundaries of the Two Layers

    2.1 Thin Harness: Only Four Jobs

    A thin shell must strictly limit its scope. It typically handles only:

    • Context assembly: turning the user request, history, and environment information into model-readable input.
    • Skill discovery: listing the currently available skills and their applicability conditions.
    • Invocation and orchestration: deciding call order, handling parallelism and retries.
    • Result convergence: validating output structure and producing the final reply.

    No concrete business rules and no large blocks of domain knowledge should appear in the shell. Otherwise it expands as the business grows and eventually degrades into an unmaintainable monolith prompt.

    2.2 Fat Skills: Where Most of the Engineering Effort Goes

    The skill layer concentrates most of the development work. Each skill behaves like a function: it sits idle until the shell loads it on demand. Skills come in two forms, and the two must be strictly separated:

    • Descriptive skills: skill specification documents written in natural language. They operate in the language latent space and rely on the model to read, interpret, and decide, taking on judgment, generalization, and pattern recognition.
    • Deterministic skills: logic implemented as scripts or compiled code. They guarantee that the same input always produces the same output, covering work such as data queries, numeric computation, format conversion, and state validation.

    In one sentence: the skill layer is a hybrid of “Software 1.0 + Software 2.0” — code guarantees reliability, natural language carries intelligence.

    3. Dividing Labor Between the Latent Space and the Deterministic Space

    Intelligence lives in the language space: the model reads, interprets, and decides there, and its output is a conclusion colored by judgment. Trust lives in the deterministic space: identical input yields identical output, stable and reproducible every time, which makes it suitable for queries, compilation and execution, and arithmetic.

    The original text uses a seating arrangement scenario to show the cost of crossing that boundary. Ask the model to seat eight guests with distinct personalities and social attributes, and it can weigh interpersonal sensitivities and produce a reasonable arrangement. Hand it the seating for eight hundred people and ask it to generate the chart directly, and it will output a seating plan that looks plausible but violates a large number of constraints. The real issue is that a combinatorial optimization problem — deterministic, exhaustively verifiable, requiring exact constraint solving — was forced into the language latent space.

    Three criteria can decide where a task belongs:

    1. Can the result be verified automatically? If yes, prefer a deterministic implementation and let the model only generate candidates and explanations.
    2. Does the scale cross the combinatorial explosion threshold? Small samples can go to judgment; large samples must go to algorithms.
    3. Is the cost of an error tolerable? Output involving money, permissions, or compliance must be produced by deterministic code; the model must not issue the conclusion directly.

    An illustrative split:

    1. Skill: banquet seating arrangement
    2. latent_step: read guest relationships and sensitivities, output structured preferences and taboos (judgment)
    3. deterministic_step: generate the seating with constraint solving / heuristics and validate all hard constraints (computation)
    4. convergence: if validation fails, return the conflict details to latent_step to restate the constraints

    This structure — judgment first, computation as the backstop, validation closing the loop — significantly reduces how much hallucination can contaminate the final result.

    4. Why Skills Are the Asset Worth Investing In

    The compounding effect of skills comes from four properties. First, writing a skill once is a permanent upgrade to the system and does not decay over time. Second, skills do not forget: behavioral consistency is guaranteed by files and code rather than memory. Third, they keep running unattended, taking on batch and inspection work. Fourth, they are cross-generational: when a newer model is plugged in, the judgment quality inside descriptive skills improves automatically, while deterministic skills keep producing fully reliable output.

    This makes the direction of architectural investment clear: move budget and headcount away from repeatedly tuning one giant prompt and toward continuously expanding a high-quality skill library.

    5. Implementation Conventions: Skill Directories and Invocation Contracts

    Organize skills by directory. Each skill contains a specification file and optional scripts, and follows a uniform contract:

    1. /skills
    2. /seat-arrangement
    3. SKILL.md # applicable scenarios, inputs and outputs, constraints, failure handling
    4. solver.py # deterministic solving and validation
    5. /invoice-reconcile
    6. SKILL.md
    7. reconcile.py

    The specification file should state four things: when to use the skill, which inputs it needs, the output structure and acceptance criteria, and the fallback path on failure. Scripts should be pure functions with no hidden side effects, unit-testable and replayable. The shell loads skill metadata through a unified registry and injects only the descriptions relevant to the current request into the context, keeping context length and selection noise under control.

    6. Common Anti-Patterns and Fixes

    • Fat shell: business rules written into the main prompt. Fix: extract the rules into a descriptive skill and keep only orchestration in the shell.
    • Mixing intelligence and code: one skill both computes numbers and draws conclusions. Fix: split it into a judgment step and a computation step.
    • Skills that are too coarse: one skill covers several unrelated concerns. Fix: split by “smallest capability that can be verified independently.”
    • Missing acceptance criteria: a skill document only says “handle the data properly.” Fix: add acceptance conditions that can be checked automatically.
    • No fallback path: after the deterministic step fails, the model invents a result. Fix: fail explicitly and return a structured error.

    7. Working with General Cloud Capabilities

    For skills to become operable assets, they need general-purpose infrastructure: object storage to hold skill packages and versions; a container platform to run deterministic scripts in a consistent dependency environment; a message queue to decouple long-running tasks and retries; logging, monitoring, and alerting to observe call chains, failure rates, and latency; and a key management capability to hold credentials so scripts never hardcode them. Baidu AI Cloud offers composable building blocks in these general categories, which makes it easier to turn a skill library into a software asset that is versioned, rollback-capable, and observable.

    8. Conclusion

    “Thin Harness, Fat Skills” is not a prompt trick but a software architecture decision: keep the shell thin for stability, keep skills thick to accumulate capability; leave judgment to the language latent space and precision to the deterministic space; treat every skill written as a system upgrade that does not decay. Organize agents this way and the system gains maintainability, verifiability, and long-term value that keeps growing as models evolve.