agentic-ai-engineering/site/.vitepress/dist/assets/blog_posts_mental-models.md...

12 lines
6.1 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{c as e,Q as a,j as t,m as i}from"./chunks/framework.BPKcPtvA.js";const c=JSON.parse('{"title":"Agent Memory: Mental Models That Compound","description":"","frontmatter":{},"headers":[],"relativePath":"blog/posts/mental-models.md","filePath":"blog/posts/mental-models.md","lastUpdated":1780488472000}'),n={name:"blog/posts/mental-models.md"};function l(o,s,h,p,r,d){return a(),t("div",null,[...s[0]||(s[0]=[i(`<h1 id="agent-memory-mental-models-that-compound" tabindex="-1">Agent Memory: Mental Models That Compound <a class="header-anchor" href="#agent-memory-mental-models-that-compound" aria-label="Permalink to &quot;Agent Memory: Mental Models That Compound&quot;"></a></h1><p><strong>June 9, 2026</strong></p><p>The biggest problem with agents is they forget. Every session starts from zero. Mental models solve this.</p><h2 id="what-a-mental-model-is" tabindex="-1">What a Mental Model Is <a class="header-anchor" href="#what-a-mental-model-is" aria-label="Permalink to &quot;What a Mental Model Is&quot;"></a></h2><p>A YAML file that the agent owns. It reads it at startup and updates it after work:</p><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">expertise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">topic</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;API patterns&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> notes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;We use tRPC for type-safe API calls&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> evidence</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;src/server/routers/*.ts&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> confidence</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">HIGH</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> last_updated</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;2026-05-24&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">observations</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">failure_pattern</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> observation</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;WebSocket reconnection needs backoff&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> status</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">unaddressed</span></span></code></pre></div><h2 id="the-rules" tabindex="-1">The Rules <a class="header-anchor" href="#the-rules" aria-label="Permalink to &quot;The Rules&quot;"></a></h2><ol><li><p><strong>Agents own their mental models.</strong> You do not touch them. The agent reads, writes, and updates its own expertise file.</p></li><li><p><strong>Self-improve commands validate against the codebase.</strong> The agent greps for evidence, checks if its knowledge is still accurate, and updates stale entries.</p></li><li><p><strong>Read-only expertise for critical knowledge.</strong> Billing workflows, deployment procedures, and security policies should never change.</p></li><li><p><strong>Knowledge compounds across sessions.</strong> Session 1: agent learns project structure. Session 2: learns common patterns. Session 3: learns failure modes. By session N, it operates at a senior engineer level for that codebase.</p></li></ol><h2 id="the-self-improve-loop" tabindex="-1">The Self-Improve Loop <a class="header-anchor" href="#the-self-improve-loop" aria-label="Permalink to &quot;The Self-Improve Loop&quot;"></a></h2><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">just</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> self-improve-backend</span></span></code></pre></div><p>This command triggers the agent to scan the codebase, validate its expertise against actual file contents, and update anything that has drifted.</p><h2 id="why-this-matters" tabindex="-1">Why This Matters <a class="header-anchor" href="#why-this-matters" aria-label="Permalink to &quot;Why This Matters&quot;"></a></h2><p>Without mental models, every agent session is Day 1. The agent rediscovers the same things repeatedly: &quot;Oh, this project uses tRPC. Oh, tests go in the tests directory. Oh, we deploy via Docker.&quot; Mental models turn every session into Day 100.</p><hr><p><em>From Module 4 of the <a href="/">Agentic Engineering Course</a>. The full module covers multi-agent systems with domain locking, delegation, and P2P communication.</em></p>`,15)])])}const g=e(n,[["render",l]]);export{c as __pageData,g as default};