<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: IT Lackey</title>
    <description>The latest articles on DEV Community by IT Lackey (@itlackey).</description>
    <link>https://dev.to/itlackey</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F235795%2F23836c99-9353-4cc6-a4f3-282d119c1824.jpeg</url>
      <title>DEV Community: IT Lackey</title>
      <link>https://dev.to/itlackey</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/itlackey"/>
    <language>en</language>
    <item>
      <title>One Schema to Rule Them All: The Config v2 Rewrite</title>
      <dc:creator>IT Lackey</dc:creator>
      <pubDate>Thu, 04 Jun 2026 00:31:43 +0000</pubDate>
      <link>https://dev.to/itlackey/one-schema-to-rule-them-all-the-config-v2-rewrite-4jek</link>
      <guid>https://dev.to/itlackey/one-schema-to-rule-them-all-the-config-v2-rewrite-4jek</guid>
      <description>&lt;p&gt;This is part sixteen in a series about managing the growing pile of skills, scripts, and context that AI coding agents depend on. The &lt;a href="https://dev.to/itlackey/akm-080-cli-redesign-task-assets-and-belief-aware-memory-335a"&gt;0.8.0 release notes&lt;/a&gt; cover the storage and pipeline changes that shipped alongside this rewrite; &lt;a href="https://dev.to/itlackey/from-30-minutes-to-8-how-llm-mode-reflect-works-5epl"&gt;Part thirteen&lt;/a&gt; covers how the new &lt;code&gt;profiles.improve&lt;/code&gt; config drives the improve pipeline.&lt;/p&gt;

&lt;p&gt;Config files are where projects go to accumulate technical debt quietly. Each new feature gets a new key. Each new key gets a new parser. Each parser has slightly different error handling, slightly different defaults, and slightly different ideas about what "invalid" means. Nobody notices until a user files an issue that says "I had a typo in my config and akm just silently used defaults for three weeks."&lt;/p&gt;

&lt;p&gt;That was the state of akm's config layer going into 0.8.0.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Old Shape Looked Like
&lt;/h2&gt;

&lt;p&gt;The v1 config had three top-level blocks that grew independently over two years: &lt;code&gt;llm.*&lt;/code&gt; for LLM connection settings, &lt;code&gt;agent.*&lt;/code&gt; for agent process settings, and &lt;code&gt;llm.features.*&lt;/code&gt; boolean flags gating per-feature LLM calls. The features block was nested under &lt;code&gt;llm&lt;/code&gt; for historical reasons even though many features used the agent, not the LLM. The agent's per-process map lived under &lt;code&gt;agent.processes&lt;/code&gt;, while LLM-gated features used &lt;code&gt;llm.features.index.metadata_enhance&lt;/code&gt; style dotted paths.&lt;/p&gt;

&lt;p&gt;Each block had its own parser function. &lt;code&gt;parseLlmConfig&lt;/code&gt;, &lt;code&gt;parseEmbeddingConfig&lt;/code&gt;, &lt;code&gt;parseIndexConfig&lt;/code&gt;, and a dozen more. The comment at the top of the new &lt;code&gt;config-schema.ts&lt;/code&gt; is blunt about it: the Zod schema "replaces the ~1.4k LOC of legacy per-shape parsers."&lt;/p&gt;

&lt;p&gt;The problems that accumulated in that ~1.4k LOC:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unknown keys were silently accepted.&lt;/strong&gt; If you wrote &lt;code&gt;llm.temperaure&lt;/code&gt; (typo), the parser ignored it and fell back to the default temperature. No warning. You tuned a key that did nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bad JSON was masked.&lt;/strong&gt; The config loader caught JSON parse errors and fell back to &lt;code&gt;DEFAULT_CONFIG&lt;/code&gt; — the compiled-in defaults. Your entire config file could be corrupt and akm would start without complaint, using defaults across the board.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Missing files fell back to defaults.&lt;/strong&gt; Same behavior. A missing config file and a present-but-corrupt one looked identical at runtime.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adding a field meant adding a parser.&lt;/strong&gt; Want a new boolean flag under a feature? Find the right parser function, add the extraction logic, add the type declaration, add the hint string, add the test. The cost of a new field was not one line — it was a small PR touching four or five places.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Zod Gives You
&lt;/h2&gt;

&lt;p&gt;The 0.8.0 rewrite consolidates all of that into &lt;code&gt;src/core/config-schema.ts&lt;/code&gt;: a single Zod schema that is the source of truth for the on-disk shape.&lt;/p&gt;

&lt;p&gt;Zod handles the parse, transform, and validate steps that were previously scattered across ~1.4k LOC of hand-written code. A new config field is a one-line schema addition. Type inference means the TypeScript types for &lt;code&gt;AkmConfig&lt;/code&gt; are derived from the schema automatically — no parallel maintenance between the schema and the type declarations.&lt;/p&gt;

&lt;p&gt;The schema design makes deliberate tradeoffs between strictness and resilience:&lt;/p&gt;

&lt;p&gt;The top-level object uses &lt;code&gt;.passthrough()&lt;/code&gt; so unknown future keys round-trip intact. If a user upgrades and then downgrades, keys added by the newer version survive without triggering errors on the older version. &lt;code&gt;sanitizeConfigForWrite&lt;/code&gt; decides what to strip on write.&lt;/p&gt;

&lt;p&gt;Nested sub-objects use &lt;code&gt;.catch(undefined)&lt;/code&gt; for field-level shape errors so that a typo in one field does not destroy an otherwise valid config. This preserves the legacy parser's warn-and-ignore semantics for individual fields while still catching structural problems.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.strict()&lt;/code&gt; walls gate the records that are most typo-prone: &lt;code&gt;registries[]&lt;/code&gt;, &lt;code&gt;sources[]&lt;/code&gt;, and &lt;code&gt;profiles.*&lt;/code&gt; sub-shapes. A typo in a profile name or a source type now produces a validation error at load time.&lt;/p&gt;

&lt;p&gt;Two cases are hard-rejected by &lt;code&gt;superRefine&lt;/code&gt; rather than silently dropped: the old &lt;code&gt;stashes[]&lt;/code&gt; key (replaced by &lt;code&gt;sources[]&lt;/code&gt;) and a legacy source type that had been removed. Both have explicit migration paths — silently ignoring them would mask user data loss.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Silent Failure Fixes
&lt;/h2&gt;

&lt;p&gt;The new loader changed three behaviors that were causing silent failures in the field.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unknown keys now error at the profile level.&lt;/strong&gt; A typo in &lt;code&gt;profiles.llm.my-profile&lt;/code&gt; is caught at load time rather than ignored. The error message names the unexpected key and points at the profile block.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bad JSON now throws.&lt;/strong&gt; If &lt;code&gt;config.json&lt;/code&gt; is not valid JSON, akm throws a &lt;code&gt;ConfigError&lt;/code&gt; with the file path and the parse error. No fallback to defaults. The user finds out immediately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Missing files stay missing.&lt;/strong&gt; A missing config file is a different situation from a corrupt one, and akm treats them differently now. First run with no config: &lt;code&gt;akm setup&lt;/code&gt; or an explicit &lt;code&gt;akm config set&lt;/code&gt; creates the file. A missing file during a subsequent run is an error, not a silent fallback.&lt;/p&gt;

&lt;h2&gt;
  
  
  Auto-Generated JSON Schema
&lt;/h2&gt;

&lt;p&gt;With a Zod schema as the source of truth, generating a JSON schema for editor autocompletion is a natural output. The &lt;code&gt;schemas/akm-config.json&lt;/code&gt; file is generated from the Zod schema and checked in. A CI drift test fails if the checked-in file is out of sync with the schema source — there is no manual step to remember when adding a field.&lt;/p&gt;

&lt;p&gt;Point your editor at the schema and you get field completion and inline documentation in &lt;code&gt;config.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"$schema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://itlackey.github.io/akm/schemas/akm-config.0.8.0.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"configVersion"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.8.0"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;$schema&lt;/code&gt; key is optional. VSCode and other JSON Schema-aware editors pick it up automatically for field completion and inline docs.&lt;/p&gt;

&lt;h2&gt;
  
  
  The New Config Shape
&lt;/h2&gt;

&lt;p&gt;The 0.8.0 shape replaces the scattered &lt;code&gt;llm.*&lt;/code&gt;, &lt;code&gt;agent.*&lt;/code&gt;, and &lt;code&gt;llm.features.*&lt;/code&gt; blocks with a unified &lt;code&gt;profiles&lt;/code&gt; tree and first-class feature sections.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Old location&lt;/th&gt;
&lt;th&gt;New location&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;llm.endpoint&lt;/code&gt;, &lt;code&gt;llm.model&lt;/code&gt;, &lt;code&gt;llm.apiKey&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;profiles.llm.&amp;lt;name&amp;gt;.endpoint&lt;/code&gt;, &lt;code&gt;.model&lt;/code&gt;, &lt;code&gt;.apiKey&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;agent.platform&lt;/code&gt;, &lt;code&gt;agent.bin&lt;/code&gt;, &lt;code&gt;agent.args&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;profiles.agent.&amp;lt;name&amp;gt;.platform&lt;/code&gt;, &lt;code&gt;.bin&lt;/code&gt;, &lt;code&gt;.args&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;agent.processes.&amp;lt;name&amp;gt;.*&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;profiles.improve.&amp;lt;name&amp;gt;.processes.*&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;llm.features.index.metadata_enhance&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;index.metadataEnhance.enabled&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;llm.features.search.curate_rerank&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;search.curateRerank.enabled&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Named LLM connections live under &lt;code&gt;profiles.llm.&amp;lt;name&amp;gt;&lt;/code&gt;, declared once and referenced by name from process entries. Named agent connections live under &lt;code&gt;profiles.agent.&amp;lt;name&amp;gt;&lt;/code&gt;. The improve profile (&lt;code&gt;profiles.improve.&amp;lt;name&amp;gt;.processes.*&lt;/code&gt;) binds processes to specific LLM or agent profiles and controls per-process gating. Non-improve features (&lt;code&gt;index.metadataEnhance&lt;/code&gt;, &lt;code&gt;index.stalenessDetection&lt;/code&gt;, &lt;code&gt;search.curateRerank&lt;/code&gt;) are first-class top-level entries.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;configVersion&lt;/code&gt; field is the version gate. Configs without it, or with a pre-0.8.0 value, are auto-migrated at first run.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Minimal Working Config
&lt;/h2&gt;

&lt;p&gt;The smallest config that gets you a fully functional 0.8.0 installation with a cloud LLM for improve operations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"configVersion"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.8.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"$schema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://itlackey.github.io/akm/schemas/akm-config.0.8.0.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"profiles"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"openai-mini"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"endpoint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://api.openai.com/v1/chat/completions"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"gpt-4o-mini"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"apiKey"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${OPENAI_API_KEY}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"temperature"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"supportsJsonSchema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"agent"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"opencode-default"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"platform"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"opencode"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"bin"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"opencode"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"run"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"improve"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"default"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"processes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"reflect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"enabled"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"profile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"openai-mini"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"distill"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"enabled"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"profile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"openai-mini"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"consolidate"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"enabled"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"profile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"openai-mini"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"memoryInference"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"enabled"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"graphExtraction"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"enabled"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"profile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"openai-mini"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"defaults"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"openai-mini"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"agent"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"opencode-default"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"improve"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"default"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"embedding"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"endpoint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://localhost:11434/v1/embeddings"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"nomic-embed-text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"dimension"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;384&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"stashDir"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"~/akm"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a trimmed example focused on the core profiles and defaults. The full minimal config in &lt;a href="https://github.com/itlackey/akm/blob/main/docs/configuration.md" rel="noopener noreferrer"&gt;docs/configuration.md&lt;/a&gt; also includes &lt;code&gt;feedbackDistillation&lt;/code&gt;, &lt;code&gt;index&lt;/code&gt;, and &lt;code&gt;search&lt;/code&gt; top-level blocks with their defaults. If you omit those blocks, akm uses compiled-in defaults for them.&lt;/p&gt;

&lt;p&gt;For local models, swap &lt;code&gt;openai-mini&lt;/code&gt; for an Ollama or LM Studio profile and drop the &lt;code&gt;apiKey&lt;/code&gt; field. The &lt;code&gt;supportsJsonSchema&lt;/code&gt; flag tells akm to use structured JSON output for providers that support it — set it to &lt;code&gt;true&lt;/code&gt; for OpenAI-compatible endpoints that honor &lt;code&gt;response_format: {type: "json_schema"}&lt;/code&gt;, leave it off for local models that do not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Migrating from v1
&lt;/h2&gt;

&lt;p&gt;If you are on 0.7.x, you do not need to hand-edit your config. The migration command handles the key remapping:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Preview the transformation without writing&lt;/span&gt;
akm config migrate &lt;span class="nt"&gt;--dry-run&lt;/span&gt;

&lt;span class="c"&gt;# Apply migration — writes a timestamped backup first&lt;/span&gt;
akm config migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--dry-run&lt;/code&gt; shows which keys move and what the new shape looks like without writing anything. When you run without &lt;code&gt;--dry-run&lt;/code&gt;, akm writes a timestamped backup to &lt;code&gt;~/.cache/akm/config-backups/&lt;/code&gt; before touching the live file. Locate it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-1t&lt;/span&gt; ~/.cache/akm/config-backups/ | &lt;span class="nb"&gt;head&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Auto-migration also runs on the first command after upgrade — a one-time notice prints to stderr with the backup path and a reminder to set &lt;code&gt;AKM_NO_AUTO_MIGRATE=1&lt;/code&gt; to suppress future auto-migration. That env flag is useful for read-only CI mounts where you want to run &lt;code&gt;akm config migrate&lt;/code&gt; explicitly in a deploy step.&lt;/p&gt;

&lt;p&gt;After migration, verify the result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm config get configVersion
&lt;span class="c"&gt;# "0.8.0"&lt;/span&gt;

akm config
&lt;span class="c"&gt;# Full config in the new shape&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The complete old-to-new key mapping is in &lt;a href="https://github.com/itlackey/akm/blob/main/docs/migration/v0.7-to-v0.8.md" rel="noopener noreferrer"&gt;docs/migration/v0.7-to-v0.8.md&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Adding a Field Looks Like Now
&lt;/h2&gt;

&lt;p&gt;Before the rewrite, adding a new per-process option involved touching the parser function, the type declaration, the hint string, and the test. In the Zod schema, the same change is one line in the relevant sub-schema object. TypeScript picks up the new field automatically through inference. The JSON schema regenerates on the next build. The CI drift test catches it if the regeneration step is skipped.&lt;/p&gt;

&lt;p&gt;The cost of that improvement is worth making concrete: the schema file is 641 LOC. The migration logic is another 643 LOC. The config loader itself is 590 LOC. That is 1,874 lines total (approximate) — replacing the ~1.4k LOC of parsers while also adding the migration pipeline, the strict validation, and the structured error reporting that were not present before. The maintenance surface per feature is lower, not higher.&lt;/p&gt;




&lt;p&gt;Config v2 is in akm 0.8.0. The full configuration reference is in &lt;a href="https://github.com/itlackey/akm/blob/main/docs/configuration.md" rel="noopener noreferrer"&gt;docs/configuration.md&lt;/a&gt;. The &lt;a href="https://dev.to/itlackey/akm-080-cli-redesign-task-assets-and-belief-aware-memory-335a"&gt;0.8.0 release notes&lt;/a&gt; cover the broader storage and pipeline changes that landed alongside the config rewrite. If you are running the improve pipeline and want to see how the &lt;code&gt;profiles.improve&lt;/code&gt; config behaves in practice, &lt;a href="https://dev.to/itlackey/your-agent-has-a-memory-that-runs-while-you-sleep-20oh"&gt;Your Agent Has a Memory That Runs While You Sleep&lt;/a&gt; covers 24 hours of autonomous operation with the full process config in place.&lt;/p&gt;

&lt;p&gt;If you are upgrading, start with &lt;code&gt;akm config migrate --dry-run&lt;/code&gt; and check that the output matches your expectations before applying.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>cli</category>
      <category>configuration</category>
    </item>
    <item>
      <title>The Proposal Queue Safety Net</title>
      <dc:creator>IT Lackey</dc:creator>
      <pubDate>Thu, 04 Jun 2026 00:31:34 +0000</pubDate>
      <link>https://dev.to/itlackey/the-proposal-queue-safety-net-2dpe</link>
      <guid>https://dev.to/itlackey/the-proposal-queue-safety-net-2dpe</guid>
      <description>&lt;p&gt;This is part fifteen in a series about managing the growing pile of skills, scripts, and context that AI coding agents depend on. &lt;a href="https://dev.to/itlackey/the-improvement-loop-how-akm-keeps-your-agent-sharp-2d4d"&gt;Part ten&lt;/a&gt; introduced the improve pipeline and how it generates proposals. &lt;a href="https://dev.to/itlackey/belief-aware-memory-teaching-your-agent-when-not-to-write-4egi"&gt;Part twelve&lt;/a&gt; covered belief-aware memory, which feeds directly into the confidence scores covered here.&lt;/p&gt;

&lt;p&gt;The fundamental problem with agent-generated stash updates is trust. You want to capture what the agent learned — the debugging insight from last Tuesday's session, the architectural pattern it derived from reviewing twenty PRs — without blindly writing unreviewed content into the knowledge base your other agents depend on. One bad promotion and you've contaminated search results with a hallucinated fact that will keep showing up until someone notices.&lt;/p&gt;

&lt;p&gt;akm's proposal queue is the answer to that problem. Introduced in 0.7.0 and extended in 0.8.0, it separates generation from promotion. Every agent-driven change writes to a durable queue first. Nothing reaches your live stash until you explicitly accept it. The queue is the safety net.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Queue Works
&lt;/h2&gt;

&lt;p&gt;When &lt;code&gt;akm improve&lt;/code&gt; or &lt;code&gt;akm propose&lt;/code&gt; runs, the output goes to the proposal queue — not to your stash. Proposals live outside the asset tree. They never appear in &lt;code&gt;akm search&lt;/code&gt; results and never get indexed alongside your real assets. The &lt;code&gt;quality: "proposed"&lt;/code&gt; marker ensures this at the database level: proposed assets are excluded from default search and only surface through the &lt;code&gt;akm proposal *&lt;/code&gt; commands or an explicit &lt;code&gt;--include-proposed&lt;/code&gt; flag.&lt;/p&gt;

&lt;p&gt;This means an agent can generate dozens of proposals in a single &lt;code&gt;akm improve&lt;/code&gt; run and none of them affect your live stash until you decide they should. Multiple proposals for the same ref coexist without filesystem collisions. You can review them at your own pace, reject the bad ones, and accept the rest in whatever order makes sense.&lt;/p&gt;

&lt;p&gt;The complete review workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm proposal list                        &lt;span class="c"&gt;# see what's pending&lt;/span&gt;
akm proposal show &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;                   &lt;span class="c"&gt;# render the full proposal content&lt;/span&gt;
akm proposal diff &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;                   &lt;span class="c"&gt;# diff vs. the live version of that ref&lt;/span&gt;
akm proposal accept &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;                 &lt;span class="c"&gt;# validate, then promote to stash&lt;/span&gt;
akm proposal reject &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;--reason&lt;/span&gt; &lt;span class="s2"&gt;"…"&lt;/span&gt;   &lt;span class="c"&gt;# archive with a reason&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;akm proposal accept&lt;/code&gt; does not just write the file. It runs full validation and routes the write through the same &lt;code&gt;writeAssetToSource()&lt;/code&gt; path used by &lt;code&gt;akm remember&lt;/code&gt; and &lt;code&gt;akm import&lt;/code&gt;. There is no bypass path. A proposal that fails validation does not get promoted.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 0.8.0 Additions
&lt;/h2&gt;

&lt;p&gt;0.8.0 reorganized the proposal commands under the &lt;code&gt;akm proposal&lt;/code&gt; subcommand (the old flat verbs — &lt;code&gt;akm proposals&lt;/code&gt;, &lt;code&gt;akm accept&lt;/code&gt;, &lt;code&gt;akm reject&lt;/code&gt;, etc. — still work as deprecated aliases until 0.9.0) and added three features that change how you interact with the queue at scale: confidence scores, expiration, and per-proposal revert.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Confidence scores.&lt;/strong&gt; Each proposal now carries an optional &lt;code&gt;confidence&lt;/code&gt; field (a value from 0 to 1) set by the pipeline that generated it. &lt;code&gt;akm proposal show &amp;lt;id&amp;gt;&lt;/code&gt; includes this field in its JSON output. A high-confidence proposal is one the pipeline assessed as a strong, well-supported improvement. A low-confidence one is speculative or weakly supported. The score is not a gate — you still decide — but it gives you signal for triage. When you have thirty proposals and limited review time, work high-confidence proposals first. (The belief model that drives these scores is covered in &lt;a href="https://dev.to/itlackey/belief-aware-memory-teaching-your-agent-when-not-to-write-4egi"&gt;Belief-Aware Memory&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Expiration.&lt;/strong&gt; Proposals expire after a configurable number of days. Set &lt;code&gt;improve.archiveRetentionDays&lt;/code&gt; in your akm config to control the window (default: 30 days). Stale proposals that you never got around to reviewing are automatically archived rather than accumulating indefinitely. Anything that mattered enough to act on should have been reviewed before it aged out; the archive preserves the full audit trail if you need to look back.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Per-proposal revert.&lt;/strong&gt; After you accept a proposal, &lt;code&gt;akm proposal revert &amp;lt;id&amp;gt;&lt;/code&gt; restores the backup of the previous version. This is not a bulk operation and it is not reversible in batch. You revert one proposal at a time, by ID:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm proposal revert &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;    &lt;span class="c"&gt;# restore the backup for a specific accepted proposal&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The no-batch-revert constraint is intentional. Bulk accept without bulk revert is the guardrail that forces deliberate review. If you accept fifty proposals in a single command and three of them are bad, you revert those three individually. The discipline is the point — if you were going to bulk-revert, it means you bulk-accepted without reviewing, and the queue exists precisely to prevent that pattern.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bulk Accept Guardrails
&lt;/h2&gt;

&lt;p&gt;For cases where you want to process more than one proposal at a time without bypassing judgment entirely, 0.8.0 extended &lt;code&gt;akm proposal accept&lt;/code&gt; with generator-scoped batch flags.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;akm proposal accept&lt;/code&gt;&lt;/strong&gt; supports generator-scoped bulk operations. When you want to accept all pending proposals from a specific generator, pass &lt;code&gt;--generator&lt;/code&gt; without a positional id. Bulk accept requires &lt;code&gt;-y&lt;/code&gt;/&lt;code&gt;--yes&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm proposal accept &lt;span class="nt"&gt;--generator&lt;/span&gt; reflect &lt;span class="nt"&gt;--yes&lt;/span&gt;        &lt;span class="c"&gt;# accept all reflect proposals&lt;/span&gt;
akm proposal accept &lt;span class="nt"&gt;--generator&lt;/span&gt; distill &lt;span class="nt"&gt;--yes&lt;/span&gt;        &lt;span class="c"&gt;# accept all distill proposals&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;--yes&lt;/code&gt; flag removes the interactive confirmation prompt required in non-interactive shells. Use it only after you have already reviewed the queue via &lt;code&gt;akm proposal list&lt;/code&gt; and &lt;code&gt;akm proposal diff&lt;/code&gt;. Bulk accept without prior review is exactly the pattern the queue exists to prevent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Auto-Accept for Trusted Sources
&lt;/h2&gt;

&lt;p&gt;If you have a source you fully trust — a well-constrained task asset running against a curated input set, or a distill job that only ever touches a specific category — you can set a high &lt;code&gt;autoAccept&lt;/code&gt; threshold in that improve profile. Proposals whose confidence meets or exceeds the threshold are promoted directly to the stash without manual review.&lt;/p&gt;

&lt;p&gt;This is off by default and should stay off for most sources. The value of the queue is exactly that it sits between agent output and your live stash. Auto-accept makes sense only when the source is trusted, the scope is narrow, and you are comfortable with the output quality from experience rather than assumption.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Daily Review Habit
&lt;/h2&gt;

&lt;p&gt;The proposal queue only helps if you actually review it. Left unattended, it either accumulates into a backlog that's too large to meaningfully triage, or proposals expire before you get to them. A brief daily review pass keeps it manageable.&lt;/p&gt;

&lt;p&gt;The workflow that works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Start with the full pending list&lt;/span&gt;
akm proposal list

&lt;span class="c"&gt;# For each proposal worth reading, diff it against the live ref&lt;/span&gt;
akm proposal diff &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;# Accept the ones that look right&lt;/span&gt;
akm proposal accept &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;# Reject the ones that don't, with a reason you'll understand later&lt;/span&gt;
akm proposal reject &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;--reason&lt;/span&gt; &lt;span class="s2"&gt;"hallucinated — no source for this claim"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The diff is the most useful step. &lt;code&gt;akm proposal diff &amp;lt;id&amp;gt;&lt;/code&gt; shows you the delta between the proposal and whatever currently exists for that ref in your live stash. A proposal that adds accurate new context to a ref you already maintain is easy to accept. A proposal that rewrites a ref you know well with confident-sounding but unverifiable claims is easy to reject. The diff makes the difference visible.&lt;/p&gt;

&lt;p&gt;If the queue is empty, the daily review takes thirty seconds. If &lt;code&gt;akm improve&lt;/code&gt; ran overnight and produced twenty proposals, budget ten minutes. The point is not to process every proposal — it is to stay close enough to the queue that nothing accumulates into a block of work large enough to skip.&lt;/p&gt;

&lt;p&gt;For teams running &lt;code&gt;akm improve&lt;/code&gt; on a schedule, the confidence scores make triage faster. High-confidence proposals need a quick diff and a decision. Low-confidence proposals need closer reading or an outright reject. Over time, the pattern of what the pipeline marks as high-confidence and what actually turns out to be good teaches you where to focus attention.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Shape of Safe Agent Memory
&lt;/h2&gt;

&lt;p&gt;The proposal queue is not a bureaucratic checkpoint. It is the mechanism that makes it safe to run &lt;code&gt;akm improve&lt;/code&gt; continuously, trust agent-driven reflection passes, and still maintain a knowledge base where you know what is in it and why.&lt;/p&gt;

&lt;p&gt;Without the queue, you are choosing between running the improve pipeline (accepting everything it produces) or not running it (getting nothing it produces). The queue is the third option: run it continuously, review the output deliberately, promote what earned it. The 0.8.0 guardrails — confidence scores, expiration, per-proposal revert, and generator-scoped bulk accept — are the tools that make that third option practical at the scale continuous operation produces.&lt;/p&gt;




&lt;p&gt;The proposal queue is available as of akm 0.7.0. The 0.8.0 additions — confidence scores, expiration, &lt;code&gt;akm proposal revert&lt;/code&gt;, and generator-scoped bulk accept — require 0.8.0 or later. Full reference at &lt;a href="https://github.com/itlackey/akm/blob/main/docs/cli.md#proposal" rel="noopener noreferrer"&gt;docs/cli.md&lt;/a&gt; and the &lt;a href="https://github.com/itlackey/akm/blob/main/docs/configuration.md" rel="noopener noreferrer"&gt;configuration reference&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>memory</category>
      <category>cli</category>
    </item>
    <item>
      <title>Your Agent Has a Memory That Runs While You Sleep</title>
      <dc:creator>IT Lackey</dc:creator>
      <pubDate>Thu, 04 Jun 2026 00:31:26 +0000</pubDate>
      <link>https://dev.to/itlackey/your-agent-has-a-memory-that-runs-while-you-sleep-1j76</link>
      <guid>https://dev.to/itlackey/your-agent-has-a-memory-that-runs-while-you-sleep-1j76</guid>
      <description>&lt;p&gt;This post is part of the akm-knowledge series. &lt;a href="https://dev.to/itlackey/the-improvement-loop-how-akm-keeps-your-agent-sharp-2d4d"&gt;Part ten&lt;/a&gt; introduced the improve pipeline — what each phase does and how to schedule it. This post goes deeper on what continuous operation looks like in practice: the hardware numbers, the reliability bugs we hit at 48 runs per day, and the observability layer we built to keep watch.&lt;/p&gt;

&lt;p&gt;Most people think of AI agent memory as something that happens during a session. You talk to your agent, it learns things, maybe you save a few notes, the session ends. The next session starts cold.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;akm improve&lt;/code&gt; is built around a different model: a continuous background process that runs on your own hardware, against local models, and quietly curates your agent's knowledge base while you work on other things. No cloud API required. No per-token billing for the maintenance pass. A GPU you already own, a model you already have downloaded, running on a schedule.&lt;/p&gt;

&lt;p&gt;This post covers what 24 hours of autonomous operation actually looks like, how consumer-grade GPUs handle the load, the reliability work that makes continuous operation viable, and the observability layer that lets you know it's working without watching logs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What akm improve Does in 24 Hours
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;akm improve&lt;/code&gt; is a multi-phase pipeline. The core pass — consolidation — loads your memory pool, groups related memories into chunks, sends each chunk to a local LLM for a consolidation plan (merge similar memories, promote high-signal ones to your stash, delete redundant ones, surface contradictions), and then executes those plans. After consolidation, memory inference runs a lightweight factual extraction pass, and graph extraction updates the entity-relation index.&lt;/p&gt;

&lt;p&gt;The pipeline is scheduled to run automatically. Here is what one 24-hour window produced:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Runs completed&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;48 / 48&lt;/strong&gt; — zero failures&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memories processed&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;14,189&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Promoted to stash&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1,361&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Merged (deduplication)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;49&lt;/strong&gt; (64 secondaries absorbed)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Contradictions surfaced&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;211&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deleted (redundant)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;31&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory inference yield&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;69.3%&lt;/strong&gt; — 115 new atomic facts written&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Graph entities extracted&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;181&lt;/strong&gt; across 9 files&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task fail rate&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Index entries&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;7,398&lt;/strong&gt; — all embedded, status &lt;code&gt;ready-vec&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every run that completes leaves your stash in better shape than before it started. Memories that accumulated across dozens of agent sessions get compressed, merged, and organized without manual intervention. The 1,361 promotions in this window represent memories that were considered significant enough by the local LLM to persist as named stash entries. The 49 merges collapsed near-duplicate content. The 211 contradictions were flagged for review rather than silently overwritten.&lt;/p&gt;

&lt;p&gt;This is the loop. It runs every 30 minutes. You don't have to think about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running It on Consumer Hardware
&lt;/h2&gt;

&lt;p&gt;The consolidation LLM in this setup is &lt;code&gt;qwen3.5-9b&lt;/code&gt; (or similar) running locally via LM Studio on an OpenAI-compatible endpoint. The model fits comfortably on most modern gaming GPUs. No API key. No per-call cost. The inference happens on hardware sitting on your desk.&lt;/p&gt;

&lt;p&gt;We run two LM Studio servers — both serving the same model via OpenAI-compatible endpoints — and benchmarked them head to head.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shredder&lt;/strong&gt; is a desktop with an RTX 5090. &lt;strong&gt;Splinter&lt;/strong&gt; runs an RTX 4060 Ti, a card that launched at $299 and is common in mid-range gaming builds. Same model weights. Same chunk sizes. Different VRAM bandwidth and tensor core counts.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;RTX 5090 (Shredder)&lt;/th&gt;
&lt;th&gt;RTX 4060 Ti (Splinter)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Per-chunk latency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~6.8s&lt;/td&gt;
&lt;td&gt;~22.6s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;13-chunk consolidation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~87s (~1.5 min)&lt;/td&gt;
&lt;td&gt;~290s (~4.8 min)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Speed ratio&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1× (baseline)&lt;/td&gt;
&lt;td&gt;3.3× slower&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Runs per hour (fits schedule)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅ yes&lt;/td&gt;
&lt;td&gt;✅ yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Approximate street price&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~$2,000&lt;/td&gt;
&lt;td&gt;~$300&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The 5090 is faster, but the 4060 Ti finishes a full consolidation pass in under 5 minutes — well inside the 30-minute run window. Both cards sustain 48 runs per day without missing a cycle.&lt;/p&gt;

&lt;p&gt;Where the gap shows up is in the tail. Because the 24h window included runs on both backends, the aggregate latency numbers reflect both:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Phase&lt;/th&gt;
&lt;th&gt;Median&lt;/th&gt;
&lt;th&gt;P95&lt;/th&gt;
&lt;th&gt;What drives the P95&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Total (end-to-end)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;7.2 min&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;23.4 min&lt;/td&gt;
&lt;td&gt;Splinter-routed consolidation runs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Consolidation&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.4 min&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;5.8 min&lt;/td&gt;
&lt;td&gt;Chunk count variance + Splinter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory inference&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;5.9s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;25.3s&lt;/td&gt;
&lt;td&gt;Fresh (non-cached) inference attempts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Graph extraction&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&amp;lt; 1s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;53s&lt;/td&gt;
&lt;td&gt;Cache misses on modified files&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The median of 7.2 minutes reflects the majority of runs going to Shredder. The P95 of 23.4 minutes is almost entirely Splinter runs with larger chunk windows. A setup running exclusively on a 4060 Ti would see a flatter distribution — median around 10–12 minutes, P95 around 18–20 minutes — with no 5090 runs pulling the median down.&lt;/p&gt;

&lt;p&gt;For most setups, a single mid-range GPU is the right starting point. The consolidation pass is CPU-light and network-light — the bottleneck is token generation throughput on the GPU. If you have a second machine with a GPU and spare VRAM, you can point a second LM Studio server at it and split load exactly as we did here.&lt;/p&gt;

&lt;p&gt;The embeddings server is separate — &lt;code&gt;nomic-embed-text-v1.5&lt;/code&gt; running on localhost — and handles the semantic search index. It stays warm between runs, so re-embedding after promotions adds negligible latency. Any GPU with 4GB+ of VRAM can host it alongside the consolidation model if you have the headroom, or it runs on CPU at acceptable speed for indexing workloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "Local Models" Actually Means for Quality
&lt;/h2&gt;

&lt;p&gt;The concern with local models is usually quality: will a 9B parameter model running on a gaming GPU produce consolidation plans good enough to trust with your knowledge base?&lt;/p&gt;

&lt;p&gt;The answer, based on 48 runs and 14,189 memories, is yes — with the right constraints.&lt;/p&gt;

&lt;p&gt;The consolidation prompt is designed to be conservative. The LLM is asked to identify candidates for merge, promote, or delete within a bounded chunk of related memories. It is not given unbounded latitude. Plans are validated against the loaded memory pool before execution — if the model invents a ref that doesn't exist, the op is dropped with a warning. If a promoted memory fails schema validation, it is rejected.&lt;/p&gt;

&lt;p&gt;The 69.3% yield rate on memory inference tells the same story. Out of 166 fresh attempts at factual extraction, 115 produced usable atomic facts. The model is making useful inferences at a rate that justifies running it continuously.&lt;/p&gt;

&lt;p&gt;The practical limit of local 9B models shows up in graph extraction: 2 truncations in the 24h window indicate chunks that exceeded the model's context window. These produce partial rather than failed extractions — the model handles what it can see. Larger models extend this ceiling; a 5090 can hold larger quantizations in VRAM.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making Continuous Operation Reliable
&lt;/h2&gt;

&lt;p&gt;Running 48 times a day means reliability issues that would be minor in a manual workflow become systemic. Two bugs were affecting the consolidation pass and wasting inference on every affected run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The stale database problem.&lt;/strong&gt; After a run that deleted files, the database retained entries pointing to files that no longer existed on disk. The next run loaded those ghost entries, the LLM generated merge plans against them, and Phase B failed silently when the file wasn't found. Every affected secondary in those plans was charged a wasted inference call.&lt;/p&gt;

&lt;p&gt;The fix is a pre-flight filter that runs before the LLM sees anything:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;memories&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;memories&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;existsSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filePath&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stale entries never reach the model. A warning is logged so the count is visible in health output if the filter ever catches something:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pre-flight: filtered 3 stale DB entries (file absent on disk) from memory pool before chunking.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The hallucination problem.&lt;/strong&gt; On certain chunk compositions — particularly when session checkpoint memories and named sessions appear in the same window — the local model would blend naming conventions and produce a merge plan with a primary ref that didn't exist in the pool.&lt;/p&gt;

&lt;p&gt;A typical example: &lt;code&gt;memory:opencode-session-20260529-a1b2&lt;/code&gt; and &lt;code&gt;memory:checkpoint-20260529T214550&lt;/code&gt; in the same chunk produce a hallucinated primary of &lt;code&gt;memory:opencode-session-20260529T214550-ses_18a4&lt;/code&gt;. The plan looks reasonable at the chunk level. The ref doesn't exist at the pool level.&lt;/p&gt;

&lt;p&gt;Before the fix, that hallucinated primary would reach Phase B and charge every real secondary (typically 4–8 refs) with a failed merge skip. After the fix, &lt;code&gt;mergePlans()&lt;/code&gt; validates every primary ref against the loaded pool before execution:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;knownRefs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;memories&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;`memory:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;ops&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;allOps&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;warnings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;mergeWarnings&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;mergePlans&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunkOpsArrays&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;knownRefs&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real merge plans proceed. Hallucinated roots are dropped. The warning is distinguishable from the stale-DB warning, so health metrics can tell the two apart:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mergePlans: primary memory:... not in loaded memory pool (LLM hallucination) — dropping op before execution.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both fixes eliminate wasted inference. On the 4060 Ti at 22.6s per chunk, a single hallucinated primary that would have charged 6 secondaries saves over 2 minutes of inference time per occurrence — time that can go toward real consolidation work instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Knowing It's Working
&lt;/h2&gt;

&lt;p&gt;Running autonomously in the background only helps if you know when something goes wrong. &lt;code&gt;akm health&lt;/code&gt; provides a structured view of recent improve activity:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm health &lt;span class="nt"&gt;--since&lt;/span&gt; 4h
akm health &lt;span class="nt"&gt;--since&lt;/span&gt; 24h &lt;span class="nt"&gt;--format&lt;/span&gt; text
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It surfaces run counts, skip reason breakdowns, consolidation outcomes, memory inference yield, and phase latencies in a single command. The same JSON output feeds automation.&lt;/p&gt;

&lt;p&gt;For continuous monitoring, we built a cron task that posts a rolling 4-hour health report to Discord every hour:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# ~/akm/tasks/akm-health-report.yml&lt;/span&gt;
&lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0 * * * *&lt;/span&gt;
&lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;akm env run fwdslsh -- bash ~/akm/scripts/akm-health-discord.sh&lt;/span&gt;
&lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script calls &lt;code&gt;akm health --since 4h&lt;/code&gt; and &lt;code&gt;--since 8h&lt;/code&gt;, computes deltas for trend context, and posts a Discord embed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm tasks &lt;span class="nb"&gt;sync&lt;/span&gt;   &lt;span class="c"&gt;# register the cron&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The embed has three inline fields — Output (promoted, merged, MI yield), Failures (chunk failures, skip reason anomalies), and Latency (median, P95, previous-window comparison) — plus a Needs Attention section that only appears when something is actually off. The footer includes the hostname and timestamp so reports from multiple machines are distinguishable at a glance.&lt;/p&gt;

&lt;p&gt;The result: a health check fires every 30 minutes from the pipeline, and a visibility report fires every hour to Discord. You see degradation before it accumulates.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Full Picture
&lt;/h2&gt;

&lt;p&gt;Here is what autonomous local-model memory curation looks like across a full day:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;48 runs&lt;/strong&gt; completed without intervention&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;14,189 memories&lt;/strong&gt; reviewed, organized, and curated&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1,361&lt;/strong&gt; promoted to the permanent stash&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1.4 minute median&lt;/strong&gt; per consolidation pass on the faster GPU; under 5 minutes on the 4060 Ti&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero API calls&lt;/strong&gt; — all inference runs locally on hardware you own&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hourly Discord reports&lt;/strong&gt; — no manual health checks needed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The hardware requirement to run this continuously is a mid-range gaming GPU. The model requirement is a 7–9B parameter instruction-tuned model quantized to 4–8 bits. Both are things a lot of developers already have.&lt;/p&gt;

&lt;p&gt;The value is in what compounds. Each run makes the stash slightly more accurate, slightly more consolidated, slightly more consistent. After 48 runs, 14,000 memories have been through a curation pass that would have taken hours to do manually. After a week, the stash is a different kind of asset — not a pile of notes, but a continuously maintained knowledge base that your agent can rely on across sessions.&lt;/p&gt;




&lt;p&gt;&lt;code&gt;akm improve&lt;/code&gt; is part of akm 0.8.x. The full pipeline configuration and local model setup docs are in the &lt;a href="https://github.com/itlackey/akm/blob/main/docs/configuration.md" rel="noopener noreferrer"&gt;configuration reference&lt;/a&gt;. Hardware requirements and LM Studio setup are covered in the &lt;a href="https://github.com/itlackey/akm/blob/main/docs/getting-started.md" rel="noopener noreferrer"&gt;getting started guide&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>cli</category>
      <category>localai</category>
    </item>
    <item>
      <title>From 30 Minutes to 8: How LLM-Mode Reflect Works</title>
      <dc:creator>IT Lackey</dc:creator>
      <pubDate>Thu, 04 Jun 2026 00:31:15 +0000</pubDate>
      <link>https://dev.to/itlackey/from-30-minutes-to-8-how-llm-mode-reflect-works-3eef</link>
      <guid>https://dev.to/itlackey/from-30-minutes-to-8-how-llm-mode-reflect-works-3eef</guid>
      <description>&lt;p&gt;This is part thirteen in a series about managing the growing pile of skills, scripts, and context that AI coding agents depend on. &lt;a href="https://dev.to/itlackey/the-improvement-loop-how-akm-keeps-your-agent-sharp-2d4d"&gt;Part ten&lt;/a&gt; covered the full improve pipeline — all five phases and how they connect. &lt;a href="https://dev.to/itlackey/your-agent-has-a-memory-that-runs-while-you-sleep-20oh"&gt;Part fourteen&lt;/a&gt; covers what 48 runs per day looks like in practice, including hardware benchmarks and the reliability bugs that surface at that frequency.&lt;/p&gt;

&lt;p&gt;The reflect pass inside &lt;code&gt;akm improve&lt;/code&gt; has three execution modes. Most installs are still running the slowest one.&lt;/p&gt;

&lt;p&gt;Agent mode — the original — spawns an opencode or claude subprocess for each reflect call. The subprocess starts cold, acquires a session, assembles context, makes its LLM call, and exits. That cold-start overhead is real: each call takes approximately 30 seconds on a quiet machine. Run &lt;code&gt;akm improve&lt;/code&gt; against a 69-ref stash and the reflect phase alone costs about 35 minutes.&lt;/p&gt;

&lt;p&gt;SDK mode eliminated the subprocess. The reflect call runs in-process, cutting per-call latency to 10–15 seconds. A 69-ref run drops to 12–17 minutes — better, but still bounded by round-trip overhead that the reflect task does not actually need.&lt;/p&gt;

&lt;p&gt;LLM mode removes the round trip entirely. The context for reflect is statically pre-assembled — no live tool calls, no file reads, no external context needed. A direct HTTP call to the LLM endpoint is sufficient, and it costs 6–10 seconds per call. A 69-ref run completes in 8–10 minutes.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Per-call latency&lt;/th&gt;
&lt;th&gt;69-ref run&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;agent (CLI subprocess)&lt;/td&gt;
&lt;td&gt;~30s&lt;/td&gt;
&lt;td&gt;~35 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sdk (in-process)&lt;/td&gt;
&lt;td&gt;~10–15s&lt;/td&gt;
&lt;td&gt;~12–17 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;llm (direct HTTP)&lt;/td&gt;
&lt;td&gt;~6–10s&lt;/td&gt;
&lt;td&gt;~8–10 min&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The 3–4× end-to-end improvement is from eliminating overhead that was never necessary for what reflect does.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Reflect Does Not Need an Agent
&lt;/h2&gt;

&lt;p&gt;The reflect pass takes a stash asset, examines its current content, and proposes a refined version. The inputs are fixed before the pass starts: the asset text, its metadata, and the improvement prompt. Nothing changes mid-call. No files need to be opened. No search queries need to fire. No external context needs to be pulled in.&lt;/p&gt;

&lt;p&gt;Agent mode was useful when akm's improve pipeline was first built — the agent subprocess was already the primary execution model, and reflect rode along. But the properties that make agents valuable (tool use, live context access, multi-step reasoning over changing state) are not exercised by reflect. Spawning a full agent process for a stateless inference call trades 20+ seconds of overhead for no quality benefit.&lt;/p&gt;

&lt;p&gt;LLM mode makes the execution match the task: assemble the context once, make one HTTP call, get the result.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multi-Turn Self-Refine
&lt;/h2&gt;

&lt;p&gt;LLM mode adds a capability that agent mode does not have: multi-turn self-refine.&lt;/p&gt;

&lt;p&gt;When reflect runs in LLM mode, it sends the initial draft back as an assistant turn. The model sees its own prior output and the refine prompt together in the same context window. This is a standard multi-turn pattern for iterative generation — the model can catch inconsistencies, tighten reasoning, and improve the draft without requiring a second top-level call.&lt;/p&gt;

&lt;p&gt;Agent mode, by contrast, passes context forward through prompt text. Each subprocess run starts fresh. There is no conversation history to reason against.&lt;/p&gt;

&lt;p&gt;The practical difference shows on longer or more complex assets, where a single forward pass produces a draft with inconsistencies the model catches immediately when it sees its own output. Multi-turn self-refine handles this inside the single reflect call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Structured Output
&lt;/h2&gt;

&lt;p&gt;For providers that advertise &lt;code&gt;supportsJsonSchema: true&lt;/code&gt; in their profile config, LLM mode requests structured JSON output. The response is validated against the reflect output schema before being accepted as a proposal.&lt;/p&gt;

&lt;p&gt;This eliminates a class of parse failures that occurs when a model returns well-formed prose but with section markers or formatting that does not align with the expected output shape. The model knows the schema before it generates the response, so the output conforms rather than being post-hoc parsed.&lt;/p&gt;

&lt;p&gt;Agent mode produces unstructured text that the pipeline parses with heuristics. LLM mode with &lt;code&gt;supportsJsonSchema: true&lt;/code&gt; eliminates the heuristics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Config to Enable LLM Mode
&lt;/h2&gt;

&lt;p&gt;LLM mode requires Config v2 (&lt;code&gt;configVersion: "0.8.0"&lt;/code&gt;). If you have not migrated yet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Preview the transformation&lt;/span&gt;
akm config migrate &lt;span class="nt"&gt;--dry-run&lt;/span&gt;

&lt;span class="c"&gt;# Apply (writes a timestamped backup first)&lt;/span&gt;
akm config migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With v2 in place, add a named LLM profile and point the reflect process at it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"configVersion"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.8.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"profiles"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"openai-mini"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"endpoint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://api.openai.com/v1/chat/completions"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"gpt-4o-mini"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"apiKey"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${OPENAI_API_KEY}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"supportsJsonSchema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"improve"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"default"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"processes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"reflect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"profile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"openai-mini"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"defaults"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"openai-mini"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is the complete change. On the next &lt;code&gt;akm improve&lt;/code&gt; run, reflect dispatches HTTP calls to the &lt;code&gt;openai-mini&lt;/code&gt; profile instead of spawning subprocesses. The proposal queue, review workflow, and everything downstream are unchanged.&lt;/p&gt;

&lt;h2&gt;
  
  
  Local Models and LM Studio
&lt;/h2&gt;

&lt;p&gt;The profile config is an endpoint and a model name. Nothing in the LLM mode path is OpenAI-specific — it issues standard chat completions requests. Any OpenAI-compatible server works, including LM Studio running locally.&lt;/p&gt;

&lt;p&gt;To point reflect at a local LM Studio instance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"configVersion"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.8.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"profiles"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"local-reflect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"endpoint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://192.168.1.100:1234/v1/chat/completions"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your-local-model-name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"supportsJsonSchema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"improve"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"default"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"processes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"reflect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"profile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"local-reflect"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set &lt;code&gt;supportsJsonSchema: false&lt;/code&gt; unless you have confirmed that the local model and LM Studio version support structured output. Most local models handle the reflect task correctly through standard chat completions without schema enforcement — the output is smaller and more predictable than consolidation plans, so parse failures are rare.&lt;/p&gt;

&lt;p&gt;For a machine running a 9B model on an RTX 4060 Ti, LLM mode reflect benchmarks in the 8–12 second range per call — comparable to the cloud figures in the table above, with no API costs and no data leaving your network.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Stay on Agent Mode
&lt;/h2&gt;

&lt;p&gt;LLM mode is appropriate for reflect because reflect has static inputs. Other improve processes do not share that property.&lt;/p&gt;

&lt;p&gt;Stay on agent mode when the process needs live tool calls. If you have a custom improve workflow that reads files, calls &lt;code&gt;akm search&lt;/code&gt;, or pulls external context mid-run, that process requires an agent that can execute tools. LLM mode does not have tool dispatch — it is a direct HTTP call to a completions endpoint, nothing more.&lt;/p&gt;

&lt;p&gt;Stay on agent mode when the reflect task for a specific asset type requires context that is assembled dynamically — search results, graph lookups, or file reads that depend on the asset's content. Those lookups require a running agent.&lt;/p&gt;

&lt;p&gt;The standard reflect pass — refining an existing asset based on its content and metadata — does not require either of these. LLM mode is the right default for it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Changes in Practice
&lt;/h2&gt;

&lt;p&gt;A 69-ref &lt;code&gt;akm improve&lt;/code&gt; run that used to block for 35 minutes now completes in under 10. The reflect proposals are the same quality — in some cases better, because multi-turn self-refine catches first-draft inconsistencies. Structured output for cloud providers eliminates parse failures that previously required manual retries.&lt;/p&gt;

&lt;p&gt;The change is a config update:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Migrate config if still on v1&lt;/span&gt;
akm config migrate

&lt;span class="c"&gt;# Then add the llm profile + reflect process entry (see snippet above)&lt;/span&gt;
&lt;span class="c"&gt;# Preview what the next run would process without writing anything&lt;/span&gt;
akm improve &lt;span class="nt"&gt;--dry-run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next improve run after that shows reflect calls completing in the 6–10 second range instead of 30.&lt;/p&gt;




&lt;p&gt;LLM mode reflect is available in akm 0.8.0. The full configuration reference is in &lt;a href="https://github.com/itlackey/akm/blob/main/docs/configuration.md" rel="noopener noreferrer"&gt;docs/configuration.md&lt;/a&gt;. The Config v2 key mapping is in the &lt;a href="https://github.com/itlackey/akm/blob/main/docs/migration/v0.7-to-v0.8.md#config-v2-migration-reflect-multi-mode" rel="noopener noreferrer"&gt;v0.7 to v0.8 migration guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For a broader view of the improve pipeline — all five phases, scheduling, and how reflect feeds the downstream consolidation and distill passes — see &lt;a href="https://dev.to/itlackey/the-improvement-loop-how-akm-keeps-your-agent-sharp-2d4d"&gt;The Improvement Loop: How akm Keeps Your Agent Sharp&lt;/a&gt;. For debugging improve runs when something goes wrong (stale DB entries, hallucinated merge plans, pre-flight filters), see &lt;a href="https://dev.to/itlackey/your-agent-has-a-memory-that-runs-while-you-sleep-20oh"&gt;Your Agent Has a Memory That Runs While You Sleep&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>performance</category>
      <category>localai</category>
    </item>
    <item>
      <title>Belief-Aware Memory: Teaching Your Agent When Not to Write</title>
      <dc:creator>IT Lackey</dc:creator>
      <pubDate>Thu, 04 Jun 2026 00:31:07 +0000</pubDate>
      <link>https://dev.to/itlackey/belief-aware-memory-teaching-your-agent-when-not-to-write-5fbp</link>
      <guid>https://dev.to/itlackey/belief-aware-memory-teaching-your-agent-when-not-to-write-5fbp</guid>
      <description>&lt;p&gt;A self-improving memory loop sounds like a clear win until you watch it rewrite something correct with something outdated. The agent remembered a fact. You verified it. A later consolidation pass ran against a stale context window, decided the memory was imprecise, and replaced it with a weaker version. The original was better. You lost ground.&lt;/p&gt;

&lt;p&gt;This is the failure mode that belief-aware memory was built to prevent. Not "agents write wrong things" — that's a model quality problem. The specific failure is: the improve loop, running unsupervised, overwrites correct content it should have left alone. A loop that can degrade its own best work is worse than no loop at all.&lt;/p&gt;

&lt;p&gt;akm 0.8.0 ships &lt;code&gt;captureMode&lt;/code&gt; and &lt;code&gt;beliefState&lt;/code&gt; as first-class frontmatter fields on memory assets. Together they tell the consolidation pass what each memory is, what the agent believes about it, and whether it is eligible to be rewritten.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Two Capture Modes
&lt;/h2&gt;

&lt;p&gt;Every memory asset now carries a &lt;code&gt;captureMode&lt;/code&gt; field. It has two values.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;hot&lt;/code&gt; means the memory was written or explicitly confirmed by a human. The improve loop treats hot memories as read-only. No consolidation plan, no merge proposal, no rewrite. If every memory in a chunk is &lt;code&gt;captureMode: hot&lt;/code&gt;, the consolidation pass skips the LLM call for that chunk entirely — the chunk is counted as &lt;code&gt;judgedNoAction&lt;/code&gt; before a single token is spent. This is the all-hot chunk early-exit.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;background&lt;/code&gt; means the memory was generated by an agent — promoted during a prior consolidation run, written by an inference pass, produced by &lt;code&gt;akm remember&lt;/code&gt; without explicit human review. Background memories are eligible for improvement. The consolidation pass can propose merges, rewrites, deletions, or upgrades.&lt;/p&gt;

&lt;p&gt;When no &lt;code&gt;captureMode&lt;/code&gt; is set, the memory is treated as eligible for consolidation. Memories that existed before 0.8.0 are treated this way on first encounter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;captureMode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;hot&lt;/span&gt;
&lt;span class="na"&gt;beliefState&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;asserted&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Primary LM Studio endpoint moved to Shredder (192.168.0.99:1234)&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;captureMode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;background&lt;/span&gt;
&lt;span class="na"&gt;beliefState&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;active&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Approximate token throughput for qwen3.5-9b on RTX 4060 Ti&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The distinction matters most for memories that are both accurate and stable: architectural decisions, confirmed configuration facts, verified benchmarks. You write them once, mark them hot, and the improve loop stops touching them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Belief States
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;beliefState&lt;/code&gt; describes the agent's current belief about the memory's accuracy. The field has five non-archived values.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;active&lt;/code&gt; is the default when no &lt;code&gt;beliefState&lt;/code&gt; is set. The memory is currently believed to be true. The consolidation pass treats it normally according to its &lt;code&gt;captureMode&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;asserted&lt;/code&gt; is the human-authority variant of &lt;code&gt;active&lt;/code&gt;. The improve loop sets this when you use &lt;code&gt;akm remember&lt;/code&gt; explicitly. Like &lt;code&gt;active&lt;/code&gt;, the consolidation pass treats it as eligible based on &lt;code&gt;captureMode&lt;/code&gt; — but &lt;code&gt;asserted&lt;/code&gt; is never automatically downgraded to &lt;code&gt;active&lt;/code&gt; during consolidation. It carries a stronger signal that a human touched this memory directly.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;deprecated&lt;/code&gt; means the memory has been superseded. The content is no longer the current best representation, but it is not wrong — it describes something that was true and has since evolved. Deprecated memories are frozen historical state — the consolidation pass will not refresh them to &lt;code&gt;active&lt;/code&gt;, but they are candidates for merge into a more current memory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;superseded&lt;/code&gt; is the system-assigned equivalent of deprecated. The improve loop writes this when it determines a memory has been replaced by a newer one. Unlike &lt;code&gt;deprecated&lt;/code&gt;, &lt;code&gt;superseded&lt;/code&gt; can be refreshed if the superseding memory is later retracted.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;contradicted&lt;/code&gt; means the memory is known to be wrong. It conflicts with something else in the stash that the agent now believes more strongly. A contradicted memory is never promoted, never merged into a primary, and is queued for deletion on the next consolidation pass that touches it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;captureMode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;background&lt;/span&gt;
&lt;span class="na"&gt;beliefState&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;contradicted&lt;/span&gt;
&lt;span class="na"&gt;contradictedBy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;memory:lm-studio-server-topology&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Old belief that Don was the consolidation LLM endpoint&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;contradictedBy&lt;/code&gt; field is an array of refs — the memories that supersede this one. It chains revisions explicitly. You can read the chain backward: follow each &lt;code&gt;contradictedBy&lt;/code&gt; ref to find the current belief. The &lt;code&gt;beliefState&lt;/code&gt; field is indexed as a frontmatter tag, so &lt;code&gt;akm search "beliefState:contradicted"&lt;/code&gt; or &lt;code&gt;akm search "beliefState:deprecated"&lt;/code&gt; surfaces everything the agent currently believes is wrong or outdated, which is useful for auditing stale content before a long session.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Improve Loop Actually Checks
&lt;/h2&gt;

&lt;p&gt;When &lt;code&gt;akm improve&lt;/code&gt; starts a consolidation chunk, it evaluates &lt;code&gt;captureMode&lt;/code&gt; before making any LLM call. The sequence is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Load the memory pool for the chunk.&lt;/li&gt;
&lt;li&gt;Check &lt;code&gt;captureMode&lt;/code&gt; for every memory in the chunk.&lt;/li&gt;
&lt;li&gt;If all memories are &lt;code&gt;hot&lt;/code&gt;, record the chunk as &lt;code&gt;judgedNoAction&lt;/code&gt; and skip to the next chunk. No model call.&lt;/li&gt;
&lt;li&gt;If any memory is &lt;code&gt;background&lt;/code&gt; (or has no &lt;code&gt;captureMode&lt;/code&gt; set), proceed to the LLM consolidation prompt — but pass the belief state metadata alongside each memory so the model knows what it is working with.&lt;/li&gt;
&lt;li&gt;The model sees &lt;code&gt;beliefState: contradicted&lt;/code&gt; on a memory and knows not to use it as a merge primary. It sees &lt;code&gt;beliefState: deprecated&lt;/code&gt; and treats the memory as a merge candidate rather than a standalone to preserve.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The early-exit on all-hot chunks is a real cost reduction in practice. A stash where the majority of permanently-settled memories are marked hot will skip a significant fraction of chunks without touching the model at all. Those skipped chunks still count in the run's telemetry — the &lt;code&gt;judgedNoAction&lt;/code&gt; counter — so &lt;code&gt;akm health&lt;/code&gt; can show you the proportion of work that was bypassed via belief state rather than processed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enabling Belief-Aware Memory
&lt;/h2&gt;

&lt;p&gt;Belief-aware memory is active by default in 0.8.0. For most setups, nothing changes on upgrade. Existing memories without a &lt;code&gt;captureMode&lt;/code&gt; field are treated as eligible for consolidation, and existing memories without a &lt;code&gt;beliefState&lt;/code&gt; field resolve to &lt;code&gt;active&lt;/code&gt; — both match prior behavior.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;memory.belief_aware&lt;/code&gt; configuration flag (enabled by default; not surfaced in &lt;code&gt;akm config list&lt;/code&gt; — check release notes if you need to toggle it) (documented in the release notes) gates the pre-write validation path. Leaving it on is the right default. The validation overhead is negligible. The protection against overwriting confirmed content is the point.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Workflow in Practice
&lt;/h2&gt;

&lt;p&gt;The intended workflow is straightforward. Run &lt;code&gt;akm improve&lt;/code&gt; or &lt;code&gt;akm remember&lt;/code&gt; normally. When the improve loop promotes a memory that you verify and want to lock, open the asset and set &lt;code&gt;captureMode: hot&lt;/code&gt;. That is the only required human action.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Review a promoted memory&lt;/span&gt;
akm show memory:lm-studio-server-topology

&lt;span class="c"&gt;# Lock it against future rewrites&lt;/span&gt;
&lt;span class="c"&gt;# Edit the frontmatter: captureMode: hot&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When something in the stash becomes wrong — you find a configuration fact that has changed, a benchmark that does not reflect the current hardware — mark it contradicted and point it at the memory that replaced it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;captureMode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;background&lt;/span&gt;
&lt;span class="na"&gt;beliefState&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;contradicted&lt;/span&gt;
&lt;span class="na"&gt;contradictedBy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;memory:shredder-throughput-2026-05&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Initial throughput estimate for Shredder before thermal tuning&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The contradicted memory stays in the stash until the consolidation pass processes it. It does not disappear immediately. That is intentional — the chain of belief updates is itself a record of how your agent's understanding evolved. You can review it, audit it, and delete it explicitly when you are satisfied the current belief is stable.&lt;/p&gt;

&lt;p&gt;For deprecated memories, the same pattern applies, but with a lighter touch. A deprecated memory is not wrong — it is outdated. The consolidation pass will eventually merge it into something more current. You can accelerate this by pointing the &lt;code&gt;contradictedBy&lt;/code&gt; field at the successor, but it is not required.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Protects Against
&lt;/h2&gt;

&lt;p&gt;The improve loop is powerful because it runs continuously and without supervision. That is also the source of the failure mode. An unsupervised loop that can propose changes to anything in the stash will, given enough time and enough edge cases, propose a change to something it should not touch.&lt;/p&gt;

&lt;p&gt;Hot memories are immune. They require no ongoing maintenance. They do not need to be defended against the loop because the loop is not allowed to reach them.&lt;/p&gt;

&lt;p&gt;Background memories with &lt;code&gt;beliefState: active&lt;/code&gt; or &lt;code&gt;asserted&lt;/code&gt; are in normal rotation. The loop can improve them. That is the intended behavior — background memories accumulate in agent sessions and benefit from periodic consolidation.&lt;/p&gt;

&lt;p&gt;The contradicted and deprecated states give the loop a way to reason about quality without conflating "eligible for improvement" with "currently correct." A background, active memory is eligible and believed correct. A background, contradicted memory is eligible and believed wrong — the right action is deletion or absorption, not refinement.&lt;/p&gt;

&lt;p&gt;The combination — two capture modes, five belief states, and an explicit contradiction chain — gives you fine-grained control over what the loop does. The loop becomes an asset rather than a liability when it has enough information to distinguish what it should improve from what it should leave alone.&lt;/p&gt;




&lt;p&gt;Belief-aware memory is part of akm 0.8.0. The full field reference is in &lt;a href="https://github.com/itlackey/akm/blob/main/docs/configuration.md" rel="noopener noreferrer"&gt;docs/configuration.md&lt;/a&gt;. The improve pipeline and consolidation pass behavior are covered in the &lt;a href="https://dev.to/itlackey/your-agent-has-a-memory-that-runs-while-you-sleep-20oh"&gt;improve pipeline debugging post&lt;/a&gt; and the &lt;a href="https://dev.to/itlackey/akm-080-cli-redesign-task-assets-and-belief-aware-memory-335a"&gt;0.8.0 release notes&lt;/a&gt;. For a walkthrough of the improve loop setup and scheduling, see &lt;a href="https://dev.to/itlackey/the-improvement-loop-how-akm-keeps-your-agent-sharp-2d4d"&gt;The Improve Loop: Continuous Memory Curation&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>memory</category>
      <category>cli</category>
    </item>
    <item>
      <title>Task Assets: Agent Workflows That Run While You Sleep</title>
      <dc:creator>IT Lackey</dc:creator>
      <pubDate>Thu, 04 Jun 2026 00:30:58 +0000</pubDate>
      <link>https://dev.to/itlackey/task-assets-agent-workflows-that-run-while-you-sleep-1787</link>
      <guid>https://dev.to/itlackey/task-assets-agent-workflows-that-run-while-you-sleep-1787</guid>
      <description>&lt;p&gt;This is part eleven in a series about managing the growing pile of skills, scripts, and context that AI coding agents depend on. &lt;a href="https://dev.to/itlackey/agents-that-remember-where-they-were-1koe"&gt;Part nine&lt;/a&gt; covered workflow assets and resumable procedures. &lt;a href="https://dev.to/itlackey/the-improvement-loop-how-akm-keeps-your-agent-sharp-2d4d"&gt;Part ten&lt;/a&gt; introduced the improve pipeline that continuously curates your stash. Earlier parts addressed teams, distributed stashes, and community knowledge.&lt;/p&gt;

&lt;p&gt;Most automation with AI agents is reactive. You open a session, give the agent a task, wait for the result, close the session. The agent's clock runs when you run it.&lt;/p&gt;

&lt;p&gt;Task assets flip that model. A task is a YAML file in your stash that defines a workflow — what to run, when to run it, what environment it needs, and how long it's allowed to take. Once registered, the task runs on schedule without your involvement. The OS scheduler calls &lt;code&gt;akm tasks run &amp;lt;id&amp;gt;&lt;/code&gt;, which executes the task and writes the result to &lt;code&gt;state.db&lt;/code&gt;. You find out what happened when you check &lt;code&gt;akm health&lt;/code&gt; or look at the log.&lt;/p&gt;

&lt;p&gt;This is the piece of akm 0.8.0 that makes continuous operation possible. The improve loop runs twice an hour because a task asset says it does. The hourly Discord health report fires because a task asset says it does. Neither requires an open terminal.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Task Asset Format
&lt;/h2&gt;

&lt;p&gt;Task assets live at &lt;code&gt;&amp;lt;stash&amp;gt;/tasks/&amp;lt;id&amp;gt;.yml&lt;/code&gt;. The filename is the task ID. A minimal task looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0 * * * *&lt;/span&gt;
&lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;akm improve --auto-accept &lt;/span&gt;&lt;span class="m"&gt;90&lt;/span&gt;
&lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's enough to install a cron entry and run &lt;code&gt;akm improve&lt;/code&gt; at the top of every hour. The full schema adds metadata and per-task timeout control:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;7,37&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*"&lt;/span&gt;
&lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;akm improve --auto-accept 90 --timeout-ms &lt;/span&gt;&lt;span class="m"&gt;1620000&lt;/span&gt;
&lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;timeoutMs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1800000&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;akm-improve&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Run the improve pass at :07 and :37 — reflect, distill, consolidate, lint, and eval.&lt;/span&gt;
&lt;span class="na"&gt;when_to_use&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Twice per hour; leaves ~23 minutes of idle headroom between completions.&lt;/span&gt;
&lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;improve&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;maintenance&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fields that matter most:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Required&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;schedule&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;Standard cron expression. Maps to crontab on Linux, launchd plist on macOS, schtasks XML on Windows. Wrap expressions containing special characters in quotes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;command&lt;/code&gt; or &lt;code&gt;prompt&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;one of the two&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;command&lt;/code&gt; runs as a plain shell command. &lt;code&gt;prompt&lt;/code&gt; dispatches through the configured agent profile. A third option, &lt;code&gt;workflow&lt;/code&gt;, targets a stash workflow ref directly.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;false&lt;/code&gt; keeps the task definition in your stash without installing a scheduler entry.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;timeoutMs&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;Per-task timeout in milliseconds, overriding whatever the agent profile sets globally. &lt;code&gt;null&lt;/code&gt; removes the kill timer entirely — useful for long-running local-model tasks.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;name&lt;/code&gt;, &lt;code&gt;description&lt;/code&gt;, &lt;code&gt;when_to_use&lt;/code&gt;, &lt;code&gt;tags&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;Metadata. &lt;code&gt;name&lt;/code&gt; appears in &lt;code&gt;akm tasks list&lt;/code&gt;; the others exist for your own records and for search.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  command: vs prompt:
&lt;/h2&gt;

&lt;p&gt;The distinction between &lt;code&gt;command&lt;/code&gt; and &lt;code&gt;prompt&lt;/code&gt; reflects two different execution models.&lt;/p&gt;

&lt;p&gt;A &lt;code&gt;command&lt;/code&gt; task is a shell invocation. &lt;code&gt;akm tasks run&lt;/code&gt; executes the string directly in a child process. There is no agent involved. The command can call &lt;code&gt;akm&lt;/code&gt;, run a shell script, invoke any binary. The exit code is what gets logged.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;akm improve --auto-accept &lt;/span&gt;&lt;span class="m"&gt;90&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;code&gt;prompt&lt;/code&gt; task dispatches to the agent configured in your default agent profile (or the profile specified in &lt;code&gt;--profile&lt;/code&gt;). The value of &lt;code&gt;prompt&lt;/code&gt; becomes the task instruction. The agent runs autonomously, can use &lt;code&gt;akm&lt;/code&gt; commands, write files, and call tools according to its allowed tool set. The result is determined by whether the agent exits cleanly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
  &lt;span class="s"&gt;Run akm wiki ingest research and then run akm wiki lint research.&lt;/span&gt;
  &lt;span class="s"&gt;Fix any orphan pages the lint step reports.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The practical split: use &lt;code&gt;command&lt;/code&gt; for tasks where the execution is fully scripted and the outcome is deterministic. Use &lt;code&gt;prompt&lt;/code&gt; when you want the agent to exercise judgment — synthesizing content, triaging output, making decisions based on what it finds. The curate-to-wiki task is a good example of the latter: it runs a multi-step workflow where the agent reads each step's instructions, substitutes parameters, and advances the workflow run through to completion. Workflow assets themselves are covered in &lt;a href="https://dev.to/itlackey/agents-that-remember-where-they-were-1koe"&gt;part nine&lt;/a&gt; of this series.&lt;/p&gt;

&lt;h2&gt;
  
  
  Registering Tasks
&lt;/h2&gt;

&lt;p&gt;There are two ways to get a task into the scheduler.&lt;/p&gt;

&lt;p&gt;The first way is &lt;code&gt;akm tasks add&lt;/code&gt;, which creates the YAML file and installs it in one step:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm tasks add my-task &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--schedule&lt;/span&gt; &lt;span class="s2"&gt;"0 9 * * *"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--command&lt;/span&gt; &lt;span class="s2"&gt;"akm improve --auto-accept 80"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"Morning improve pass"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--description&lt;/span&gt; &lt;span class="s2"&gt;"Daily improve at 9 AM"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second way is to write the YAML file directly into your stash's &lt;code&gt;tasks/&lt;/code&gt; directory and then call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm tasks &lt;span class="nb"&gt;sync&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;sync&lt;/code&gt; reconciles all &lt;code&gt;.yml&lt;/code&gt; files in &lt;code&gt;tasks/&lt;/code&gt; against the OS scheduler. Any task that's &lt;code&gt;enabled: true&lt;/code&gt; and not yet installed gets a scheduler entry. Any task that's &lt;code&gt;enabled: false&lt;/code&gt; or missing gets its entry removed. This is the right command to run after pulling stash changes that include new or updated task files.&lt;/p&gt;

&lt;p&gt;Other task management commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm tasks list                        &lt;span class="c"&gt;# all defined tasks with status&lt;/span&gt;
akm tasks show &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;                   &lt;span class="c"&gt;# parsed YAML + scheduler state&lt;/span&gt;
akm tasks run &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;                    &lt;span class="c"&gt;# execute immediately&lt;/span&gt;
akm tasks &lt;span class="nb"&gt;enable&lt;/span&gt; &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;                 &lt;span class="c"&gt;# install the scheduler entry&lt;/span&gt;
akm tasks disable &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;                &lt;span class="c"&gt;# remove the scheduler entry, keep the file&lt;/span&gt;
akm tasks remove &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;                 &lt;span class="c"&gt;# delete the file and uninstall&lt;/span&gt;
akm tasks &lt;span class="nb"&gt;history&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;--id&lt;/span&gt; &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;]&lt;/span&gt;         &lt;span class="c"&gt;# recent runs from state.db&lt;/span&gt;
akm tasks doctor                      &lt;span class="c"&gt;# scheduler backend + cron path&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;akm tasks run&lt;/code&gt; is the same command the scheduler calls. You can run a task immediately to test it before committing it to a schedule.&lt;/p&gt;

&lt;h2&gt;
  
  
  Environment Injection with akm env run
&lt;/h2&gt;

&lt;p&gt;Tasks that need secrets or environment-specific configuration use &lt;code&gt;akm env&lt;/code&gt; vaults. A vault is an encrypted &lt;code&gt;.env&lt;/code&gt; file stored in your stash under &lt;code&gt;env/&amp;lt;name&amp;gt;.env&lt;/code&gt;. You inject it into a child process using &lt;code&gt;akm env run&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm &lt;span class="nb"&gt;env &lt;/span&gt;run &lt;span class="nb"&gt;env&lt;/span&gt;:fwdslsh &lt;span class="nt"&gt;--&lt;/span&gt; bash ./scripts/post-to-discord.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;env:&lt;/code&gt; prefix is the canonical ref form. In task YAML, akm also resolves bare vault names — the worked example below uses the bare name to match the production file exactly.&lt;/p&gt;

&lt;p&gt;In a task &lt;code&gt;command&lt;/code&gt; field, the same pattern applies directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;akm env run fwdslsh -- bash /home/founder3/akm/scripts/akm-health-discord.sh&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This injects every variable in the &lt;code&gt;fwdslsh&lt;/code&gt; vault into the shell process that runs the script. The variables live only in that child process — they are never written to disk or exported to the parent environment. The task definition itself contains no secrets, only the vault reference. You can commit task YAML to your stash and share it without exposing credentials.&lt;/p&gt;

&lt;p&gt;If a task needs only a subset of the vault's variables, &lt;code&gt;--only&lt;/code&gt; narrows the injection:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm &lt;span class="nb"&gt;env &lt;/span&gt;run &lt;span class="nb"&gt;env&lt;/span&gt;:fwdslsh &lt;span class="nt"&gt;--only&lt;/span&gt; DISCORD_WEBHOOK_URL &lt;span class="nt"&gt;--&lt;/span&gt; bash ./post.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--only&lt;/code&gt; accepts a single key or a comma-separated list. Use &lt;code&gt;--except&lt;/code&gt; to inject everything in the vault except specific keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  Worked Example: The Discord Health Report
&lt;/h2&gt;

&lt;p&gt;This is the health report task used in production to monitor the improve pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# ~/akm/tasks/akm-health-report.yml&lt;/span&gt;
&lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0 * * * *&lt;/span&gt;
&lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;akm env run fwdslsh -- bash /home/founder3/akm/scripts/akm-health-discord.sh&lt;/span&gt;
&lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;AKM Health Report → Discord&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hourly:&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;post&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;4h&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;rolling&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;health&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;report&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;to&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Discord.&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Driven&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;by&lt;/span&gt;
  &lt;span class="s"&gt;akm&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;health&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;--since=4h&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;—&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;same&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;source&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;as&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;manual&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;reports."&lt;/span&gt;
&lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;health&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;discord&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;monitoring&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The task fires at the top of every hour. It injects the &lt;code&gt;fwdslsh&lt;/code&gt; vault (which contains the Discord webhook URL and any other credentials the script needs), then runs the health report script. The script calls &lt;code&gt;akm health --since=4h&lt;/code&gt; and &lt;code&gt;akm health --since=8h&lt;/code&gt;, computes deltas between the two windows for trend context, and posts a formatted embed to Discord.&lt;/p&gt;

&lt;p&gt;The embed has three inline fields — Output (promoted refs, merged memories, memory inference yield), Failures (chunk failures, skip reason anomalies), and Latency (median, P95, prior-window comparison) — plus a Needs Attention section that only appears when something is actually off. The footer includes the hostname and run timestamp so reports from multiple machines are distinguishable at a glance.&lt;/p&gt;

&lt;p&gt;To register the task after writing the YAML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm tasks &lt;span class="nb"&gt;sync
&lt;/span&gt;akm tasks list
&lt;span class="c"&gt;# → akm-health-report   0 * * * *   enabled   last run: —&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it once immediately to confirm the script works before relying on the scheduled version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm tasks run akm-health-report
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm tasks &lt;span class="nb"&gt;history&lt;/span&gt; &lt;span class="nt"&gt;--id&lt;/span&gt; akm-health-report &lt;span class="nt"&gt;--limit&lt;/span&gt; 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Logging
&lt;/h2&gt;

&lt;p&gt;Every task run is recorded in &lt;code&gt;state.db&lt;/code&gt; under the &lt;code&gt;task_history&lt;/code&gt; table. &lt;code&gt;akm tasks history&lt;/code&gt; surfaces that data. For log output, each run writes to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.cache/akm/tasks/logs/&amp;lt;id&amp;gt;.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;akm health&lt;/code&gt; inspects &lt;code&gt;task_history&lt;/code&gt; for missing log files, stale active runs (tasks that started but never completed), and recent failure rates. A task run that never wrote a &lt;code&gt;tasks_completed&lt;/code&gt; event shows up in &lt;code&gt;akm health&lt;/code&gt; output as a stuck active run — a reliable signal that something went wrong even if the log file doesn't say much.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm health &lt;span class="nt"&gt;--since&lt;/span&gt; 4h
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The health check correlates the &lt;code&gt;task_history&lt;/code&gt; events with the log files on disk. If a log file is missing for a completed run, &lt;code&gt;logBackingRate&lt;/code&gt; drops below 1.0, which flags as a warning. This is the &lt;code&gt;task-log-backing&lt;/code&gt; hard check — one of the deterministic checks that &lt;code&gt;akm health&lt;/code&gt; runs before it looks at any metrics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building a Task-Driven Operation
&lt;/h2&gt;

&lt;p&gt;The pattern that emerges from several tasks working together is an operation that runs itself. The improve loop consolidates and curates the stash twice an hour — what that pipeline does internally is covered in &lt;a href="https://dev.to/itlackey/the-improvement-loop-how-akm-keeps-your-agent-sharp-2d4d"&gt;part ten&lt;/a&gt;. The health report surfaces the results every hour. A daily curation task pulls new articles from configured sources and ingests them into the research wiki. None of these require an open terminal.&lt;/p&gt;

&lt;p&gt;Adding a new automated behavior follows the same steps regardless of what the task does:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Write the YAML to &lt;code&gt;&amp;lt;stash&amp;gt;/tasks/&amp;lt;id&amp;gt;.yml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;akm tasks sync&lt;/code&gt; to install the scheduler entry.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;akm tasks run &amp;lt;id&amp;gt;&lt;/code&gt; to test it immediately.&lt;/li&gt;
&lt;li&gt;Confirm the output with &lt;code&gt;akm tasks history&lt;/code&gt; and check the log.&lt;/li&gt;
&lt;li&gt;Add the task file to git if you want it version-controlled with your stash.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The task YAML is the contract between what you want to happen and when it happens. The log and &lt;code&gt;state.db&lt;/code&gt; are the record of what actually did.&lt;/p&gt;




&lt;p&gt;Task assets are available in akm 0.8.0. The full command reference is in &lt;a href="https://github.com/itlackey/akm/blob/main/docs/cli.md#tasks" rel="noopener noreferrer"&gt;docs/cli.md&lt;/a&gt;. The environment vault documentation is in &lt;a href="https://github.com/itlackey/akm/blob/main/docs/cli.md#env" rel="noopener noreferrer"&gt;docs/cli.md&lt;/a&gt;. If you're upgrading from 0.7.x, task &lt;code&gt;.md&lt;/code&gt; files from the old format are not auto-discovered — check the migration guide for the conversion path.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>cli</category>
      <category>automation</category>
    </item>
    <item>
      <title>The Improvement Loop: How akm Keeps Your Agent Sharp</title>
      <dc:creator>IT Lackey</dc:creator>
      <pubDate>Thu, 04 Jun 2026 00:30:50 +0000</pubDate>
      <link>https://dev.to/itlackey/the-improvement-loop-how-akm-keeps-your-agent-sharp-16h</link>
      <guid>https://dev.to/itlackey/the-improvement-loop-how-akm-keeps-your-agent-sharp-16h</guid>
      <description>&lt;p&gt;This is part ten in a series about managing the growing pile of skills, scripts, and context that AI coding agents depend on. &lt;a href="https://dev.to/itlackey/agents-that-remember-where-they-were-1koe"&gt;Part nine&lt;/a&gt; covered workflow assets, vault assets, and the writable git stash. &lt;a href="https://dev.to/itlackey/building-agent-knowledge-bases-that-actually-scale-23pb"&gt;Part eight&lt;/a&gt; tackled multi-wiki support for structured research. Earlier parts addressed teams, distributed stashes, feedback scoring, and community knowledge.&lt;/p&gt;

&lt;p&gt;This one is about entropy.&lt;/p&gt;

&lt;p&gt;You ship a feature. Your agent writes several memories during the session — partial findings, a workaround, a note about the build step that kept failing. Those memories are accurate when written. Three sprints later, the workaround is no longer needed, two of the memories say slightly different things about the same subsystem, and the note about the build step refers to a CI config that was replaced. None of this is catastrophic. But it accumulates. After six months, a significant fraction of your stash is stale, redundant, or quietly wrong.&lt;/p&gt;

&lt;p&gt;You could audit it manually. In practice, you won't — the stash is too large, the relevance of any given memory is hard to assess without the context where it was created, and the judgment calls (merge these two? promote this? delete that?) are exactly the kind of work that's tedious for a human and tractable for an LLM.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;akm improve&lt;/code&gt; is the answer to that problem. It is a multi-phase pipeline that reads your stash, evaluates asset quality, consolidates scattered memories, extracts structured facts, and maps entity relationships — on a schedule, without manual intervention, producing proposals you can review before anything changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Five Phases
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;akm improve&lt;/code&gt; is not a single LLM call. It is a sequenced pipeline where each phase produces inputs for the next.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reflect&lt;/strong&gt; evaluates asset quality. For each asset in scope, the reflect pass reviews the content against usage signals — search hits, retrieval counts, feedback — and produces a quality assessment. Low-quality assets are flagged as candidates for improvement. Since 0.8.0, reflect can run as a direct LLM HTTP call instead of spawning an agent subprocess, which cuts per-call latency from ~30 seconds to ~6–10 seconds:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Reflect mode&lt;/th&gt;
&lt;th&gt;Time per call&lt;/th&gt;
&lt;th&gt;69-ref run&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;agent (CLI subprocess)&lt;/td&gt;
&lt;td&gt;~30s&lt;/td&gt;
&lt;td&gt;~35 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sdk (in-process)&lt;/td&gt;
&lt;td&gt;~10–15s&lt;/td&gt;
&lt;td&gt;~12–17 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;llm (direct HTTP)&lt;/td&gt;
&lt;td&gt;~6–10s&lt;/td&gt;
&lt;td&gt;~8–10 min&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Distill&lt;/strong&gt; turns observations from reflect into lesson proposals. Where reflect says "this skill is incomplete and frequently retrieved with poor satisfaction," distill produces a draft improvement — a new version of the skill, a supplementary lesson, or a deprecation proposal. These proposals go into the queue; nothing is written to your stash until you accept them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consolidate&lt;/strong&gt; handles the memory pool specifically. Your memory pool accumulates entries from agent sessions — &lt;code&gt;akm remember&lt;/code&gt; calls, auto-captured observations, and task agent outputs. Consolidation groups related memories into chunks, sends each chunk to the LLM for a curation plan (merge near-duplicates, promote high-signal items, delete redundant entries, surface contradictions), and executes those plans. The result is a smaller, cleaner memory pool and new stash promotions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Memory inference&lt;/strong&gt; runs after consolidation. It takes the post-consolidation state and runs a lightweight factual extraction pass — pulling out atomic facts that did not make it into explicit memory entries. These become additional promotion candidates. In steady-state operation, memory inference yields around 60–70% (69.3% in a recent 24-hour window) usable atomic facts on each pass.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Graph extraction&lt;/strong&gt; runs last, against the final post-improve state. It builds the entity-relation index that powers &lt;code&gt;akm graph&lt;/code&gt; commands — which stash entries mention a given entity, which entities co-occur, and which assets produced zero entities (quality-triage candidates via &lt;code&gt;akm graph orphans&lt;/code&gt;). As of 0.8.0, extraction is incremental: only assets that changed during the improve run are re-extracted, and batches of four run in parallel by default.&lt;/p&gt;

&lt;p&gt;Each phase is independently enabled or disabled per profile. A &lt;code&gt;quick&lt;/code&gt; profile runs reflect only. A &lt;code&gt;memory-focus&lt;/code&gt; profile runs reflect and memory inference on memory and lesson types. A &lt;code&gt;thorough&lt;/code&gt; profile runs all five phases and auto-syncs the result to your git-backed stash.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running the Loop
&lt;/h2&gt;

&lt;p&gt;The basic invocation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm improve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That runs all enabled phases on the full stash, scoped by your default improve profile. Before running for the first time, use &lt;code&gt;--dry-run&lt;/code&gt; to see what would be processed without writing anything:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm improve &lt;span class="nt"&gt;--dry-run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The dry-run output shows which assets are selected, in what order, and which phases would run. Nothing is written to &lt;code&gt;state.db&lt;/code&gt; from the dry-run path — the improve result is flagged &lt;code&gt;.dryRun: true&lt;/code&gt; and excluded from health metrics.&lt;/p&gt;

&lt;p&gt;To scope the pass to a specific asset type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm improve memory          &lt;span class="c"&gt;# memory pool only&lt;/span&gt;
akm improve skill           &lt;span class="c"&gt;# skills only&lt;/span&gt;
akm improve skill:deploy    &lt;span class="c"&gt;# one specific asset&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To add extra guidance for the pass — useful when you know a particular focus area is relevant:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm improve &lt;span class="nt"&gt;--task&lt;/span&gt; &lt;span class="s2"&gt;"focus on deduplication in the build tooling notes"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To cap the number of assets processed (highest-utility first by default):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm improve &lt;span class="nt"&gt;--limit&lt;/span&gt; 20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The asset selection order is: assets with recent feedback signals first, then high-retrieval-count assets with no feedback, then everything else. Use &lt;code&gt;--require-feedback-signal&lt;/code&gt; to restrict the pass to assets that have received explicit feedback and skip the retrieval fallback entirely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Profiles
&lt;/h2&gt;

&lt;p&gt;A profile controls which phases run, which LLM connections are used, whether auto-sync fires at the end of the run, and the confidence threshold for auto-accepting proposals. Built-in profiles:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Profile&lt;/th&gt;
&lt;th&gt;Phases&lt;/th&gt;
&lt;th&gt;Auto-sync&lt;/th&gt;
&lt;th&gt;Auto-push&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;default&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;All five&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;thorough&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;All five, larger batches&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;quick&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reflect only&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;memory-focus&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reflect + memory inference, memory and lesson types only&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Pass &lt;code&gt;--profile&lt;/code&gt; to override for a single run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm improve &lt;span class="nt"&gt;--profile&lt;/span&gt; quick
akm improve &lt;span class="nt"&gt;--profile&lt;/span&gt; memory-focus
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Define custom profiles in your config under &lt;code&gt;profiles.improve.&amp;lt;name&amp;gt;&lt;/code&gt;. Each process entry in the profile uses a unified &lt;code&gt;{mode, profile, timeoutMs, options}&lt;/code&gt; shape, so you can point reflect at a fast local model and consolidation at a more capable one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"configVersion"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.8.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"profiles"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"fast"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"endpoint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://localhost:1234/v1/chat/completions"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"qwen3.5-9b"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"careful"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"endpoint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://192.168.0.99:1234/v1/chat/completions"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"qwen3-32b"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"improve"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"default"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"processes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"reflect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"profile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"fast"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"consolidate"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"profile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"careful"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Proposal Queue
&lt;/h2&gt;

&lt;p&gt;Every improvement that &lt;code&gt;akm improve&lt;/code&gt; generates flows through the proposal queue before touching your stash. Nothing is written directly. The queue is the safety layer.&lt;/p&gt;

&lt;p&gt;After a run, review what was generated:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm proposal list
akm proposal list &lt;span class="nt"&gt;--status&lt;/span&gt; pending
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inspect a specific proposal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm proposal show &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
akm proposal diff &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;       &lt;span class="c"&gt;# side-by-side diff vs. the live asset&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Accept or reject:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm proposal accept &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
akm proposal reject &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;--reason&lt;/span&gt; &lt;span class="s2"&gt;"duplicates the deployment-gotchas lesson"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;akm proposal accept&lt;/code&gt; runs full schema validation before writing anything to the stash. Accepted proposals are promoted as normal stash assets and become immediately searchable.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;--auto-accept&lt;/code&gt; flag enables confidence-threshold-based auto-promotion. The default safe threshold is 90 — proposals where the LLM scored its own confidence at 90 or above are promoted automatically; everything below goes to the queue for manual review:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm improve &lt;span class="nt"&gt;--auto-accept&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;90     &lt;span class="c"&gt;# explicit threshold (same as the default)&lt;/span&gt;
akm improve &lt;span class="nt"&gt;--auto-accept&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;  &lt;span class="c"&gt;# disable auto-accept, send everything to queue&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the first few runs on a new stash, disable auto-accept and review the queue manually. Once you have a sense of what the pipeline generates, you can raise the threshold progressively.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scheduling
&lt;/h2&gt;

&lt;p&gt;Running &lt;code&gt;akm improve&lt;/code&gt; once is useful. Running it continuously is where the compounding starts.&lt;/p&gt;

&lt;p&gt;The pipeline is designed to run on a cron schedule. In production, every 30 minutes is a common cadence — enough time for the consolidation LLM calls to complete, short enough that memories from any given session get curated within the hour.&lt;/p&gt;

&lt;p&gt;Define a task asset to schedule it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# ~/akm/tasks/improve-loop.yml&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;improve-loop&lt;/span&gt;
&lt;span class="na"&gt;trigger&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;cron&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;*/30&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*'&lt;/span&gt;
&lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;akm&lt;/span&gt;
  &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;improve"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--profile"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;default"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--limit"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;30"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Register the task:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm tasks &lt;span class="nb"&gt;sync&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, &lt;code&gt;akm improve&lt;/code&gt; runs every 30 minutes without manual intervention. The &lt;code&gt;--limit 30&lt;/code&gt; cap keeps each run predictably bounded. If there is nothing worth improving — no new feedback, no high-retrieval zero-feedback assets — the run completes quickly after selection with zero proposals generated.&lt;/p&gt;

&lt;p&gt;For git-backed stashes, the &lt;code&gt;default&lt;/code&gt; and &lt;code&gt;thorough&lt;/code&gt; profiles auto-commit at the end of each run. The commit message template is configurable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="nl"&gt;"sync"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"akm improve {scope} — {refs} refs ({date})"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use &lt;code&gt;--no-sync&lt;/code&gt; to suppress the commit for a specific run, or &lt;code&gt;--no-push&lt;/code&gt; to commit locally without pushing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Knowing the Loop Is Working
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;akm health&lt;/code&gt; gives you a structured view of recent improve activity without querying SQLite directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm health &lt;span class="nt"&gt;--since&lt;/span&gt; 24h
akm health &lt;span class="nt"&gt;--since&lt;/span&gt; 4h &lt;span class="nt"&gt;--format&lt;/span&gt; text
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output covers run counts, skip reason breakdowns, consolidation outcomes, memory inference yield, and phase latencies. If a run was a dry-run, it is excluded from the health metrics automatically.&lt;/p&gt;

&lt;p&gt;After any significant stash change, running &lt;code&gt;akm health&lt;/code&gt; is the fastest way to confirm the pipeline is in a healthy state rather than silently stuck on a locked journal or a stale database entry.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Changes Over Time
&lt;/h2&gt;

&lt;p&gt;The value of the improve loop is not in any single run. It is in what accumulates.&lt;/p&gt;

&lt;p&gt;After a week of 30-minute cycles on an active stash, the memory pool is smaller and more coherent. Duplicate memories from related sessions have been merged. High-signal observations have been promoted to named stash entries your agent can reference directly. The graph extraction index has been built up incrementally so &lt;code&gt;akm graph entity &amp;lt;name&amp;gt;&lt;/code&gt; returns useful results instead of nothing.&lt;/p&gt;

&lt;p&gt;After a month, the stash reflects your actual working patterns rather than the raw notes from when you first captured something. Assets that were retrieved frequently and rated poorly have been flagged and improved. Assets that were never retrieved have surfaced as candidates for deletion or consolidation. The memory you have is accurate to what you know now, not what you wrote six months ago.&lt;/p&gt;

&lt;p&gt;That is the loop. It runs while you work. It runs while you sleep. Each pass leaves the stash slightly more accurate, slightly more consolidated, slightly more useful. The proposals it generates are the visible surface — the queue where you can see what the pipeline decided and override it. The underlying stash quality improvement is what compounds.&lt;/p&gt;




&lt;p&gt;&lt;code&gt;akm improve&lt;/code&gt; is part of akm 0.8.x. The full pipeline configuration reference is at &lt;a href="https://github.com/itlackey/akm/blob/main/docs/configuration.md" rel="noopener noreferrer"&gt;docs/configuration.md&lt;/a&gt;. Profile options, LLM connection setup, and scheduling details are in the &lt;a href="https://github.com/itlackey/akm/blob/main/docs/features/improvement-loop.md" rel="noopener noreferrer"&gt;improvement loop feature doc&lt;/a&gt;. For a concrete look at 24 hours of autonomous operation — hardware benchmarks, the two reliability fixes that make continuous runs viable, and the Discord health report setup — see &lt;a href="https://dev.to/itlackey/your-agent-has-a-memory-that-runs-while-you-sleep-20oh"&gt;Your Agent Has a Memory That Runs While You Sleep&lt;/a&gt;. The repo is at &lt;a href="https://github.com/itlackey/akm" rel="noopener noreferrer"&gt;github.com/itlackey/akm&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>cli</category>
      <category>automation</category>
    </item>
    <item>
      <title>akm 0.8.0: CLI Redesign, Task Assets, and Belief-Aware Memory</title>
      <dc:creator>IT Lackey</dc:creator>
      <pubDate>Wed, 03 Jun 2026 22:36:48 +0000</pubDate>
      <link>https://dev.to/itlackey/akm-080-cli-redesign-task-assets-and-belief-aware-memory-335a</link>
      <guid>https://dev.to/itlackey/akm-080-cli-redesign-task-assets-and-belief-aware-memory-335a</guid>
      <description>&lt;p&gt;akm 0.8.0 is out. This release combines the storage reorganization and CLI redesign with the final improve-owned maintenance migration: plain &lt;code&gt;akm index&lt;/code&gt; now keeps metadata current, while slower memory inference and graph extraction maintenance run from &lt;code&gt;akm improve&lt;/code&gt; after consolidation.&lt;/p&gt;

&lt;p&gt;If you are on 0.7.x, the v1 migration guide covers the per-surface delta. The upgrade requires updating scripts and agent instructions due to breaking CLI changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;akm improve&lt;/code&gt;&lt;/strong&gt; — unified command for agent-driven asset refinement and post-loop maintenance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improve-owned maintenance&lt;/strong&gt; — memory inference and graph extraction now run from &lt;code&gt;akm improve&lt;/code&gt;, not &lt;code&gt;akm index&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;End-of-run auto-sync&lt;/strong&gt; — &lt;code&gt;akm improve&lt;/code&gt; now auto-commits git-backed stashes; &lt;code&gt;--sync&lt;/code&gt;/&lt;code&gt;--no-sync&lt;/code&gt;/&lt;code&gt;--push&lt;/code&gt;/&lt;code&gt;--no-push&lt;/code&gt; flags + token-based commit messages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Task assets&lt;/strong&gt; — first-class asset type for defining persistent agent workflows with cron scheduling and manual invocation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Belief-aware memory&lt;/strong&gt; — stash updates now incorporate the agent's belief state to prevent overwriting correct information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proposal queue commands renamed&lt;/strong&gt; — old flat commands (&lt;code&gt;akm proposals&lt;/code&gt;, &lt;code&gt;akm show proposal&lt;/code&gt;, &lt;code&gt;akm diff proposal&lt;/code&gt;, &lt;code&gt;akm accept&lt;/code&gt;, &lt;code&gt;akm reject&lt;/code&gt;) are now (&lt;code&gt;akm proposal list&lt;/code&gt;, &lt;code&gt;akm proposal show&lt;/code&gt;, &lt;code&gt;akm proposal diff&lt;/code&gt;, &lt;code&gt;akm proposal accept&lt;/code&gt;, &lt;code&gt;akm proposal reject&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;akm health&lt;/code&gt;&lt;/strong&gt; — runtime health report for &lt;code&gt;state.db&lt;/code&gt;, task execution logs, agent availability, and recent improve telemetry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CLI breaking changes&lt;/strong&gt; — proposal queue workflows are consolidated around &lt;code&gt;akm improve&lt;/code&gt;, &lt;code&gt;akm propose&lt;/code&gt;, &lt;code&gt;akm proposal list&lt;/code&gt;, &lt;code&gt;akm proposal show&lt;/code&gt;, &lt;code&gt;akm proposal diff&lt;/code&gt;, &lt;code&gt;akm proposal accept&lt;/code&gt;, and &lt;code&gt;akm proposal reject&lt;/code&gt; (old flat aliases deprecated); update your automation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Release hardening&lt;/strong&gt; — empty-query search is a structured error again, &lt;code&gt;remember --enrich&lt;/code&gt; now truly fail-softs, improve lock-leak on initialization errors fixed, and the Docker install matrix is green for Bun and binary paths.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;code&gt;akm improve&lt;/code&gt;: The New Self-Improvement Surface
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;akm improve&lt;/code&gt; command consolidates asset refinement workflows. It can operate on a specific asset type (generating a new asset) or an existing asset ref (refining that asset). Under the hood, it uses the same proposal queue as before, ensuring all changes are reviewable before promotion.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm improve &amp;lt;&lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;                 &lt;span class="c"&gt;# scope the run to all assets of that type&lt;/span&gt;
akm improve &amp;lt;ref&amp;gt;                  &lt;span class="c"&gt;# refine an existing asset and produce a proposal&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This consolidates the main proposal-oriented improvement workflow. It also now owns the slow maintenance passes that used to be coupled to indexing: after distill and consolidation settle the corpus, improve runs memory inference, reindexes if inference wrote new facts, and then refreshes graph extraction against the final post-improve state.&lt;/p&gt;

&lt;h2&gt;
  
  
  End-of-Run Git Sync and Commit Templating
&lt;/h2&gt;

&lt;p&gt;For git-backed stashes (detected by &lt;code&gt;.git&lt;/code&gt; directory presence), &lt;code&gt;akm improve&lt;/code&gt;&lt;br&gt;
now commits all changes as a single batch at the end of the run. Two new flags&lt;br&gt;
control the behavior:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm improve              &lt;span class="c"&gt;# default/thorough profiles: auto-commit + push&lt;/span&gt;
akm improve &lt;span class="nt"&gt;--no-sync&lt;/span&gt;    &lt;span class="c"&gt;# skip the end-of-run commit for this run&lt;/span&gt;
akm improve &lt;span class="nt"&gt;--no-push&lt;/span&gt;    &lt;span class="c"&gt;# commit but skip push&lt;/span&gt;
akm improve &lt;span class="nt"&gt;--sync&lt;/span&gt;       &lt;span class="c"&gt;# force sync even on profiles that disable it&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Sync defaults by profile:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Profile&lt;/th&gt;
&lt;th&gt;Sync&lt;/th&gt;
&lt;th&gt;Push&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;default&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;thorough&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;quick&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;memory-focus&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Lightweight passes (&lt;code&gt;quick&lt;/code&gt;, &lt;code&gt;memory-focus&lt;/code&gt;) opt out of auto-sync to avoid&lt;br&gt;
auto-committing partial results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commit message templates:&lt;/strong&gt; The &lt;code&gt;sync.message&lt;/code&gt; config field supports &lt;code&gt;{token}&lt;/code&gt;&lt;br&gt;
placeholders — &lt;code&gt;{timestamp}&lt;/code&gt;, &lt;code&gt;{date}&lt;/code&gt;, &lt;code&gt;{time}&lt;/code&gt;, &lt;code&gt;{scope}&lt;/code&gt;, &lt;code&gt;{refs}&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;{accepted}&lt;/code&gt; — so the commit log can carry run context:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="nl"&gt;"sync"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"akm improve {scope} — {refs} refs ({date})"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The improve result includes a &lt;code&gt;sync&lt;/code&gt; field (&lt;code&gt;{ committed, pushed, skipped,&lt;br&gt;
reason? }&lt;/code&gt;) and a &lt;code&gt;stash_synced&lt;/code&gt; event is emitted to &lt;code&gt;state.db&lt;/code&gt;. Sync failures&lt;br&gt;
are non-fatal — they never fail a successful run.&lt;/p&gt;
&lt;h2&gt;
  
  
  Consolidate Reliability Improvements
&lt;/h2&gt;

&lt;p&gt;The consolidate pass received two reliability fixes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pre-flight stale-DB filter&lt;/strong&gt;: entries that have gone stale in the DB since
the run started are filtered out before any LLM calls, eliminating wasted
tokens on already-processed content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Defense-in-depth merge guards&lt;/strong&gt;: four layers of guards now prevent
incorrect merges, improving correctness on edge cases.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Task Assets: Persistent Agent Workflows
&lt;/h2&gt;

&lt;p&gt;Task assets (&lt;code&gt;tasks/&amp;lt;name&amp;gt;.yml&lt;/code&gt;) allow you to define persistent agent workflows that can be triggered on a schedule or manually. Each task runs using the configured agent runtime.&lt;/p&gt;

&lt;p&gt;Key features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cron-based scheduling&lt;/strong&gt; (with proper escaping for special characters)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manual invocation&lt;/strong&gt; via &lt;code&gt;akm tasks run &amp;lt;id&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proposal-driven updates&lt;/strong&gt; (task agents propose changes via &lt;code&gt;akm improve&lt;/code&gt;, which go through the proposal queue)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example task asset:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;daily-code-review&lt;/span&gt;
&lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;9&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*'&lt;/span&gt;  &lt;span class="c1"&gt;# every day at 9 AM&lt;/span&gt;
&lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;opencode&lt;/span&gt;
&lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Review&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;staged&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;changes&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;and&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;suggest&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;improvements"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Belief-Aware Memory
&lt;/h2&gt;

&lt;p&gt;Memory assets now carry a &lt;code&gt;beliefState&lt;/code&gt; frontmatter field (values: &lt;code&gt;active&lt;/code&gt;, &lt;code&gt;asserted&lt;/code&gt;, &lt;code&gt;deprecated&lt;/code&gt;, &lt;code&gt;superseded&lt;/code&gt;, &lt;code&gt;contradicted&lt;/code&gt;, &lt;code&gt;archived&lt;/code&gt;). The consolidation and improve passes use this field to track and transition belief state — for example, marking a memory &lt;code&gt;contradicted&lt;/code&gt; when a newer fact conflicts with it. This reduces the chance of outdated or incorrect beliefs persisting in the stash after new information arrives.&lt;/p&gt;

&lt;h2&gt;
  
  
  Proposal Queue: Renamed Commands
&lt;/h2&gt;

&lt;p&gt;The proposal queue itself is unchanged, but the CLI surfaces have been reorganized under a &lt;code&gt;proposal&lt;/code&gt; subcommand:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Old Command (0.7.x)&lt;/th&gt;
&lt;th&gt;New Command (0.8.0+)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;akm proposals&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;akm proposal list&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;akm show proposal&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;akm proposal show&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;akm diff proposal&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;akm proposal diff&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;akm accept&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;akm proposal accept&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;akm reject&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;akm proposal reject&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;All commands retain the same functionality and flags (e.g., &lt;code&gt;akm proposal reject &amp;lt;id&amp;gt; --reason "..."&lt;/code&gt;). The old flat verbs still work as deprecated aliases (they warn on stderr) and will be removed in 0.9.0 — update your scripts and documentation before then.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;akm health&lt;/code&gt;: Runtime Checks in One Command
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;akm health&lt;/code&gt; provides a quick operator-facing snapshot of whether the local akm&lt;br&gt;
runtime is healthy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm health
akm health &lt;span class="nt"&gt;--since&lt;/span&gt; 24h
akm health &lt;span class="nt"&gt;--since&lt;/span&gt; 7d &lt;span class="nt"&gt;--format&lt;/span&gt; text
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It checks that &lt;code&gt;state.db&lt;/code&gt; is readable and writable, verifies that required&lt;br&gt;
tables exist, inspects &lt;code&gt;task_history&lt;/code&gt; for missing log files or stale active&lt;br&gt;
runs, probes the default agent profile, and summarizes recent &lt;code&gt;akm improve&lt;/code&gt;&lt;br&gt;
activity from &lt;code&gt;improve_invoked&lt;/code&gt;, &lt;code&gt;improve_skipped&lt;/code&gt;, and &lt;code&gt;improve_completed&lt;/code&gt;&lt;br&gt;
events.&lt;/p&gt;

&lt;p&gt;This makes it easier to validate an upgraded installation after migration or to&lt;br&gt;
spot regressions in task execution and improve-loop maintenance without querying&lt;br&gt;
SQLite tables directly.&lt;/p&gt;
&lt;h2&gt;
  
  
  Agent Command Builder: Platform-Aware Dispatch
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;akm agent&lt;/code&gt; can now embody a stash agent asset — setting the system prompt, model, and tool policy automatically from the asset's metadata:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm agent opencode agent:code-reviewer &lt;span class="nt"&gt;--prompt&lt;/span&gt; &lt;span class="s2"&gt;"review src/commands/"&lt;/span&gt;
akm agent claude agent:planner &lt;span class="nt"&gt;--model&lt;/span&gt; sonnet &lt;span class="nt"&gt;--prompt&lt;/span&gt; &lt;span class="s2"&gt;"plan the next sprint"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;&amp;lt;agent-ref&amp;gt;&lt;/code&gt; positional resolves the agent asset's content as the system prompt, its &lt;code&gt;model:&lt;/code&gt; frontmatter as the model, and its &lt;code&gt;tools:&lt;/code&gt; frontmatter as the allowed tool set. Each platform gets the exact flags its CLI expects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;opencode&lt;/strong&gt;: &lt;code&gt;opencode run --system-prompt "..." --model opencode/claude-opus-4-7 "&amp;lt;prompt&amp;gt;"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;claude&lt;/strong&gt;: &lt;code&gt;claude --system-prompt "..." --model claude-opus-4-7 --allowedTools read,edit --print "&amp;lt;prompt&amp;gt;"&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Built-in model aliases (&lt;code&gt;opus&lt;/code&gt;, &lt;code&gt;sonnet&lt;/code&gt;, &lt;code&gt;haiku&lt;/code&gt;) resolve to the correct model string per platform. Add custom aliases in &lt;code&gt;agent.profiles.&amp;lt;name&amp;gt;.modelAliases&lt;/code&gt;. Override any asset's model for a single run with &lt;code&gt;--model&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Without a prompt or agent-ref, &lt;code&gt;akm agent opencode&lt;/code&gt; still launches the agent interactively — unchanged.&lt;/p&gt;

&lt;h2&gt;
  
  
  Graph Extraction: Faster, Cleaner, Schema-Stable
&lt;/h2&gt;

&lt;p&gt;0.8.0 reshapes how graph extraction is stored, queried, and refreshed. The&lt;br&gt;
visible wins:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Schema cascade fix.&lt;/strong&gt; &lt;code&gt;graph_files&lt;/code&gt; now keys on &lt;code&gt;entry_id INTEGER PRIMARY
KEY REFERENCES entries(id) ON DELETE CASCADE&lt;/code&gt;, and the child tables
(&lt;code&gt;graph_file_entities&lt;/code&gt;, &lt;code&gt;graph_file_relations&lt;/code&gt;) cascade through. Removing a
stash or deleting an entry now correctly cleans up the graph rows — no more
orphans accumulating in &lt;code&gt;index.db&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incremental refreshes.&lt;/strong&gt; Graph extraction now filters on a
&lt;code&gt;candidatePaths&lt;/code&gt; set, so each &lt;code&gt;akm improve&lt;/code&gt; cycle revisits only touched
assets instead of the whole stash. The default &lt;code&gt;graphExtractionBatchSize&lt;/code&gt;
rose from 1 to 4 (auto-tuned against &lt;code&gt;llm.contextLength&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fewer writes.&lt;/strong&gt; &lt;code&gt;replaceStoredGraph&lt;/code&gt; is now incremental — unchanged entries
skip, changed entries swap their child rows in place, removed entries
cascade out. Roughly 700× fewer row writes per pass on typical re-extractions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faster lookups.&lt;/strong&gt; &lt;code&gt;listRelatedPathsForFile&lt;/code&gt; is a scoped SQL self-join
instead of a full snapshot load: ~30ms → ~2ms on a typical stash.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New commands.&lt;/strong&gt; &lt;code&gt;akm graph entity &amp;lt;name&amp;gt;&lt;/code&gt; inverts the entities view (every
asset that mentions a given entity, by confidence). &lt;code&gt;akm graph orphans&lt;/code&gt;
surfaces assets that produced zero entities — quality-triage candidates.
Both are documented in &lt;a href="https://github.com/itlackey/akm/blob/main/docs/cli.md#graph" rel="noopener noreferrer"&gt;docs/cli.md&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better output.&lt;/strong&gt; &lt;code&gt;akm graph relations&lt;/code&gt; and &lt;code&gt;akm graph entities&lt;/code&gt; now show
per-row confidence. Search hits annotate the graph-boost contribution in
&lt;code&gt;whyMatched&lt;/code&gt;. Related results end with a &lt;code&gt;Next: akm show '&amp;lt;ref&amp;gt;'&lt;/code&gt; hint
pointing at the top neighbor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ref-form output.&lt;/strong&gt; Related results now show canonical refs
(e.g. &lt;code&gt;memory:incident-2026-05-12&lt;/code&gt;) instead of raw file paths.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;DB_VERSION bumped to 17.&lt;/strong&gt; The schema change uses the existing&lt;br&gt;
DROP+rebuild upgrade path: non-graph tables (&lt;code&gt;entries&lt;/code&gt;, embeddings, FTS) rebuild&lt;br&gt;
automatically the first time akm opens &lt;code&gt;index.db&lt;/code&gt;; graph tables repopulate on&lt;br&gt;
the next &lt;code&gt;akm improve&lt;/code&gt; cycle, which makes LLM calls. The first improve cycle&lt;br&gt;
after upgrade is slower than steady state, but the Phase 1 / Phase 2&lt;br&gt;
improvements above make it dramatically faster than equivalent re-extraction&lt;br&gt;
on 0.7.x. See the migration guide section&lt;br&gt;
&lt;a href="https://github.com/itlackey/akm/blob/main/docs/migration/v0.7-to-v0.8.md#graph-extraction-will-re-run-after-upgrade" rel="noopener noreferrer"&gt;Graph extraction will re-run after upgrade&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Config v2 and reflect LLM mode
&lt;/h2&gt;

&lt;p&gt;0.8.0 introduces a new config shape (&lt;code&gt;configVersion: "0.8.0"&lt;/code&gt;) that replaces&lt;br&gt;
the scattered v1 keys with a unified &lt;code&gt;profiles&lt;/code&gt; + first-class feature tree.&lt;br&gt;
Named LLM connections live under &lt;code&gt;profiles.llm.&amp;lt;name&amp;gt;&lt;/code&gt; and named agent&lt;br&gt;
connections under &lt;code&gt;profiles.agent.&amp;lt;name&amp;gt;&lt;/code&gt;, each declared once and referenced&lt;br&gt;
by name from process entries on &lt;code&gt;profiles.improve.&amp;lt;name&amp;gt;&lt;/code&gt;. The old&lt;br&gt;
&lt;code&gt;llm.features.*&lt;/code&gt; boolean flags and &lt;code&gt;agent.processes&lt;/code&gt; map are replaced by&lt;br&gt;
&lt;code&gt;profiles.improve.&amp;lt;name&amp;gt;.processes.*&lt;/code&gt; (improve-bound work), plus top-level&lt;br&gt;
&lt;code&gt;index.metadataEnhance&lt;/code&gt;, &lt;code&gt;index.stalenessDetection&lt;/code&gt;, and &lt;code&gt;search.curateRerank&lt;/code&gt;&lt;br&gt;
sections (non-improve features) — each entry using a unified &lt;code&gt;{mode, profile,&lt;br&gt;
timeoutMs, options}&lt;/code&gt; shape. Configs without &lt;code&gt;configVersion&lt;/code&gt; are auto-migrated&lt;br&gt;
at first run; a timestamped backup is written before any in-place rewrite.&lt;/p&gt;

&lt;p&gt;With the new config in place, the reflect pass inside &lt;code&gt;akm improve&lt;/code&gt; can now&lt;br&gt;
run as a direct LLM call instead of spawning an opencode subprocess. For reflect, the context is statically pre-assembled, so a direct&lt;br&gt;
HTTP call captures the full quality benefit at a fraction of the cost. LLM mode&lt;br&gt;
also adds multi-turn self-refine (the prior draft is sent back as an assistant&lt;br&gt;
turn) and structured JSON output for providers that set &lt;code&gt;supportsJsonSchema:&lt;br&gt;
true&lt;/code&gt;. The performance difference is significant:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Time per reflect call&lt;/th&gt;
&lt;th&gt;69-ref improve run&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;agent (CLI subprocess)&lt;/td&gt;
&lt;td&gt;~30s&lt;/td&gt;
&lt;td&gt;~35 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sdk (in-process opencode)&lt;/td&gt;
&lt;td&gt;~10–15s&lt;/td&gt;
&lt;td&gt;~12–17 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;llm (direct HTTP)&lt;/td&gt;
&lt;td&gt;~6–10s&lt;/td&gt;
&lt;td&gt;~8–10 min&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;To opt in to LLM mode for reflect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Opt in to LLM mode for reflect (3-5x faster)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"configVersion"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.8.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"profiles"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"openai-mini"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"endpoint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://api.openai.com/v1/chat/completions"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"gpt-4o-mini"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"apiKey"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${OPENAI_API_KEY}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"supportsJsonSchema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"improve"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"default"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"processes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"reflect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"profile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"openai-mini"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"defaults"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"llm"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"openai-mini"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To migrate an existing config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Preview the transformation&lt;/span&gt;
akm config migrate &lt;span class="nt"&gt;--dry-run&lt;/span&gt;

&lt;span class="c"&gt;# Apply (writes a timestamped backup first)&lt;/span&gt;
akm config migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Full reference: &lt;a href="https://github.com/itlackey/akm/blob/main/docs/configuration.md" rel="noopener noreferrer"&gt;docs/configuration.md&lt;/a&gt;.&lt;br&gt;
Full key mapping: &lt;a href="https://github.com/itlackey/akm/blob/main/docs/migration/v0.7-to-v0.8.md#config-v2-migration-reflect-multi-mode" rel="noopener noreferrer"&gt;docs/migration/v0.7-to-v0.8.md — Config v2 migration&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Migration Guidance
&lt;/h2&gt;

&lt;p&gt;Breaking changes in 0.8.0:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consolidated around: &lt;code&gt;akm improve&lt;/code&gt;, &lt;code&gt;akm propose&lt;/code&gt;, &lt;code&gt;akm proposal list&lt;/code&gt;, &lt;code&gt;akm proposal show&lt;/code&gt;, &lt;code&gt;akm proposal diff&lt;/code&gt;, &lt;code&gt;akm proposal accept&lt;/code&gt;, &lt;code&gt;akm proposal reject&lt;/code&gt;, &lt;code&gt;akm proposal revert&lt;/code&gt; (old flat aliases deprecated)&lt;/li&gt;
&lt;li&gt;Added: task assets, renamed proposal commands&lt;/li&gt;
&lt;li&gt;Added: &lt;code&gt;akm health&lt;/code&gt; for runtime and improve telemetry checks&lt;/li&gt;
&lt;li&gt;Added: end-of-run auto-sync for git-backed stashes (&lt;code&gt;--no-sync&lt;/code&gt; to opt out)&lt;/li&gt;
&lt;li&gt;Removed: &lt;code&gt;akm index --enrich&lt;/code&gt; and &lt;code&gt;akm index --re-enrich&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Changed: plain &lt;code&gt;akm index&lt;/code&gt; now owns metadata enhancement only; slow LLM maintenance moved to &lt;code&gt;akm improve&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Windows task path parsing now correctly handles absolute paths and drive letters&lt;/li&gt;
&lt;li&gt;Cron expressions with apostrophes are now properly escaped in schtasks XML&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To upgrade:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Update any scripts or automation that still target the pre-0.8 proposal queue and indexing workflow.&lt;/li&gt;
&lt;li&gt;Prefer &lt;code&gt;akm improve&lt;/code&gt; for the main refinement/maintenance workflow.&lt;/li&gt;
&lt;li&gt;Stop calling &lt;code&gt;akm index --enrich&lt;/code&gt;; use plain &lt;code&gt;akm index&lt;/code&gt; plus &lt;code&gt;akm improve&lt;/code&gt; maintenance flows.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;akm health --since 24h&lt;/code&gt; after upgrade to confirm state-db and task-history health.&lt;/li&gt;
&lt;li&gt;Rename proposal queue commands as per the table above.&lt;/li&gt;
&lt;li&gt;Review task definitions for Windows path compatibility if using absolute paths.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;akm config migrate&lt;/code&gt; to upgrade your config to the v2 shape and unlock LLM-mode reflect.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No manual data migration is required. The proposal queue and existing stash assets remain compatible.&lt;/p&gt;
&lt;h2&gt;
  
  
  Try the New Surfaces
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Scope an improve run to all memory assets&lt;/span&gt;
akm improve memory &lt;span class="nt"&gt;--task&lt;/span&gt; &lt;span class="s2"&gt;"Summarize today's debugging session"&lt;/span&gt;

&lt;span class="c"&gt;# List improvement proposals&lt;/span&gt;
akm proposal list

&lt;span class="c"&gt;# Show one proposal&lt;/span&gt;
akm proposal show &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;# Accept a proposal (after review)&lt;/span&gt;
akm proposal accept &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;# Define and run a task&lt;/span&gt;
akm tasks run daily-code-review

&lt;span class="c"&gt;# Run improve with a specific profile (reflect mode comes from the profile)&lt;/span&gt;
akm improve memory:my-note &lt;span class="nt"&gt;--profile&lt;/span&gt; fast-llm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Verification
&lt;/h2&gt;

&lt;p&gt;After upgrading:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm info &lt;span class="nt"&gt;--format&lt;/span&gt; text     &lt;span class="c"&gt;# version 0.8.x&lt;/span&gt;
akm health &lt;span class="nt"&gt;--since&lt;/span&gt; 24h     &lt;span class="c"&gt;# runtime + improve telemetry checks&lt;/span&gt;
akm proposal list         &lt;span class="c"&gt;# queue starts empty — that's expected&lt;/span&gt;
akm task list              &lt;span class="c"&gt;# shows your defined tasks&lt;/span&gt;
akm config get configVersion  &lt;span class="c"&gt;# "0.8.0" after akm config migrate&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Full details in the &lt;a href="https://github.com/itlackey/akm/blob/main/docs/migration/v0.7-to-v0.8.md" rel="noopener noreferrer"&gt;v0.7 to v0.8 migration guide&lt;/a&gt; and the &lt;a href="https://github.com/itlackey/akm/blob/main/docs/configuration.md" rel="noopener noreferrer"&gt;configuration reference&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Full changelog at &lt;a href="https://github.com/itlackey/akm/blob/main/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG.md&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>cli</category>
      <category>release</category>
    </item>
    <item>
      <title>What akm Actually Does: A Command-by-Command Tour</title>
      <dc:creator>IT Lackey</dc:creator>
      <pubDate>Thu, 07 May 2026 23:51:17 +0000</pubDate>
      <link>https://dev.to/itlackey/what-akm-actually-does-a-command-by-command-tour-131l</link>
      <guid>https://dev.to/itlackey/what-akm-actually-does-a-command-by-command-tour-131l</guid>
      <description>&lt;p&gt;If you've looked at &lt;code&gt;akm&lt;/code&gt; for the first time and thought "this seems useful, but what do all these commands actually &lt;em&gt;do&lt;/em&gt;?" this post is for you.&lt;/p&gt;

&lt;p&gt;At a high level, &lt;code&gt;akm&lt;/code&gt; is a package manager for AI agent capabilities. It gives your agents a searchable library of scripts, skills, commands, agents, knowledge docs, workflows, vaults, wikis, lessons, and memories. Instead of dumping everything into a giant system prompt, you let the agent discover what it needs with search, then load the right asset at the right time.&lt;/p&gt;

&lt;p&gt;That's the big idea. The practical question is how the command surface fits together in day-to-day work.&lt;/p&gt;

&lt;p&gt;This post walks through the CLI by job-to-be-done, with real examples of when you'd use each command.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This command-family framing reflects &lt;code&gt;akm&lt;/code&gt; v0.8.0.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The Short Version
&lt;/h2&gt;

&lt;p&gt;You can think about &lt;code&gt;akm&lt;/code&gt; in seven layers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Set up the workspace&lt;/strong&gt; — &lt;code&gt;setup&lt;/code&gt;, &lt;code&gt;init&lt;/code&gt;, &lt;code&gt;config&lt;/code&gt;, &lt;code&gt;info&lt;/code&gt;, &lt;code&gt;index&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Connect sources and discover new ones&lt;/strong&gt; — &lt;code&gt;add&lt;/code&gt;, &lt;code&gt;list&lt;/code&gt;, &lt;code&gt;update&lt;/code&gt;, &lt;code&gt;remove&lt;/code&gt;, &lt;code&gt;clone&lt;/code&gt;, &lt;code&gt;save&lt;/code&gt;, &lt;code&gt;registry&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Find and inspect assets&lt;/strong&gt; — &lt;code&gt;curate&lt;/code&gt;, &lt;code&gt;search&lt;/code&gt;, &lt;code&gt;show&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build local knowledge and operational context&lt;/strong&gt; — &lt;code&gt;remember&lt;/code&gt;, &lt;code&gt;import&lt;/code&gt;, &lt;code&gt;wiki&lt;/code&gt;, &lt;code&gt;vault&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run repeatable procedures&lt;/strong&gt; — &lt;code&gt;workflow&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Continuously improve the stash&lt;/strong&gt; — &lt;code&gt;feedback&lt;/code&gt;, &lt;code&gt;history&lt;/code&gt;, &lt;code&gt;events&lt;/code&gt;, &lt;code&gt;improve&lt;/code&gt;, &lt;code&gt;propose&lt;/code&gt;, &lt;code&gt;proposals&lt;/code&gt;, &lt;code&gt;accept&lt;/code&gt;, &lt;code&gt;reject&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Operate the CLI comfortably&lt;/strong&gt; — &lt;code&gt;help&lt;/code&gt;, &lt;code&gt;hints&lt;/code&gt;, &lt;code&gt;completions&lt;/code&gt;, &lt;code&gt;upgrade&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you only remember one mental model, make it this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;akm add&lt;/code&gt; tells akm where content lives&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;akm index&lt;/code&gt; makes that content searchable&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;akm curate&lt;/code&gt; gives the best first shortlist for a request&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;akm search&lt;/code&gt; is for deeper discovery when you need more than the curated list&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;akm show&lt;/code&gt; loads the full thing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything else supports one of those steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  What akm Is Really For
&lt;/h2&gt;

&lt;p&gt;Most teams already have agent assets. They're just scattered.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude Code skills in one folder&lt;/li&gt;
&lt;li&gt;OpenCode commands in another&lt;/li&gt;
&lt;li&gt;project notes in random markdown files&lt;/li&gt;
&lt;li&gt;internal runbooks in a docs repo&lt;/li&gt;
&lt;li&gt;half-remembered lessons buried in old chats&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;akm&lt;/code&gt; turns that mess into a searchable, reusable library.&lt;/p&gt;

&lt;p&gt;For example, imagine a team that ships a web app every week. They might use &lt;code&gt;akm&lt;/code&gt; to unify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;local review and release skills&lt;/li&gt;
&lt;li&gt;a shared Git repo of deployment workflows&lt;/li&gt;
&lt;li&gt;internal docs imported as knowledge&lt;/li&gt;
&lt;li&gt;a production vault that exposes secret &lt;em&gt;keys&lt;/em&gt; without leaking values&lt;/li&gt;
&lt;li&gt;memories like "staging deploys require VPN"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now an agent can start with a curated shortlist for "ship release", load the release workflow, check the deployment vault, read the runbook section it needs, and only fall back to broader search if it needs more options.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. First-Run and Environment Commands
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm setup&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Use this when you want the guided on-ramp.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm setup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: you just installed &lt;code&gt;akm&lt;/code&gt; on a new laptop and want the wizard to create the working stash, configure providers, and build the first index without editing config by hand.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm init&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Use this when you want to skip the wizard and just create the working stash.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm init &lt;span class="nt"&gt;--dir&lt;/span&gt; ~/akm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: you're scripting environment bootstrap for a devcontainer or CI image and want a known stash location without interactive prompts.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm config&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Use this to inspect or change settings.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm config get output.format
akm config &lt;span class="nb"&gt;set &lt;/span&gt;output.detail full
akm config path &lt;span class="nt"&gt;--all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: your agent prefers text output in one repo and JSON in another, or you want to set a default write target for memories and imports.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm info&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Use this as the health check.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm info
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: after setup, you want to confirm the version, active sources, registries, and whether semantic search is actually ready.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm index&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Use this whenever content changed and you want search to reflect it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm index
akm index &lt;span class="nt"&gt;--full&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: you added a GitHub stash, imported some docs, and created two memories. &lt;code&gt;akm index&lt;/code&gt; refreshes the local search database so the agent can discover them.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Source and Registry Commands
&lt;/h2&gt;

&lt;p&gt;These commands answer two related questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;where should akm look for assets right now?&lt;/li&gt;
&lt;li&gt;where can I discover more stashes later?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm add&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;This is how you register a source.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm add ~/.claude/skills
akm add github:your-org/team-agent-toolkit
akm add @scope/platform-stash
akm add https://docs.example.com &lt;span class="nt"&gt;--name&lt;/span&gt; public-docs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;point &lt;code&gt;akm&lt;/code&gt; at your existing Claude Code skills&lt;/li&gt;
&lt;li&gt;pull in a shared team stash from GitHub&lt;/li&gt;
&lt;li&gt;install an npm-published stash&lt;/li&gt;
&lt;li&gt;crawl a documentation site as searchable knowledge&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm list&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Shows what sources are already connected.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: you're debugging why a search result isn't appearing and want to verify whether the expected repo or local directory is even registered.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm update&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Refreshes managed sources.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm update &lt;span class="nt"&gt;--all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: your platform team shipped an updated deployment stash and everyone pulls the latest version before a release.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm remove&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Disconnect a source you no longer want indexed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm remove public-docs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: a website source became noisy or outdated and you want it out of search results.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm clone&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Copies a single asset into your working stash or another directory so you can edit it locally.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm clone skill:code-review
akm clone &lt;span class="s2"&gt;"npm:@scope/platform-stash//workflow:ship-release"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: you find a good community skill, clone it into your local stash, and tailor it for your team's code review conventions.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm save&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Commit local stash changes, and optionally push if the source is writable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm save &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Tighten release workflow"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: your team keeps its shared stash in Git. After improving a workflow and a vault comment, &lt;code&gt;akm save&lt;/code&gt; records the change like normal code.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm registry&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Use registries to discover new stashes you have not installed yet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm registry search &lt;span class="s2"&gt;"code review"&lt;/span&gt;
akm registry add https://example.com/registry/index.json &lt;span class="nt"&gt;--name&lt;/span&gt; team
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: platform engineering publishes an internal stash registry, and teams browse it the same way they'd browse a package registry.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Discovery Commands
&lt;/h2&gt;

&lt;p&gt;This is the heart of the product.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm curate&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Start here for a request or prompt. &lt;code&gt;curate&lt;/code&gt; is the preferred first stop because it returns a tighter, more task-ready shortlist.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm curate &lt;span class="s2"&gt;"review a large pull request"&lt;/span&gt;
akm curate &lt;span class="s2"&gt;"ship a bun release"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: the agent needs a deploy workflow, a release checklist, or a review skill and wants the best few candidates first instead of a broad result set.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm search&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Use this when you want deeper discovery beyond the curated shortlist.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm search &lt;span class="s2"&gt;"review a large pull request"&lt;/span&gt;
akm search &lt;span class="s2"&gt;"kubernetes deploy"&lt;/span&gt; &lt;span class="nt"&gt;--type&lt;/span&gt; workflow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: &lt;code&gt;curate&lt;/code&gt; gave you a solid starting point, but now you want to dig wider, inspect additional assets, or explore the long tail of relevant results.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm show&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Load the full content of a specific asset.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm show skill:code-review
akm show workflow:ship-release
akm show knowledge:incident-runbook section &lt;span class="s2"&gt;"Rollback"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: &lt;code&gt;curate&lt;/code&gt; or &lt;code&gt;search&lt;/code&gt; identifies the right asset; &lt;code&gt;show&lt;/code&gt; gives the agent the actual instructions, prompt template, workflow steps, or document section it needs to act.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Local Knowledge and Operational Context
&lt;/h2&gt;

&lt;p&gt;This is the part of &lt;code&gt;akm&lt;/code&gt; that turns a stash into living local context instead of a static pile of files.&lt;/p&gt;

&lt;p&gt;Some commands capture what your team knows. Others make that knowledge safer or more structured. They belong together because they all define the working context your agent can rely on later.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm remember&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Write a memory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm remember &lt;span class="s2"&gt;"Staging deploys require VPN access"&lt;/span&gt; &lt;span class="nt"&gt;--tag&lt;/span&gt; ops &lt;span class="nt"&gt;--tag&lt;/span&gt; deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: after an incident or a successful fix, you capture the lesson in a searchable format so the next agent run doesn't rediscover it the hard way.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm import&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Bring a document into the stash as knowledge.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm import ./docs/release-checklist.md
akm import https://example.com/internal-guide/auth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: you have a good architecture note or ops runbook outside the stash and want it indexed alongside everything else.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm wiki&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Use wikis for long-lived, agent-maintained knowledge bases.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm wiki create architecture
akm wiki stash architecture ./notes/auth-redesign.md
akm wiki lint architecture
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: your team wants a research or architecture wiki with raw sources, curated pages, and deterministic linting instead of ad hoc markdown sprawl.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;wiki&lt;/code&gt; belongs with local knowledge, not off to the side. It's the command family you reach for when a single imported doc or memory is not enough and you need a maintained body of team knowledge.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm vault&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Use vaults when the agent needs operational context about secrets without seeing the secret values.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm show vault:production
akm vault run vault:production &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nb"&gt;env&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: a deploy workflow needs &lt;code&gt;DATABASE_URL&lt;/code&gt; and &lt;code&gt;DEPLOY_TOKEN&lt;/code&gt;. The agent can verify the keys are present, then load the environment only at execution time.&lt;/p&gt;

&lt;p&gt;Vaults fit here because they are part of the local operating context. They tell the agent what environment shape exists and let commands run safely without exposing secret values in the chat transcript.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Procedure Commands
&lt;/h2&gt;

&lt;p&gt;Once you have the right knowledge and context, the next problem is execution across time.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm workflow&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Use workflows for repeatable, resumable procedures.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm workflow start workflow:ship-release &lt;span class="nt"&gt;--params&lt;/span&gt; &lt;span class="s1"&gt;'{"version":"2.4.0"}'&lt;/span&gt;
akm workflow next workflow:ship-release
akm workflow &lt;span class="nb"&gt;complete &lt;/span&gt;run-123 &lt;span class="nt"&gt;--step&lt;/span&gt; validate &lt;span class="nt"&gt;--notes&lt;/span&gt; &lt;span class="s2"&gt;"Version and branch confirmed"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: shipping a release, rotating secrets, onboarding a new service, or any other multi-step process that should survive across sessions instead of living only in chat history.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Continuous Improvement Commands
&lt;/h2&gt;

&lt;p&gt;This is the loop that makes &lt;code&gt;akm&lt;/code&gt; better over time.&lt;/p&gt;

&lt;p&gt;The flow is simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;an agent uses an asset&lt;/li&gt;
&lt;li&gt;you record whether it helped with &lt;code&gt;feedback&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;you inspect what happened with &lt;code&gt;history&lt;/code&gt; or &lt;code&gt;events&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;you ask for improvements with &lt;code&gt;reflect&lt;/code&gt; or &lt;code&gt;propose&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;you review the result with &lt;code&gt;proposal&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;you distill recurring feedback into reusable lessons with &lt;code&gt;distill&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These commands should be thought about as one system, not as isolated features.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm feedback&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Record whether an asset helped.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm feedback workflow:ship-release &lt;span class="nt"&gt;--positive&lt;/span&gt;
akm feedback skill:legacy-deploy &lt;span class="nt"&gt;--negative&lt;/span&gt; &lt;span class="nt"&gt;--note&lt;/span&gt; &lt;span class="s2"&gt;"Outdated after platform migration"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: over time, assets that consistently help rise in ranking and stale ones become easier to spot.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm history&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Inspect the recorded state changes for an asset or the stash.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm &lt;span class="nb"&gt;history&lt;/span&gt; &lt;span class="nt"&gt;--ref&lt;/span&gt; workflow:ship-release
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: you want to know whether a workflow was searched, shown, or downvoted recently while cleaning up a team's stash.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm events&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Read the append-only realtime event stream.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm events &lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;--format&lt;/span&gt; jsonl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: another process is watching &lt;code&gt;akm&lt;/code&gt; activity and reacting when new feedback, imports, or proposals land.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm improve&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Ask an external agent to propose improvements to an existing asset or to generate a new asset proposal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm improve skill:code-review &lt;span class="nt"&gt;--task&lt;/span&gt; &lt;span class="s2"&gt;"make this stricter about test coverage"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: you have a decent review skill, but you want an agent to improve it based on how it's actually being used.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm propose&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Generate a brand-new asset proposal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm propose workflow incident-rollback &lt;span class="nt"&gt;--task&lt;/span&gt; &lt;span class="s2"&gt;"Rollback procedure for failed production deploys"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: repeated gaps in your stash show up in &lt;code&gt;history&lt;/code&gt; and &lt;code&gt;events&lt;/code&gt;, so you create a first draft for the missing workflow or skill.&lt;/p&gt;

&lt;h3&gt;
  
  
  Proposal Queue
&lt;/h3&gt;

&lt;p&gt;Review, diff, accept, or reject queued proposals.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm proposal list
akm proposal diff 42
akm proposal accept 42
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: keep human review in the loop before generated assets become part of the live stash.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm improve&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Summarize feedback into a reusable lesson proposal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm improve skill:code-review
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: repeated feedback on a skill gets turned into a lesson asset that captures what people learned from using it.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Operator Ergonomics
&lt;/h2&gt;

&lt;p&gt;These are the commands that make the CLI easier to live with day to day.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm help&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Focused help topics, especially migrations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm &lt;span class="nb"&gt;help &lt;/span&gt;migrate latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: you upgraded &lt;code&gt;akm&lt;/code&gt; and want the release-specific migration notes without leaving the terminal.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm hints&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Print instructions you can drop into &lt;code&gt;AGENTS.md&lt;/code&gt; or &lt;code&gt;CLAUDE.md&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm hints
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: you want every project to tell its coding agent how to use the local &lt;code&gt;akm&lt;/code&gt; installation.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm completions&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Generate or install shell completion.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm completions &lt;span class="nt"&gt;--install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: you use &lt;code&gt;akm&lt;/code&gt; daily and want tab completion for commands and flags.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;akm upgrade&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Upgrade the &lt;code&gt;akm&lt;/code&gt; binary itself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm upgrade &lt;span class="nt"&gt;--check&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real-world use: you installed the standalone binary and want to see whether a newer release is available.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. The Commands People Use Most
&lt;/h2&gt;

&lt;p&gt;In practice, most teams live in a much smaller subset of the CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm setup
akm add ...
akm index
akm curate &lt;span class="s2"&gt;"..."&lt;/span&gt;
akm show &amp;lt;ref&amp;gt;
akm remember &lt;span class="s2"&gt;"..."&lt;/span&gt;
akm feedback &amp;lt;ref&amp;gt; &lt;span class="nt"&gt;--positive&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your use case grows, the rest of the command surface is there:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;workflow&lt;/code&gt; when procedures need state&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;wiki&lt;/code&gt; when local knowledge needs structure&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vault&lt;/code&gt; when local operational context includes secrets&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;registry&lt;/code&gt; when discovery goes beyond your local stash&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;feedback&lt;/code&gt; / &lt;code&gt;history&lt;/code&gt; / &lt;code&gt;events&lt;/code&gt; / &lt;code&gt;reflect&lt;/code&gt; / &lt;code&gt;propose&lt;/code&gt; / &lt;code&gt;proposal&lt;/code&gt; / &lt;code&gt;distill&lt;/code&gt; when you want a real improvement loop&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A Simple End-to-End Example
&lt;/h2&gt;

&lt;p&gt;Let's say your team is onboarding a new service.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;akm add github:your-org/platform-stash&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;akm add ./docs/runbooks&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;akm index&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Start with &lt;code&gt;akm curate "onboard a new service"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Open the best match with &lt;code&gt;akm show workflow:service-onboarding&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Check required environment keys with &lt;code&gt;akm show vault:staging&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Add the final onboarding notes to the team wiki with &lt;code&gt;akm wiki stash onboarding ./notes/service-onboarding.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Capture a new lesson with &lt;code&gt;akm remember "Service onboarding requires DNS approval from ops" --tag ops&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Record whether the workflow helped with &lt;code&gt;akm feedback workflow:service-onboarding --positive&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;If the workflow was weak, run &lt;code&gt;akm reflect workflow:service-onboarding --task "improve this after the latest run"&lt;/code&gt; or &lt;code&gt;akm distill workflow:service-onboarding&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's &lt;code&gt;akm&lt;/code&gt; in a nutshell: connect sources, index them, find what matters, load only what you need, and keep the library getting better.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Takeaway
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;akm&lt;/code&gt; is not trying to replace your coding assistant. It's the layer that makes your assistant's skills, docs, procedures, and institutional memory manageable at scale.&lt;/p&gt;

&lt;p&gt;If you want the one-sentence version:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;akm&lt;/code&gt; is the command line system that helps agents discover, load, share, improve, and safely reuse the capabilities they need to do real work.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And if you're wondering where to start, start here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm setup
akm add ~/.claude/skills
akm add github:your-org/team-agent-toolkit
akm index
akm curate &lt;span class="s2"&gt;"code review"&lt;/span&gt;
akm show skill:code-review
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That gets you from "I installed it" to "my agent can actually use it" in a few minutes.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>cli</category>
      <category>productivity</category>
    </item>
    <item>
      <title>akm 0.7.0: Proposal Queue, Reflection Commands, Lessons, and akm-bench</title>
      <dc:creator>IT Lackey</dc:creator>
      <pubDate>Tue, 05 May 2026 02:20:48 +0000</pubDate>
      <link>https://dev.to/itlackey/akm-070-proposal-queue-reflection-commands-lessons-and-akm-bench-4lbl</link>
      <guid>https://dev.to/itlackey/akm-070-proposal-queue-reflection-commands-lessons-and-akm-bench-4lbl</guid>
      <description>&lt;p&gt;akm 0.7.0 is out. This is the last pre-1.0 ship in the v1 cycle. The headline features are a durable proposal queue that routes all agent-suggested changes through a single reviewable path, three new CLI surfaces (&lt;code&gt;reflect&lt;/code&gt;, &lt;code&gt;propose&lt;/code&gt;, &lt;code&gt;distill&lt;/code&gt;) that write into that queue, a &lt;code&gt;lesson&lt;/code&gt; asset type for synthesized knowledge, per-call-site LLM feature gates that are all off by default, and a paired-run benchmarking framework (&lt;code&gt;akm-bench&lt;/code&gt;) for measuring whether your stash actually improves agent outcomes. A batch of security, UX, and hygiene hardening rounds out the release.&lt;/p&gt;

&lt;p&gt;If you are on 0.6.x, the v1 migration guide covers the per-surface delta. The upgrade is opt-in — everything new requires explicit configuration or a new command invocation.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Proposal queue&lt;/strong&gt; (&lt;code&gt;akm proposal list/show/diff/accept/reject&lt;/code&gt;) — all agent-generated changes flow through a durable queue before touching your stash.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;akm reflect&lt;/code&gt;, &lt;code&gt;akm propose&lt;/code&gt;, &lt;code&gt;akm distill&lt;/code&gt;&lt;/strong&gt; — three new commands that produce proposals without mutating live stash content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;lesson&lt;/code&gt; asset type&lt;/strong&gt; — first-class synthesized knowledge, produced by &lt;code&gt;akm distill&lt;/code&gt; and promoted via &lt;code&gt;akm proposal accept&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;llm.features.*&lt;/code&gt; map&lt;/strong&gt; — seven opt-in gates (all &lt;code&gt;false&lt;/code&gt; by default) for bounded in-tree LLM call sites.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;quality: "proposed"&lt;/code&gt;&lt;/strong&gt; — proposed assets are excluded from default search; surface them via &lt;code&gt;--include-proposed&lt;/code&gt; or &lt;code&gt;akm proposal *&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;akm-bench&lt;/code&gt; v1&lt;/strong&gt; — paired noakm/akm runs, per-ref attribution, delta reporting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security hardening&lt;/strong&gt; — git message sanitization, bench env isolation, LLM body redaction, npm tarball host validation.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Proposal queue (&lt;code&gt;akm proposal *&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;The fundamental problem with agent-generated suggestions is trust: you want to capture what the agent learned without blindly writing unreviewed content into your stash. The proposal queue solves this by separating generation from promotion.&lt;/p&gt;

&lt;p&gt;All proposal-producing commands write to a durable queue that lives outside the asset tree. Unaccepted drafts never appear in search results or get committed. When you're ready to accept a proposal, &lt;code&gt;akm proposal accept&lt;/code&gt; runs full validation and then routes the write through the same &lt;code&gt;writeAssetToSource()&lt;/code&gt; path used by &lt;code&gt;akm remember&lt;/code&gt; and &lt;code&gt;akm import&lt;/code&gt; — no special handling, no bypass.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm proposal list                       &lt;span class="c"&gt;# list pending proposals&lt;/span&gt;
akm proposal show &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;                  &lt;span class="c"&gt;# render one proposal&lt;/span&gt;
akm proposal diff &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;                  &lt;span class="c"&gt;# diff vs. the live ref&lt;/span&gt;
akm proposal accept &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;                &lt;span class="c"&gt;# validate, then promote to stash&lt;/span&gt;
akm proposal reject &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;--reason&lt;/span&gt; &lt;span class="s2"&gt;"…"&lt;/span&gt;  &lt;span class="c"&gt;# archive with reason&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Multiple proposals for the same ref coexist without filesystem collisions. Auto-accept can be enabled per-source via &lt;code&gt;autoAcceptProposals: true&lt;/code&gt; in your stash config (requires a writable source, defaults off).&lt;/p&gt;

&lt;h2&gt;
  
  
  Three new commands: &lt;code&gt;reflect&lt;/code&gt;, &lt;code&gt;propose&lt;/code&gt;, &lt;code&gt;distill&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;These three commands are the primary way to generate proposals.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm reflect &lt;span class="o"&gt;[&lt;/span&gt;ref] &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;--task&lt;/span&gt; ...]        &lt;span class="c"&gt;# reflect on an asset and propose improvements&lt;/span&gt;
akm propose &amp;lt;&lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &amp;lt;name&amp;gt; &lt;span class="nt"&gt;--task&lt;/span&gt; &lt;span class="s2"&gt;"…"&lt;/span&gt;  &lt;span class="c"&gt;# generate a new asset as a proposal&lt;/span&gt;
akm distill &amp;lt;ref&amp;gt;                     &lt;span class="c"&gt;# synthesize a lesson from an asset&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;reflect&lt;/code&gt; and &lt;code&gt;propose&lt;/code&gt; shell out to your configured agent CLI and write only to the proposal queue — they never mutate live stash content. &lt;code&gt;distill&lt;/code&gt; is a bounded in-tree LLM call, gated behind &lt;code&gt;llm.features.feedback_distillation&lt;/code&gt;, that produces a &lt;code&gt;lesson&lt;/code&gt;-type proposal from an existing asset.&lt;/p&gt;

&lt;p&gt;All three emit usage events so you can track which workflows you're actually using.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;lesson&lt;/code&gt; asset type
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;lesson&lt;/code&gt; is a new first-class asset type designed for synthesized knowledge — the kind your agent derives from experience rather than imports from a source. Lessons are stored under &lt;code&gt;lessons/&amp;lt;name&amp;gt;.md&lt;/code&gt; in your working stash, parallel to &lt;code&gt;memories/&lt;/code&gt;. Required frontmatter: &lt;code&gt;description&lt;/code&gt; and &lt;code&gt;when_to_use&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The canonical workflow: &lt;code&gt;akm distill &amp;lt;ref&amp;gt;&lt;/code&gt; produces a lesson proposal → &lt;code&gt;akm proposal list&lt;/code&gt; shows it → &lt;code&gt;akm proposal accept &amp;lt;id&amp;gt;&lt;/code&gt; promotes it to your stash. Direct authoring via &lt;code&gt;akm import&lt;/code&gt; or &lt;code&gt;akm remember&lt;/code&gt;-style flows is also supported if you want to write lessons manually.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;llm.features.*&lt;/code&gt; — opt-in LLM gates
&lt;/h2&gt;

&lt;p&gt;Every bounded in-tree LLM call site is now gated behind exactly one feature flag. All defaults are &lt;code&gt;false&lt;/code&gt;, so enabling the schema has no effect until you opt in. Seven flags ship in 0.7.0:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Key&lt;/th&gt;
&lt;th&gt;What it enables&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;curate_rerank&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;LLM rerank in &lt;code&gt;akm curate&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tag_dedup&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;LLM tag dedup during indexer enrichment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;memory_consolidation&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;akm remember --enrich&lt;/code&gt; consolidation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;feedback_distillation&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;akm distill &amp;lt;ref&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;embedding_fallback_score&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Scorer fallback when embeddings unavailable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;memory_inference&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Indexer split of pending memories into atomic facts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;graph_extraction&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Indexer entity/relation extraction → SQLite graph tables&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Turn on what you want:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm config &lt;span class="nb"&gt;set &lt;/span&gt;llm.features.feedback_distillation &lt;span class="nb"&gt;true
&lt;/span&gt;akm config &lt;span class="nb"&gt;set &lt;/span&gt;llm.features.memory_consolidation &lt;span class="nb"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every gated call site uses the &lt;code&gt;tryLlmFeature()&lt;/code&gt; wrapper from &lt;code&gt;src/llm/feature-gate.ts&lt;/code&gt;, which guarantees: disabled → fallback returned without ever calling the LLM; throw → error swallowed, fallback returned; timeout → 30-second hard limit, fallback returned.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;quality: "proposed"&lt;/code&gt; and &lt;code&gt;--include-proposed&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;SearchHit.quality&lt;/code&gt; now has three well-known values: &lt;code&gt;"generated"&lt;/code&gt;, &lt;code&gt;"curated"&lt;/code&gt;, and &lt;code&gt;"proposed"&lt;/code&gt;. The first two appear in default search. Proposed assets are &lt;strong&gt;excluded by default&lt;/strong&gt; — they only surface via &lt;code&gt;akm search ... --include-proposed&lt;/code&gt; or via the &lt;code&gt;akm proposal *&lt;/code&gt; commands. Unknown quality values parse-warn-include so plugin authors can extend the set without breaking the indexer.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;akm-bench&lt;/code&gt; v1
&lt;/h2&gt;

&lt;p&gt;Bench grows from a smoke test into a paired-utility framework:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Track A — paired noakm/akm runs.&lt;/strong&gt; For each task, bench runs your agent CLI twice (without and with akm available), captures per-tool-call utility, and emits a comparable score pair.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track B — registry attribution.&lt;/strong&gt; Utility deltas are mapped back to specific &lt;code&gt;[origin//]type:name&lt;/code&gt; refs so you can see which assets in your stash actually contributed to the improvement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;akm-bench compare&lt;/code&gt;&lt;/strong&gt; — aggregates paired runs into a delta report.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;akm-bench attribute&lt;/code&gt;&lt;/strong&gt; — surfaces the per-ref attribution report.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm-bench compare results/noakm results/akm
akm-bench attribute results/akm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The technical reference is at &lt;a href="//../technical/benchmark.md"&gt;&lt;code&gt;docs/technical/benchmark.md&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security hardening (PR #275)
&lt;/h2&gt;

&lt;p&gt;Five security, UX, and hygiene issues landed together in the pre-prod hardening batch:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;#270 — git message sanitization.&lt;/strong&gt; Commit messages and remote URLs written by akm are sanitized to prevent shell-substitution and control-character injection through user-supplied content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;#271 — bench env isolation.&lt;/strong&gt; Each agent invocation in &lt;code&gt;akm-bench&lt;/code&gt; runs in a scrubbed environment so host secrets don't leak into bench transcripts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;#272 — LLM body redact + npm tarball host validation.&lt;/strong&gt; Outbound LLM request/response bodies are redacted in error reporting before surfacing to stderr. &lt;code&gt;akm add npm:…&lt;/code&gt; now validates the tarball download host against your configured npm registry instead of blindly following arbitrary &lt;code&gt;dist.tarball&lt;/code&gt; URLs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;UX:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;#273 — workflow noise gate, stashes deprecation warn, setup &lt;code&gt;--help&lt;/code&gt;.&lt;/strong&gt; &lt;code&gt;akm workflow next/complete/status&lt;/code&gt; no longer print spurious progress noise on quiet runs. Configs using the legacy &lt;code&gt;stashes[]&lt;/code&gt; key now emit a single deprecation warning per process (was: per call site). &lt;code&gt;akm setup --help&lt;/code&gt; renders the full help block.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Hygiene:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;#274 — tsconfig + HF pin + shapes throw.&lt;/strong&gt; &lt;code&gt;tsconfig.json&lt;/code&gt; now covers &lt;code&gt;tests/&lt;/code&gt; so &lt;code&gt;bunx tsc --noEmit&lt;/code&gt; catches test-file errors. The HF embeddings model is pinned to a specific revision. The output-shape registry now throws on a missing shape rather than silently falling back to &lt;code&gt;JSON.stringify&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;#276 — bench tmp redirect.&lt;/strong&gt; &lt;code&gt;akm-bench&lt;/code&gt; no longer writes scratch state under &lt;code&gt;/tmp&lt;/code&gt;; everything lands under &lt;code&gt;~/.cache/akm/bench/&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Upgrade
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; akm-cli@0.7.0
&lt;span class="c"&gt;# or&lt;/span&gt;
bun &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; akm-cli@0.7.0
&lt;span class="c"&gt;# or from an existing install&lt;/span&gt;
akm upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Verify:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm info &lt;span class="nt"&gt;--format&lt;/span&gt; text     &lt;span class="c"&gt;# version 0.7.x&lt;/span&gt;
akm proposal list          &lt;span class="c"&gt;# queue starts empty — that's expected&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Try the new surfaces:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm setup                                            &lt;span class="c"&gt;# detects installed agent CLIs&lt;/span&gt;
akm config &lt;span class="nb"&gt;set &lt;/span&gt;llm.features.feedback_distillation &lt;span class="nb"&gt;true
&lt;/span&gt;akm distill memory:my-debugging-notes               &lt;span class="c"&gt;# produces a lesson proposal&lt;/span&gt;
akm proposal list
akm proposal accept &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No manual migration is required for users on 0.6.x with no &lt;code&gt;agent&lt;/code&gt; or &lt;code&gt;llm.features&lt;/code&gt; blocks configured. Everything new is opt-in.&lt;/p&gt;

&lt;p&gt;Full details in the &lt;a href="//../migration/v1.md"&gt;v1 migration guide&lt;/a&gt; and the &lt;a href="//../migration/release-notes/0.7.0.md"&gt;0.7.0 release notes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Full changelog at &lt;a href="https://github.com/itlackey/akm/blob/main/.github/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG.md&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>cli</category>
      <category>release</category>
    </item>
    <item>
      <title>Building Agent Knowledge Bases That Actually Scale</title>
      <dc:creator>IT Lackey</dc:creator>
      <pubDate>Tue, 05 May 2026 02:19:53 +0000</pubDate>
      <link>https://dev.to/itlackey/building-agent-knowledge-bases-that-actually-scale-23pb</link>
      <guid>https://dev.to/itlackey/building-agent-knowledge-bases-that-actually-scale-23pb</guid>
      <description>&lt;p&gt;This is part eight in a series about managing the growing pile of skills, scripts, and context that AI coding agents depend on. &lt;a href="https://dev.to/itlackey/your-ai-agents-skill-list-is-getting-out-of-hand-32ck"&gt;Part one&lt;/a&gt; introduced progressive disclosure. &lt;a href="https://dev.to/itlackey/you-already-have-dozens-of-agent-skills-you-just-cant-find-them-bpo"&gt;Part two&lt;/a&gt; unified your local assets across platforms. &lt;a href="https://dev.to/itlackey/your-agents-memory-shouldnt-disappear-when-the-session-ends"&gt;Part three&lt;/a&gt; added persistent memory. Previous parts addressed teams, distributed stashes, and community knowledge.&lt;/p&gt;

&lt;p&gt;This one is about a different problem: knowledge accumulation.&lt;/p&gt;

&lt;p&gt;You start a new research area — say, LLM inference optimization. You read papers. You take notes. You save PDFs. Your agent writes summaries, discovers connections, asks follow-up questions that lead to more notes. Six weeks later you have a pile of markdown files, half-digested papers in a downloads folder, and a memory that says "we covered KV cache quantization somewhere." You search for it. You get three files with different partial takes on the same topic. None of them have the answer you need.&lt;/p&gt;

&lt;p&gt;This isn't a storage problem. You have all the information. It's a structural problem — and that's what akm's multi-wiki support is built to fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Karpathy's LLM Wiki Pattern
&lt;/h2&gt;

&lt;p&gt;In a GitHub gist, Andrej Karpathy described a pattern for maintaining a markdown knowledge base that a human and LLM build and maintain together. The core idea is deceptively simple: a structured directory of markdown pages, with an agent responsible for synthesizing incoming information into those pages over time.&lt;/p&gt;

&lt;p&gt;The insight is that agents are genuinely good at certain things that humans find tedious. Summarizing a 40-page paper into a two-paragraph page entry. Finding the connection between a new paper and something already in the knowledge base. Keeping a log of what was added and why. Updating an existing page when new information contradicts or extends it.&lt;/p&gt;

&lt;p&gt;What agents are not good at: maintaining invariants. An agent won't reliably enforce slug uniqueness. It won't regenerate an index consistently. It will sometimes overwrite a source file you meant to keep immutable. It loses track of what's been ingested when sessions end.&lt;/p&gt;

&lt;p&gt;So you need a division of labor. The agent does the synthesis. The tooling enforces the invariants. That's the gap akm's wiki support fills.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: Knowledge That Accumulates and Gets Lost
&lt;/h2&gt;

&lt;p&gt;Most developers hit this in one of two ways.&lt;/p&gt;

&lt;p&gt;The first way: you import a file as a knowledge asset (&lt;code&gt;akm import ./paper.md&lt;/code&gt;) and your agent reads it directly. That works fine for one or two documents. At ten documents, the agent is loading full text into every relevant session. At thirty documents, you're spending tokens on context you don't need, and the agent is trying to mentally synthesize relationships across thirty separate files per session. Nothing is connected. Nothing is indexed.&lt;/p&gt;

&lt;p&gt;The second way: you ask your agent to "take notes" in a notes.md file. The file grows. It becomes a wall of text with no structure. Searching it is grep. Updating it means the agent has to read the whole thing before writing anything. After a few sessions the agent starts ignoring sections it wrote two weeks ago because they're below the fold.&lt;/p&gt;

&lt;p&gt;Both patterns fail in the same way: there's no structural home for the knowledge. No schema that says what a page is. No index that makes things findable. No log that tracks what happened. No separation between raw sources and synthesized pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  How akm's Multi-Wiki Works
&lt;/h2&gt;

&lt;p&gt;A wiki in akm is a named subdirectory under &lt;code&gt;~/akm/wikis/&lt;/code&gt;. Each wiki has a fixed structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/akm/wikis/
  research/
    schema.md       # per-wiki rulebook: page kinds, voice, contradiction policy
    index.md        # catalog of all pages — regenerated by akm index
    log.md          # append-only activity log
    raw/            # immutable ingested sources (never edit these)
    attention.md    # a synthesized page
    transformers/
      architecture.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You create a wiki with one command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm wiki create research
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That scaffolds the directory, stubs out &lt;code&gt;schema.md&lt;/code&gt; with sensible defaults, creates empty &lt;code&gt;index.md&lt;/code&gt; and &lt;code&gt;log.md&lt;/code&gt;, and makes the &lt;code&gt;raw/&lt;/code&gt; directory. You're not starting from a blank directory — you're starting from a structural contract.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;schema.md&lt;/code&gt; file is important. It's where you define the rules for this particular wiki: what page kinds are allowed, what the voice should be, how contradictions are handled, what the minimum viable page looks like. You edit it once when you create the wiki, and the agent reads it at the start of every ingest session. It's the wiki's constitution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Walking Through a Real Workflow
&lt;/h2&gt;

&lt;p&gt;Say you're building a research wiki on transformer architectures. You have a paper PDF, some notes from a talk, and a few bookmarked articles.&lt;/p&gt;

&lt;p&gt;Start by bringing in the raw sources:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm wiki stash research ./attention-paper.pdf &lt;span class="nt"&gt;--as&lt;/span&gt; attention
akm wiki stash research ./transformer-scaling-notes.md &lt;span class="nt"&gt;--as&lt;/span&gt; scaling-notes
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"# Key quote from Sutton talk"&lt;/span&gt; | akm wiki stash research -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;stash&lt;/code&gt; command copies each source into &lt;code&gt;raw/&lt;/code&gt; with a unique slug. If you try to stash the same slug twice, it errors rather than overwriting. That's one of those invariants the agent can't reliably maintain — akm handles it.&lt;/p&gt;

&lt;p&gt;Now ask your agent to start the ingest workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm wiki ingest research
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This dispatches the configured agent (from &lt;code&gt;config.defaults.agent&lt;/code&gt; or &lt;code&gt;--profile&lt;/code&gt;) with the wiki's ingest workflow as its prompt. The workflow tells the agent to: read &lt;code&gt;schema.md&lt;/code&gt; to understand the page structure, check &lt;code&gt;index.md&lt;/code&gt; to see what pages already exist, read each unprocessed file in &lt;code&gt;raw/&lt;/code&gt;, synthesize content into pages using Write or Edit, update &lt;code&gt;index.md&lt;/code&gt;, append a summary to &lt;code&gt;log.md&lt;/code&gt;. &lt;code&gt;akm&lt;/code&gt; owns the schema-aware commands (stash, search, lint, index, show); the agent owns the reasoning.&lt;/p&gt;

&lt;p&gt;After the agent runs the ingest workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm wiki pages research
&lt;span class="c"&gt;# → research/attention.md   "Self-attention mechanism and complexity analysis"&lt;/span&gt;
&lt;span class="c"&gt;# → research/transformers/architecture.md   "Encoder-decoder structure, residual connections"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Later, when you want to check the health of the wiki:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm wiki lint research
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lint runs deterministic structural checks: orphan pages (not in index.md), broken xrefs in frontmatter, missing descriptions, raw files that appear uncited in any page, and whether the index is stale relative to the directory contents. These are checks that require counting and comparing file state — exactly the kind of thing agents do inconsistently.&lt;/p&gt;

&lt;h2&gt;
  
  
  The "akm Surfaces, the Agent Writes" Principle
&lt;/h2&gt;

&lt;p&gt;This division of labor is worth making explicit, because it determines what belongs in akm and what doesn't.&lt;/p&gt;

&lt;p&gt;akm handles operations that require invariants an agent can't reliably enforce across sessions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scaffolding (ensures required files exist with the right names)&lt;/li&gt;
&lt;li&gt;Source import (unique slugs, never overwrites, immutable raw/)&lt;/li&gt;
&lt;li&gt;Lint (deterministic structural checks against file system state)&lt;/li&gt;
&lt;li&gt;Index regeneration (consistent format, triggered by normal indexing)&lt;/li&gt;
&lt;li&gt;Workflow printing (a recipe the agent can follow without reinventing it)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The agent handles everything that requires judgment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Writing and updating pages&lt;/li&gt;
&lt;li&gt;Synthesizing connections between sources&lt;/li&gt;
&lt;li&gt;Deciding what a page should say and how to structure it&lt;/li&gt;
&lt;li&gt;Appending meaningful log entries&lt;/li&gt;
&lt;li&gt;Adding xrefs in frontmatter&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The reason this split matters: agents are good at synthesis and bad at reliability. If you ask an agent to "update the index," it will sometimes do it correctly, sometimes produce a subtly wrong format, and sometimes forget. If you ask it to write a page on attention mechanisms from three source documents, it will do that well every time. The tool enforces the boring, brittle parts so the agent can focus on what it's actually good at.&lt;/p&gt;

&lt;p&gt;There are no unconditional LLM calls inside akm for wiki operations. The wiki commands are pure file operations, SQLite, and structural analysis — fast, deterministic, and usable offline. (akm does ship bounded opt-in LLM calls for other workflows, like &lt;code&gt;akm improve&lt;/code&gt; and &lt;code&gt;akm curate&lt;/code&gt;, gated behind per-process toggles under &lt;code&gt;profiles.improve.&amp;lt;name&amp;gt;.processes.*&lt;/code&gt; and the first-class &lt;code&gt;index.*&lt;/code&gt; / &lt;code&gt;search.*&lt;/code&gt; feature sections — all off by default. But the wiki tooling itself never touches an LLM.)&lt;/p&gt;

&lt;h2&gt;
  
  
  akm wiki search vs akm search --type wiki
&lt;/h2&gt;

&lt;p&gt;Once you have a few wikis, you'll use two different search paths depending on what you need.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;akm wiki search research "attention mechanism"&lt;/code&gt; runs a scoped search within the &lt;code&gt;research&lt;/code&gt; wiki only. Use this when you know which wiki holds the answer and you want precision — no noise from other wikis or other asset types. The results are page refs with descriptions, scoped to &lt;code&gt;research/&lt;/code&gt;. Raw sources under &lt;code&gt;raw/&lt;/code&gt; plus the wiki root infrastructure files &lt;code&gt;schema.md&lt;/code&gt;, &lt;code&gt;index.md&lt;/code&gt;, and &lt;code&gt;log.md&lt;/code&gt; are excluded from the search index and never appear as search hits.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;akm search --type wiki "attention mechanism"&lt;/code&gt; runs the full stash-wide search across all wiki pages. Use this when you're not sure which wiki something lives in, or when you want to see if anything from multiple wikis is relevant to a task before loading anything.&lt;/p&gt;

&lt;p&gt;In practice: scoped search during active work in a specific domain, wide search when starting a new session or doing cross-domain research. Wiki pages participate in the same FTS5 scoring pipeline as every other asset type, so &lt;code&gt;--type wiki&lt;/code&gt; is not a second-class citizen — a highly relevant wiki page will outrank a mediocre skill in a general search.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Example: Building a Research Wiki
&lt;/h2&gt;

&lt;p&gt;Here's the complete workflow for setting up and using a research wiki from scratch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Initial setup:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm wiki create research
&lt;span class="c"&gt;# Edit wikis/research/schema.md to define your page kinds&lt;/span&gt;
&lt;span class="c"&gt;# (technical-summary, comparison, open-question, etc.)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Bring in sources as you find them:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm wiki stash research ./papers/attention-is-all-you-need.pdf &lt;span class="nt"&gt;--as&lt;/span&gt; attention-2017
akm wiki stash research ./papers/flash-attention-v2.pdf &lt;span class="nt"&gt;--as&lt;/span&gt; flash-attention-v2
akm wiki stash research ./notes/scaling-laws-talk.md &lt;span class="nt"&gt;--as&lt;/span&gt; scaling-laws-notes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Run ingest when you're ready to synthesize:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm wiki ingest research
&lt;span class="c"&gt;# Agent reads the recipe, reads raw/ files, writes pages, updates index, logs activity&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Check what exists:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm wiki pages research
akm wiki show research
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Search when working on a related task:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm wiki search research &lt;span class="s2"&gt;"KV cache memory"&lt;/span&gt;
&lt;span class="c"&gt;# Returns: research/attention.md, research/flash-attention/optimization.md&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Lint before a long agent session to catch structural drift:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm wiki lint research
&lt;span class="c"&gt;# Orphans: none&lt;/span&gt;
&lt;span class="c"&gt;# Broken xrefs: research/flash-attention/optimization.md → research/kv-cache.md (missing)&lt;/span&gt;
&lt;span class="c"&gt;# Stale index: yes (run akm index)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Fix the stale index:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm index
&lt;span class="c"&gt;# Rebuilds SQLite search index, regenerates wikis/research/index.md as a side effect&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At the end of a few weeks, you have a structured, searchable knowledge base. Your agent can load specific pages by ref instead of reading all thirty raw sources every session. You can run lint any time to catch drift. The log tells you what was synthesized and when. The raw sources are still there if you ever need to re-derive something from primary material.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Isn't
&lt;/h2&gt;

&lt;p&gt;Multi-wiki is not a document management system. If you want to store and retrieve original documents, &lt;code&gt;akm import&lt;/code&gt; and the &lt;code&gt;knowledge&lt;/code&gt; type already do that.&lt;/p&gt;

&lt;p&gt;It's not a notes app. Single notes go in memories. Reference material goes in knowledge. Wikis are specifically for synthesized, structured knowledge that grows over time through an active ingest process.&lt;/p&gt;

&lt;p&gt;As of 0.8.0, &lt;code&gt;akm wiki ingest &amp;lt;name&amp;gt;&lt;/code&gt; dispatches the configured agent (&lt;code&gt;defaults.agent&lt;/code&gt; or &lt;code&gt;--profile&lt;/code&gt;) to execute the ingest workflow end-to-end. The agent reads the schema, finds related pages, creates new pages, updates xrefs, appends to &lt;code&gt;log.md&lt;/code&gt;, and reindexes — all through &lt;code&gt;akm&lt;/code&gt;'s schema-aware commands. The wiki tooling owns the invariants; the agent owns the reasoning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;Multi-wiki has been available since akm 0.5.0. If you're already using akm, upgrade and try:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm wiki create research
akm wiki list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;a href="https://github.com/itlackey/akm/blob/main/docs/getting-started.md" rel="noopener noreferrer"&gt;Getting Started guide&lt;/a&gt; covers initial setup if you're new to akm. The wiki commands are available immediately once you have a stash configured.&lt;/p&gt;

&lt;p&gt;If you're working in a domain where knowledge accumulates — research, security analysis, architecture decisions, competitive analysis — give it a run and see if the structure helps. The repo is at &lt;a href="https://github.com/itlackey/akm" rel="noopener noreferrer"&gt;github.com/itlackey/akm&lt;/a&gt;. Questions and feedback in the issues.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>cli</category>
      <category>knowledge</category>
    </item>
    <item>
      <title>Agents That Remember Where They Were</title>
      <dc:creator>IT Lackey</dc:creator>
      <pubDate>Tue, 05 May 2026 02:19:50 +0000</pubDate>
      <link>https://dev.to/itlackey/agents-that-remember-where-they-were-1koe</link>
      <guid>https://dev.to/itlackey/agents-that-remember-where-they-were-1koe</guid>
      <description>&lt;p&gt;This is part nine in a series about managing the growing pile of skills, scripts, and context that AI coding agents depend on. &lt;a href="https://dev.to/itlackey/your-ai-agents-skill-list-is-getting-out-of-hand-32ck"&gt;Part one&lt;/a&gt; introduced progressive disclosure. &lt;a href="https://dev.to/itlackey/you-already-have-dozens-of-agent-skills-you-just-cant-find-them-bpo"&gt;Part two&lt;/a&gt; unified your local assets across platforms. &lt;a href="https://dev.to/itlackey"&gt;Part seven&lt;/a&gt; covered shared team skills via Git repos.&lt;/p&gt;

&lt;p&gt;Ask an agent to ship a release and it will start confidently. It runs the build, opens the changelog, checks the branch. Then something interrupts the session — you close the terminal, the context window fills up, you need to switch tasks. When you come back, the agent has no idea where it left off. You either restart from scratch or spend time reconstructing what happened.&lt;/p&gt;

&lt;p&gt;This is the central problem with agents and multi-step work. They're good at individual tasks. They're not naturally good at procedures — sequences of steps that span time, accumulate state, and need to be resumable when interrupted.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;akm&lt;/code&gt; ships three features that address this directly: workflow assets for stored, resumable procedures; vault assets for secret-aware environment config; and a writable git stash that keeps your skill collection in sync across machines. This post explains what each one does and how they fit together.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: Tasks Versus Procedures
&lt;/h2&gt;

&lt;p&gt;A task is "write this function." A procedure is "ship this release." Tasks have a beginning and end that fit inside a single context window. Procedures have steps, dependencies between steps, and state that persists across sessions.&lt;/p&gt;

&lt;p&gt;When agents handle procedures today, the state lives only in the conversation. That's fine for a five-minute task. It breaks down for anything that takes an hour, involves multiple sessions, or needs to be audited later. If something fails at step four of seven, there's no standard way to resume at step five without replaying the whole context.&lt;/p&gt;

&lt;p&gt;The workaround most developers reach for is a checklist in a markdown file. The agent checks off items as it goes. This works, but it's manual, fragile, and the state isn't queryable. You can't ask "which deployments are currently in-progress" if the state is scattered across markdown checkboxes in different files.&lt;/p&gt;

&lt;p&gt;Workflow assets are the structured version of that checklist.&lt;/p&gt;

&lt;h2&gt;
  
  
  Workflow Assets: Stored Procedures Your Agent Can Step Through
&lt;/h2&gt;

&lt;p&gt;Workflows live in &lt;code&gt;workflows/&lt;/code&gt; in your stash. Each workflow is a markdown file with frontmatter declaring the procedure's parameters and a standard step format. You write the workflow once; the agent follows it on every run.&lt;/p&gt;

&lt;p&gt;Here's what a release workflow looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Ship a production release&lt;/span&gt;
&lt;span class="na"&gt;params&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;version&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;to&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;release&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;(e.g.&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;1.2.3)"&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="gh"&gt;# Workflow: Ship Release&lt;/span&gt;

&lt;span class="gu"&gt;## Step: Validate inputs&lt;/span&gt;
Step ID: validate
&lt;span class="gu"&gt;### Instructions&lt;/span&gt;
Check that version follows semver and that the release branch exists.
&lt;span class="gu"&gt;### Completion Criteria&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Version matches x.y.z
&lt;span class="p"&gt;-&lt;/span&gt; Branch release/{{ version }} exists

&lt;span class="gu"&gt;## Step: Build&lt;/span&gt;
Step ID: build
&lt;span class="gu"&gt;### Instructions&lt;/span&gt;
Run &lt;span class="sb"&gt;`bun run build`&lt;/span&gt; and verify dist/ was generated.

&lt;span class="gu"&gt;## Step: Deploy to staging&lt;/span&gt;
Step ID: staging
&lt;span class="gu"&gt;### Instructions&lt;/span&gt;
Run &lt;span class="sb"&gt;`./scripts/deploy.sh staging`&lt;/span&gt; and verify the health check passes.

&lt;span class="gu"&gt;## Step: Deploy to production&lt;/span&gt;
Step ID: production
&lt;span class="gu"&gt;### Instructions&lt;/span&gt;
Run &lt;span class="sb"&gt;`./scripts/deploy.sh production`&lt;/span&gt; after staging health check is green.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The workflow defines the procedure. To run it, the agent creates a &lt;em&gt;run&lt;/em&gt; — an instance of that procedure with a specific set of params:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm workflow start workflow:ship-release &lt;span class="nt"&gt;--params&lt;/span&gt; &lt;span class="s1"&gt;'{"version":"1.2.3"}'&lt;/span&gt;
&lt;span class="c"&gt;# Returns a run ID: run-abc123&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the procedure has state. The agent calls &lt;code&gt;akm workflow next&lt;/code&gt; to get the current actionable step:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm workflow next workflow:ship-release
&lt;span class="c"&gt;# Returns: Step "validate" — Check that version follows semver...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the agent completes a step, it marks it done with notes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm workflow &lt;span class="nb"&gt;complete &lt;/span&gt;run-abc123 &lt;span class="nt"&gt;--step&lt;/span&gt; validate &lt;span class="nt"&gt;--state&lt;/span&gt; completed &lt;span class="nt"&gt;--notes&lt;/span&gt; &lt;span class="s2"&gt;"Version 1.2.3, branch release/1.2.3 confirmed"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--state&lt;/code&gt; defaults to &lt;code&gt;completed&lt;/code&gt; when omitted, so the &lt;code&gt;--state completed&lt;/code&gt; above is redundant but explicit.&lt;/p&gt;

&lt;p&gt;And the next call to &lt;code&gt;akm workflow next&lt;/code&gt; returns the following step. The run persists independently of the conversation. If the session ends, a new agent picks up exactly where the previous one left off:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm workflow next workflow:ship-release
&lt;span class="c"&gt;# Returns: Step "build" — still in progress from the interrupted session&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Want to see the full state of a run?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm workflow status run-abc123
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;workflow status&lt;/code&gt; also accepts a workflow ref directly, resolving to the most-recently-updated run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm workflow status workflow:ship-release
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ref-based workflow commands are scoped to the current working context, not all&lt;br&gt;
workflow runs on the machine. In practice akm groups runs by the current&lt;br&gt;
project/worktree/directory, so an active run in one repo or sandbox does not&lt;br&gt;
block a different directory from starting its own run of the same workflow.&lt;/p&gt;

&lt;p&gt;That shows each step with its status and any notes the agent recorded. You can list all active runs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm workflow list &lt;span class="nt"&gt;--active&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The procedure is now auditable. You know which step failed, when, and what the agent noted. You can hand the run off to a different agent or a different developer. The state is outside the context window where it's durable.&lt;/p&gt;

&lt;p&gt;If you need a starting point, &lt;code&gt;akm workflow template&lt;/code&gt; prints a starter workflow doc you can adapt.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resuming blocked or failed runs
&lt;/h3&gt;

&lt;p&gt;Sometimes a run gets blocked — a step requires human input, an external dependency is unavailable, or a tool call fails. When that happens, the run transitions to &lt;code&gt;blocked&lt;/code&gt; or &lt;code&gt;failed&lt;/code&gt;. Use &lt;code&gt;workflow resume&lt;/code&gt; to flip it back to &lt;code&gt;active&lt;/code&gt; without discarding progress:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm workflow resume run-abc123
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Completed runs cannot be resumed. Use &lt;code&gt;workflow list&lt;/code&gt; to find runs by status.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vault Assets: The Agent Knows What It Needs, Not What the Values Are
&lt;/h2&gt;

&lt;p&gt;Procedures that touch production environments need secrets — database URLs, API keys, deploy tokens. Putting those secrets in a skill file or a prompt is an obvious problem. But the agent still needs to know &lt;em&gt;which&lt;/em&gt; secrets a given procedure requires.&lt;/p&gt;

&lt;p&gt;Vault assets solve this. A vault is a &lt;code&gt;.env&lt;/code&gt; file stored in &lt;code&gt;vaults/&lt;/code&gt; in your stash. The design has one rule: values are never surfaced in structured output. The agent can inspect a vault and learn what keys exist. It never sees what those keys are set to.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm show vault:production
&lt;span class="c"&gt;# Returns keys/comments only, never values&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is enough for the agent to confirm "yes, the right secrets are configured for this environment" without the secrets appearing anywhere in the conversation or the context window.&lt;/p&gt;

&lt;p&gt;When a script actually needs the values — at runtime, not at planning time — the agent runs the command through &lt;code&gt;vault run&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm vault run vault:production &lt;span class="nt"&gt;--&lt;/span&gt; ./deploy.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The values are loaded into the child process environment. They never pass through the agent's structured output. The agent's conversation log is clean.&lt;/p&gt;

&lt;p&gt;Combined with a workflow, this fits naturally into an environment verification step. The agent calls &lt;code&gt;akm show vault:production&lt;/code&gt; to confirm all required keys are present, marks the step complete, then later calls &lt;code&gt;akm vault run vault:production -- &amp;lt;command&amp;gt;&lt;/code&gt; when a command actually needs the secrets. The workflow knows what's required. The agent confirms it. The command gets what it needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writable Git Stash: Your Skills Sync Like Code
&lt;/h2&gt;

&lt;p&gt;So far in this series, stashes have been read-only: you pull in a team repo or a remote source, and &lt;code&gt;akm&lt;/code&gt; indexes it. In 0.5.0, a stash can be writable.&lt;/p&gt;

&lt;p&gt;When you create a stash with &lt;code&gt;--writable&lt;/code&gt;, &lt;code&gt;akm save&lt;/code&gt; will stage, commit, and push your changes back to the remote:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm add git@github.com:your-org/skills.git &lt;span class="nt"&gt;--provider&lt;/span&gt; git &lt;span class="nt"&gt;--name&lt;/span&gt; team-skills &lt;span class="nt"&gt;--writable&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# After editing or adding an asset&lt;/span&gt;
akm save team-skills &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add deploy workflow"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The behavior depends on the stash configuration:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;th&gt;What happens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Not a git repo&lt;/td&gt;
&lt;td&gt;Skipped&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Git repo, no remote&lt;/td&gt;
&lt;td&gt;Stage and commit only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Git repo, has remote, writable: false&lt;/td&gt;
&lt;td&gt;Stage and commit only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Git repo, has remote, writable: true&lt;/td&gt;
&lt;td&gt;Stage, commit, and push&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Your default stash — the one &lt;code&gt;akm init&lt;/code&gt; creates — is auto-initialized as a local git repo. So by default, &lt;code&gt;akm save&lt;/code&gt; gives you a commit history of every change you've made to your skill collection, without requiring a remote. Add a remote and flip &lt;code&gt;writable: true&lt;/code&gt; when you're ready to sync across machines.&lt;/p&gt;

&lt;p&gt;This changes how you think about managing your personal stash. It's not a pile of files in &lt;code&gt;~/.akm&lt;/code&gt;. It's a versioned repository. You can see when you wrote a skill, what it looked like before you changed it, and whether your teammates have made updates since you last pulled.&lt;/p&gt;

&lt;h2&gt;
  
  
  How These Three Features Work Together
&lt;/h2&gt;

&lt;p&gt;Consider a deployment procedure that a team runs regularly. Before 0.5.0, you'd write a deploy skill and hope the agent followed the steps in the right order. With 0.5.0:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Write the workflow once.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm workflow create ship-release
&lt;span class="c"&gt;# Edit workflows/ship-release.md with your team's exact steps&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Add a vault with the production secrets.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The vault file lives at &lt;code&gt;vaults/production.env&lt;/code&gt; in your stash. The keys are there; the values are managed separately through whatever secret management you use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Save both to the team stash.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm save team-skills &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add ship-release workflow and production vault"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every developer on the team pulls the update with &lt;code&gt;akm update --all&lt;/code&gt;. Now everyone has the same workflow and the same vault definition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: When it's time to deploy, the agent runs the procedure.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Agent starts a run&lt;/span&gt;
akm workflow start workflow:ship-release &lt;span class="nt"&gt;--params&lt;/span&gt; &lt;span class="s1"&gt;'{"version":"2.0.0"}'&lt;/span&gt;

&lt;span class="c"&gt;# Gets the first step&lt;/span&gt;
akm workflow next workflow:ship-release
&lt;span class="c"&gt;# → "Validate inputs: confirm version and vault keys"&lt;/span&gt;

&lt;span class="c"&gt;# Checks the vault without reading secrets&lt;/span&gt;
akm show vault:production
&lt;span class="c"&gt;# → keys/comments only, never values&lt;/span&gt;

&lt;span class="c"&gt;# Marks the step complete&lt;/span&gt;
akm workflow &lt;span class="nb"&gt;complete &lt;/span&gt;run-xyz &lt;span class="nt"&gt;--step&lt;/span&gt; validate &lt;span class="nt"&gt;--notes&lt;/span&gt; &lt;span class="s2"&gt;"All keys present"&lt;/span&gt;

&lt;span class="c"&gt;# Gets the next step&lt;/span&gt;
akm workflow next workflow:ship-release
&lt;span class="c"&gt;# → "Build: run bun run build..."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the session ends at the staging step, a fresh agent picks up with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm workflow next workflow:ship-release
&lt;span class="c"&gt;# → "Deploy to staging" — still pending from the previous session&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No context reconstruction. No "where did we leave off?" The procedure state is in the workflow run, not the conversation.&lt;/p&gt;

&lt;p&gt;When the deploy is done, commit any skill or workflow improvements back to the team repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm save team-skills &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Improve staging health check step"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The team gets the improvement on next &lt;code&gt;akm update&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security Model
&lt;/h2&gt;

&lt;p&gt;Vault assets have a clear security contract. Understanding it prevents both&lt;br&gt;
false confidence and unnecessary alarm.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values never leave disk via akm commands.&lt;/strong&gt; This is the core invariant.&lt;br&gt;
&lt;code&gt;akm show&lt;/code&gt;, &lt;code&gt;akm vault list&lt;/code&gt;, &lt;code&gt;akm search&lt;/code&gt;, and every other structured output&lt;br&gt;
command expose only key names and comments — never values. The two supported&lt;br&gt;
paths that actually use values are &lt;code&gt;source "$(akm vault path vault:name)"&lt;/code&gt; (the&lt;br&gt;
shell loads the file directly) and &lt;code&gt;akm vault run vault:name -- &amp;lt;command&amp;gt;&lt;/code&gt;&lt;br&gt;
(values are injected into the child process environment). Neither path passes&lt;br&gt;
values through akm's structured output.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key names are metadata — they are intentionally discoverable.&lt;/strong&gt; Key names&lt;br&gt;
appear in &lt;code&gt;vault list&lt;/code&gt;, &lt;code&gt;vault show&lt;/code&gt;, search results, and agent context by&lt;br&gt;
design. This is how an agent can confirm "yes, &lt;code&gt;DATABASE_URL&lt;/code&gt; is configured in&lt;br&gt;
this vault" without seeing its value. Do not treat key names as secrets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The &lt;code&gt;--sensitive&lt;/code&gt; flag hides a vault from &lt;code&gt;vault list&lt;/code&gt; only.&lt;/strong&gt; Creating a&lt;br&gt;
vault with &lt;code&gt;akm vault create prod --sensitive&lt;/code&gt; prevents it from appearing in&lt;br&gt;
the default &lt;code&gt;vault list&lt;/code&gt; output. It does not prevent key names from showing up&lt;br&gt;
in search results or when the vault is shown directly with &lt;code&gt;akm show&lt;br&gt;
vault:prod&lt;/code&gt;. Use &lt;code&gt;--sensitive&lt;/code&gt; to reduce noise, not to enforce secrecy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dangerous key detection.&lt;/strong&gt; Vault keys with names like &lt;code&gt;LD_PRELOAD&lt;/code&gt;, &lt;code&gt;PATH&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;DYLD_INSERT_LIBRARIES&lt;/code&gt;, or &lt;code&gt;NODE_OPTIONS&lt;/code&gt; can be used to hijack process&lt;br&gt;
execution when the vault is loaded via &lt;code&gt;akm vault run&lt;/code&gt;. &lt;code&gt;akm add&lt;/code&gt; and&lt;br&gt;
&lt;code&gt;akm lint&lt;/code&gt; both scan for these names. During install, &lt;code&gt;akm add&lt;/code&gt; pauses and&lt;br&gt;
asks for confirmation when dangerous keys are found (non-interactive mode fails&lt;br&gt;
unless &lt;code&gt;--allow-insecure&lt;/code&gt; is passed). The full list of 23 flagged key names is&lt;br&gt;
documented in the &lt;a href="https://github.com/itlackey/akm/blob/main/docs/cli.md#dangerous-vault-key-audit" rel="noopener noreferrer"&gt;CLI reference&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use &lt;code&gt;--allow-insecure&lt;/code&gt;.&lt;/strong&gt; Pass &lt;code&gt;--allow-insecure&lt;/code&gt; to &lt;code&gt;akm add&lt;/code&gt; when&lt;br&gt;
you have reviewed a stash manually and confirmed that a dangerous vault key is&lt;br&gt;
legitimate (for example, a hermetic toolchain that overrides &lt;code&gt;PATH&lt;/code&gt;). The flag&lt;br&gt;
also bypasses plain-HTTP source rejection. It is not a global config setting —&lt;br&gt;
it applies only to the single install invocation.&lt;/p&gt;
&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;If you're on &lt;code&gt;akm&lt;/code&gt; already, upgrade to the latest version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; akm-cli@latest
&lt;span class="c"&gt;# or&lt;/span&gt;
akm upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To try workflows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;akm workflow template
&lt;span class="c"&gt;# Copy the output to workflows/your-first-workflow.md and edit it&lt;/span&gt;
akm workflow create your-first-workflow
akm workflow start workflow:your-first-workflow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To add a vault, drop a &lt;code&gt;.env&lt;/code&gt; file in &lt;code&gt;vaults/&lt;/code&gt; in your stash. The format is standard &lt;code&gt;.env&lt;/code&gt; — one &lt;code&gt;KEY=value&lt;/code&gt; per line, comments with &lt;code&gt;#&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To make your default stash writable, add a remote to the git repo in &lt;code&gt;~/.akm/stash&lt;/code&gt; and update your stash config with &lt;code&gt;--writable&lt;/code&gt;. Run &lt;code&gt;akm save -m "Initial commit"&lt;/code&gt; to verify it pushes.&lt;/p&gt;

&lt;p&gt;The repo is at &lt;a href="https://github.com/itlackey/akm" rel="noopener noreferrer"&gt;github.com/itlackey/akm&lt;/a&gt;. The &lt;a href="https://github.com/itlackey/akm/blob/main/docs/getting-started.md" rel="noopener noreferrer"&gt;Getting Started guide&lt;/a&gt; covers initial setup if you're coming in new.&lt;/p&gt;

&lt;p&gt;Agents are most useful when they can handle real work end-to-end. Real work usually involves multiple steps, sensitive configuration, and sessions that get interrupted. Workflows, vaults, and a writable stash close those gaps. Give them a try on the next multi-step task you'd normally hand off with a checklist.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>cli</category>
      <category>workflows</category>
    </item>
  </channel>
</rss>
