Agent Design Principles: Thin Harness and the Memory Layer

    This article examines why the common "thin harness, thick capability modules" principle is often misread, and how adding a memory layer turns a static agent architecture into one that improves over time. It explains the three-layer model of harness, capability modules, and memory, shows how deterministic execution and experience-based optimization can coexist without breaking reliability, and lists practical requirements for storing, retrieving, forgetting, and observing memory, along with common pitfalls and a suggested evolution path.

    1. The Misread Principle: Determinism Is Not Growth

    The design principle of a “thin harness and thick capability modules” is easy to interpret as: keep orchestration as thin as possible, make reusable capabilities as thick as possible, and keep every invocation highly deterministic. Hidden inside this reading is a cognitive trap — treating “never forgets” as a pure advantage.

    In engineering terms, never forgetting means the same input always produces the same output, which is the foundation of reliability. But it also means the system never accumulates tendencies from actual use. If a capability module is invoked a hundred times and each run is a fresh execution, what it gains is repetition, not refinement.

    Human memory works the opposite way. It forgets, and forgetting acts as a filtering mechanism that turns frequent, critical information into intuition and skill. A person does not need to remember the details of every bike ride, only how to ride a bike. That “knowing how” is precisely the product of forgetting and refinement working together.

    For this reason, the “thick” in thick capability modules is usually a matter of quantity: a hundred capability modules provide a hundred capabilities, but those capabilities remain isolated from one another, with no connection, no accumulation, and no tendencies grown out of real usage. The layer missing from the three-layer agent architecture is memory.

    2. The Three-Layer Architecture: Skeleton, Muscle, and Nerves

    A single analogy clarifies the boundaries of responsibility:

    • The harness is the skeleton: it determines structure, posture, and direction of movement, and is responsible for context organization, task decomposition, tool selection, and flow control. It should stay thin and stable.
    • Capability modules are the muscle: they determine strength, speed, and concrete actions, encapsulating deterministic logic such as data queries, format conversion, rule validation, and calls to external systems.
    • Memory is the nervous system: it connects skeleton and muscle, feeding historical experience back into the current decision so that the next execution is more precise than the last.

    Muscle without a nervous system contracts in isolation every time. Doing a hundred squats works because the tissue undergoes structural change under repeated stimulus, whereas a capability module executing a hundred similar tasks does not change itself. The memory layer performs exactly this kind of structural change: it extracts tendencies from tasks, for example that a user prefers short answers, that a certain type of scenario often fails at the third step, or that a particular path has historically been faster. These tendencies are not new capability modules; they are experiential adjustments that grow on top of existing capabilities.

    3. Dividing Labor Between Determinism and Progressive Optimization

    The opposite of “never forgets” is not “always forgets,” but “layering experience on top of determinism.” The two can coexist, and they must be separated into layers:

    1. # Determinism layer: repeatable, testable, rollback-safe
    2. def execute(skill, payload):
    3. return skill.run(payload) # same input, same output
    4. # Memory layer: does not change execution semantics, only selection preference
    5. def decide(context, skills, memory):
    6. hints = memory.retrieve(context) # retrieve historical tendencies
    7. ranked = rank(skills, hints) # rank, do not rewrite
    8. return execute(ranked[0], context.payload)

    The key constraint is that memory must not tamper with the internal logic or output contract of capability modules; it only affects “which one to pick, how to rank, when to validate, and how to route around failures.” This preserves engineering reliability while gaining progressive optimization.

    4. Key Points for Implementing the Memory Layer

    1. Layered storage: separate short-term session context, mid-term task-level experience, and long-term preferences and policies, each with its own write and eviction rules to avoid unbounded growth.
    2. Write threshold: only persist verifiable conclusions, such as “this validation step blocked an error” or “this path took less time,” and filter out one-off coincidences.
    3. Retrieval strategy: use approximate recall based on scenario tags, task types, and error characteristics, controlling the volume and relevance of the context injected.
    4. Forgetting mechanism: apply time decay and conflict resolution so new evidence overrides old tendencies, preventing stale experience from hardening into bias.
    5. Observability: record whether memory was hit, whether it changed the choice, and whether the result was better, closing the loop on evaluating payoff with monitoring, alerts, and logs.
    6. Isolation and compliance: distinguish user-level from tenant-level memory, desensitize sensitive information before storage, and support deletion on a per-user basis.

    5. Common Pitfalls and an Evolution Path

    Common pitfalls include turning memory into a full conversation archive, which creates context noise; letting memory directly rewrite outputs, which breaks testability; only adding and never deleting, so old preferences suppress new facts; and treating memory as more stacked capability modules, which further thickens the muscle while ignoring the nerves.

    The suggested order of evolution is: first make the harness thin and the capability modules deterministic; then introduce task-level experience recording; next add preference accumulation and decay; and finally use offline evaluation together with online metrics to verify whether the same scenario performs better than last time. When the harness stays lean, capabilities stay reliable, and memory keeps refining, “thin harness, thick capabilities” is upgraded from a static structure into a system that can grow.