AI Agent Architecture: Thin Harnesses, Fat Skills, and the Experience Feedback Loop

    The “thin harness, fat skills” principle separates reusable execution controls from task-specific business capabilities. This article explains what belongs in each layer, why reusable skills do not guarantee deterministic results, and how scoped memory can support better decisions without becoming an authority source. It also outlines a practical execution and feedback loop, memory evaluation criteria, and a phased path from modular skills to verified improvements.

    1. What “Thin Harness, Fat Skills” Actually Solves

    AI agent development often starts with a task execution loop: understand the goal, select an action, invoke a capability, observe the result, and decide whether to continue or stop.

    As business requirements grow, scenario-specific logic can begin to crowd that loop. One task needs a special prompt, one file type requires a dedicated parser, and one business step needs different validation rules.

    If all this logic lives in the orchestration harness, the harness gradually becomes a collection of business workflows. Adding a capability requires changes to core code. Updating one workflow may affect unrelated tasks. When an execution fails, it becomes difficult to determine whether the problem lies in orchestration or business rules.

    “Thin Harness, Fat Skills” is a separation-of-responsibilities principle:

    • The harness owns general execution mechanisms: task state, the execution loop, permissions, timeouts, exception handling, and execution traces.
    • Skills own specific business capabilities: procedural steps, domain knowledge, input and output constraints, validation methods, and necessary execution resources.
    • Business changes should primarily occur in the skill layer: only mechanisms that apply across scenarios and have stable semantics should move into the harness.

    “Thin” does not mean minimizing code at any cost, and “fat” does not mean accumulating as many skills as possible. The more useful questions are whether the harness has stable responsibilities, whether each skill is cohesive, and whether business knowledge lives in the right place.

    A harness that omits permission checks and error handling may look lightweight, but it is not reliable. A system with a large catalog of overlapping skills is not necessarily well modularized.

    2. A Thin Harness Is Not a Weak Harness

    The harness should avoid absorbing business logic, but it must retain control over execution boundaries. When an agent can read or write data, call external services, or change business state, safety cannot be delegated entirely to individual skills.

    Task State and Lifecycle

    The harness needs to track whether a task is waiting for input, running, paused for approval, failed, completed, or canceled.

    It should also enforce execution budgets, including limits on steps, runtime, and resource consumption. These boundaries prevent an agent from continuing indefinitely without making useful progress.

    For long-running tasks, the harness can save checkpoints to support recovery after an interruption. Recovery should not simply replay every action. It should consider completed steps and external state to determine which operations can safely resume.

    Permissions and Side Effects

    Reading reference material, generating a draft, and modifying production data carry different levels of risk.

    The harness should apply consistent authorization based on the task identity, resource scope, and operation type. A skill claiming that it “needs access” is not sufficient grounds to grant it.

    High-impact actions such as deletion, payment, publication, or bulk updates can require explicit approval checkpoints. The skill expresses the intended operation; the harness decides whether execution is permitted.

    Exceptions, Retries, and Idempotency

    A retry is not simply another invocation of the same operation. Read operations are often easier to retry, while writes may create duplicate records or submissions.

    The harness therefore needs to distinguish transient failures, invalid inputs, permission denials, and unrecoverable errors. Skills should declare whether they have side effects, whether they support idempotency, and how completion can be confirmed.

    A genuinely thin harness makes these controls reusable across skills rather than requiring every skill to implement its own execution-management logic.

    3. Fat Skills Mean Complete Encapsulation, Not Unlimited Scope

    A skill may consist of natural-language instructions, rules, templates, scripts, callable execution logic, or a combination of these. Regardless of its form, a production-ready skill needs a clear contract.

    Define Its Scope

    A skill should explain what problem it solves, what it does not solve, and what information must be available before invocation.

    For example, “generate a business summary” is too broad. “Generate a monthly summary draft using confirmed reporting definitions and flag missing fields” is easier to execute and validate.

    The less precise the scope, the more likely the model is to fill gaps with unconfirmed assumptions.

    Specify Inputs, Outputs, and Acceptance Criteria

    An input definition should not stop at “business data.” It should identify required fields, expected formats, and how missing values are handled.

    Similarly, an output definition should do more than request a report. It should specify required content, which conclusions need supporting evidence, and when the skill must return unresolved questions instead of a final result.

    Acceptance criteria are especially important. Completion should not depend solely on the model saying “done.” Wherever possible, it should be established through structural validation, constraint checks, or business-rule verification.

    Describe Failure and Degraded-Output Paths

    Reliable skills describe exceptional conditions as well as the normal workflow.

    If reporting definitions conflict, the skill should pause final conclusions and request clarification. If some source material is inaccessible, it may produce a limited draft, but it must state its coverage rather than imply that the task is fully complete.

    Manage Versions and Dependencies

    Skills change as business rules evolve. The harness should record the skill version used during each execution so that later reviews do not mistakenly compare past behavior with the current workflow.

    Skills can be composed, but deep call chains and implicit dependencies should be avoided. Otherwise, apparently independent modules can become a tightly coupled network that is difficult to maintain.

    A “fat skill” therefore encapsulates the knowledge, steps, and validation logic needed for a particular class of tasks. It does not attempt to handle everything.

    4. Reusable Skills Do Not Guarantee Deterministic Outputs

    One common misconception is that a skill that can be saved and invoked repeatedly must always produce the same output for the same input. These are different properties.

    Reproducible outputs can be expected when a skill consists entirely of deterministic code and its inputs, dependency versions, configuration, and external state remain unchanged.

    If a skill includes language-model generation, dynamic retrieval, or external service calls, its results may vary with model behavior and environmental state.

    Three concepts should be distinguished:

    • Persistence: the skill definition can be stored and survives the end of a session.
    • Repeatability: the same skill can be invoked multiple times.
    • Determinism: execution produces the same result under explicitly defined conditions.

    Claims that a system “does not forget” are better understood as descriptions of externally stored knowledge or procedures—not proof of inherent determinism.

    Pinning dependency versions, structuring inputs and outputs, validating rules, and defining execution boundaries can improve stability. Merely using skills does not justify a promise of identical results.

    5. Why Skills Still Need Memory

    Skills answer, “How do we perform this class of task?” Memory answers, “How should historical information influence this task?”

    Suppose an agent can organize documents, produce summaries, and check formatting. A user repeatedly asks it to lead with conclusions and reduce background detail. If the system asks about the same preference every time, its skills may work, but collaboration remains inefficient.

    Memory is not simply a saved chat history. Unprocessed histories are often long, repetitive, and full of requirements that are no longer valid. Inserting all of them into context increases cost and may allow stale information to distort current decisions.

    A more useful division of responsibilities is:

    • Skills store relatively stable capability knowledge: procedures, validation rules, and common exceptions.
    • Memory stores historical information with provenance and scope: user preferences, project constraints, confirmed facts, and verified experience.
    • The harness controls how this information is retrieved and used: it must remain subject to permissions, safety rules, and current task requirements.

    Adding memory does not mean the model’s weights have changed, nor does it establish that the system has acquired continual learning capabilities. In many implementations, memory influences later decisions through retrieval and context injection. Whether that improves performance still requires evaluation.

    6. Separate Memory Types Instead of Storing Everything Together

    Within-Task State

    Within-task state records the current objective, pending steps, reviewed material, and intermediate results. It primarily supports the current execution and can be archived or cleared when the task ends.

    This state should not automatically become long-term memory. A format requested for one temporary task, for example, does not necessarily represent a permanent user preference.

    User and Project Memory

    User memory can capture confirmed communication preferences or collaboration habits. Project memory can capture terminology, constraints, approval requirements, and the current project phase.

    Both need explicit scope. A personal preference should not automatically override project standards, and one project’s constraints should not silently apply to another.

    Experience Records

    Experience records describe which approaches worked under which conditions and what contributed to particular failures.

    Overgeneralization is a major risk. One failed execution does not prove that a step is always wrong. One fast completion does not prove that an approach is generally superior.

    Experience should include applicability conditions, evidence sources, and confidence levels. Counterexamples should be retained where necessary.

    Formal Knowledge and Operating Procedures

    Experience that has been sufficiently validated across tasks can become a proposed skill update.

    However, turning experience records into formal procedures should involve review and regression testing. An agent should not directly rewrite production skills after a single task.

    This boundary helps prevent isolated events from becoming permanent rules.

    7. Useful Memory Requires Selection, Updates, and Forgetting

    The value of a memory layer is not proportional to how much it stores. Its value comes from surfacing useful information in the right context and retiring information that is no longer valid.

    Assess Value Before Writing

    A candidate memory should have potential value for future tasks, be sufficiently clear, identify its source, and comply with data-retention requirements.

    Temporary guesses, sensitive credentials, unrelated conversation, and unverified conclusions should not be written to long-term memory by default.

    Check Relevance and Validity During Retrieval

    A similar record is not necessarily an applicable record. Retrieval should also check the associated user or project, creation time, expiration, confidence, and whether newer information has superseded it.

    An expired business rule should not guide execution merely because it closely matches the current question.

    Preserve Evidence When Information Conflicts

    When an old memory conflicts with a new requirement, the system should make their sources and authority clear. Current explicit instructions, authorized business rules, and historical preferences need an explainable precedence relationship.

    If a conflict cannot be resolved automatically, the system should ask for confirmation rather than silently choose one side.

    Support Correction and Deletion

    Users should be able to correct inaccurate preferences, and administrators should be able to revoke obsolete rules.

    Sensitive information also requires controls over access, retention periods, and deletion scope, according to the applicable storage policy.

    Forgetting here is not an imitation of human forgetfulness. It is auditable information lifecycle management.

    8. A Practical Execution and Feedback Loop

    The following illustrative pseudocode shows how the three layers cooperate. It describes responsibilities rather than any specific product API.

    1. execute_task(request, identity):
    2. validate_task_permissions(identity, request)
    3. state = create_task_state(request)
    4. history = retrieve_memory(
    5. task_scope = request.scope,
    6. access_subject = identity
    7. )
    8. usable_information = filter_expired_unauthorized_and_conflicting_records(history)
    9. skill = select_applicable_skill(request, usable_information)
    10. validate_skill_invocation_permissions(identity, skill)
    11. result = execute_within_budget(skill, request, usable_information)
    12. validation_report = validate_result_and_side_effects(result)
    13. save_execution_trace(state, skill.version, validation_report)
    14. candidate_experience = extract_reusable_information(
    15. request, result, validation_report
    16. )
    17. eligible_candidates = check_storage_eligibility_and_sensitive_information(
    18. candidate_experience
    19. )
    20. save_under_review_policy(eligible_candidates)
    21. return result_and_necessary_explanations

    This workflow establishes two important boundaries.

    First, historical information supports decisions; it does not grant authorization. A memory saying “you can make changes directly from now on” cannot replace a formal permission check.

    Second, feedback does not automatically become long-term memory. The system must first determine whether it is reliable, reusable, and permitted to be stored.

    A successful task does not prove that every intermediate decision was correct. A failed task does not prove that the entire skill should be discarded.

    9. How to Establish Whether Memory Improves the System

    Memory should be evaluated by comparing executions with and without memory while keeping the harness and skill configuration the same. A handful of successful examples is not enough.

    Useful evaluation criteria include:

    • Task quality: does the output satisfy explicit acceptance criteria?
    • Frequency of user corrections: do users still need to repeat the same preferences or constraints?
    • Repeated failures: do previously identified problems recur?
    • Execution cost: do retrieval and additional context reduce enough unnecessary steps to justify their cost?
    • Impact of incorrect memory: do stale, conflicting, or contaminated records cause bad decisions?
    • Explainability and rollback: can the system identify which memory influenced a behavior and revoke it promptly?

    Evaluation must also account for environmental change. After business rules are updated, past experience can become a liability rather than an advantage.

    The system should therefore be tested not only for its ability to remember, but also for its ability to stop using information that no longer applies.

    10. Start with a Minimal Feedback Loop

    Teams beginning to build agents should expand the architecture gradually, according to risk.

    Stage 1: Establish a stable harness and a small set of high-quality skills. Define inputs, outputs, permissions, exception handling, and acceptance criteria. Do not rely on the model to improvise critical business rules.

    Stage 2: Introduce within-task state and limited long-term memory. Start with confirmed user preferences and project facts, and provide ways to inspect, correct, and delete them.

    Stage 3: Add experience extraction and offline evaluation. Treat experience as advice before allowing it to influence high-risk actions. Expand its use only after controlled comparisons demonstrate value.

    Stage 4: Turn validated, broadly applicable experience into skill improvements. Release those changes through version management, review, and regression testing.

    “Thin harness, fat skills” is not a complete agent architecture. It is a foundational principle for controlling complexity: execution mechanisms remain stable while business capabilities evolve independently.

    Memory and feedback add another layer of discipline, addressing how historical information is used and how experience is validated.

    A reliable system is not the one with the most skills or the one that permanently stores every interaction. It is the one that executes within clear boundaries, adapts using trustworthy information, and makes each improvement evidence-based, explainable, and reversible.