> ## Documentation Index
> Fetch the complete documentation index at: https://learn.actionist.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Memory

> Persistent, permissioned, plain-Markdown memory — agents that remember what matters, context you can inspect and control.

<div className="mxp-hero xc-border">
  <div className="exp-eyebrow mxp-rise">NO BLACK BOX</div>

  <h2 className="mxp-hero-title mxp-rise" style={{animationDelay:'0.06s'}}>
    Memory you can <span style={{background:'linear-gradient(90deg,#24A4FF,#9000FF,#E3008E)',WebkitBackgroundClip:'text',backgroundClip:'text',color:'transparent'}}>open in a text editor.</span>
  </h2>

  <p className="mxp-hero-dek mxp-rise" style={{animationDelay:'0.13s'}}>
    Every fact an Actionist agent learns lives in a plain Markdown file on your machine — readable, editable, version-controllable. No black-box vector store. No context that silently disappears when the session ends.
  </p>
</div>

<div className="w-full py-10">
  <div className="actionist-tight flex flex-col gap-2 mb-6">
    <span className="actionist-section-eyebrow">The model</span>
    <h2 className="text-2xl md:text-3xl font-semibold tracking-tight text-gray-900 dark:text-gray-50">Memory lives in three places.</h2>

    <p className="text-base text-gray-600 dark:text-gray-400 max-w-3xl">
      Every surface is the same underlying files — you interact with them wherever is most natural. Below: one fact, seen from all three sides.
    </p>
  </div>

  <div className="mxp-trip exp-tool-shell xc-try">
    <div className="mxp-srch-chips">
      <label htmlFor="mp-a"><input className="mxp-r" type="radio" name="mp" id="mp-a" defaultChecked />The Memory tab</label>
      <label htmlFor="mp-b"><input className="mxp-r" type="radio" name="mp" id="mp-b" />Workspace files</label>
      <label htmlFor="mp-c"><input className="mxp-r" type="radio" name="mp" id="mp-c" />In-chat recall</label>
    </div>

    <div className="mxp-tp mxp-tp-a">
      <div className="mxp-mock-row">
        <span><strong style={{display:'block',fontSize:'13.5px'}}>Memory instructions</strong><span style={{fontSize:'12px',opacity:0.6}}>"Log every client call outcome. Prefer bullet points."</span></span>
        <span className="mxp-mock-pill">auto-saves</span>
      </div>

      <div className="mxp-mock-row">
        <span><strong style={{display:'block',fontSize:'13.5px'}}>CRM bucket</strong><span style={{fontSize:'12px',opacity:0.6}}>Customer accounts and history</span></span>
        <span className="mxp-mock-pill">Read / Write</span>
      </div>

      <p style={{fontSize:'13.5px',opacity:0.7,margin:'10px 2px 0'}}>The primary configuration surface, inside the Agent Studio: <strong>Agents → select an agent → Memory tab</strong> (Brain icon). Instructions, bucket access, and the knowledge corpus — without leaving the app.</p>
    </div>

    <div className="mxp-tp mxp-tp-b">
      <div className="mxp-window">
        <div className="mxp-window-bar"><span className="mxp-window-dot" /><span className="mxp-window-dot" /><span className="mxp-window-dot" /><span className="mxp-window-title">company/crm/accounts/northwind.md</span></div>

        <div className="mxp-window-body" style={{minHeight:'auto',padding:'14px 18px'}}>
          <div className="mxp-stream-line"><span className="mxp-stream-text">## Northwind Trading</span></div>
          <div className="mxp-stream-line"><span className="mxp-stream-text">- Tier: <em>enterprise</em> · renewal: October</span></div>
          <div className="mxp-stream-line"><span className="mxp-stream-text">- Reports as <em>slides, never PDF</em> (CEO reads on phone)</span></div>
        </div>
      </div>

      <p style={{fontSize:'13.5px',opacity:0.7,margin:'12px 2px 0'}}>Plain Markdown on disk. Open <code>company/Memory.md</code> or <code>agents/\{id}/memory/Memory.md</code> in any editor to read, edit, or version-control what your agents know.</p>
    </div>

    <div className="mxp-tp mxp-tp-c">
      <div className="mxp-window">
        <div className="mxp-window-bar"><span className="mxp-window-dot" /><span className="mxp-window-dot" /><span className="mxp-window-dot" /><span className="mxp-window-title">chat · maya</span></div>

        <div className="mxp-window-body" style={{minHeight:'auto',padding:'14px 18px'}}>
          <div className="mxp-stream-line"><span className="mxp-stream-time">you</span><span className="mxp-stream-text">How does Northwind want their reports?</span></div>
          <div style={{margin:'8px 0'}}><span className="mxp-stream-event">tool · Search Memory · "northwind report format"</span></div>
          <div className="mxp-stream-line"><span className="mxp-stream-time">maya</span><span className="mxp-stream-text">Slides, never PDF — their CEO reads on a phone. Saved from your call on <em>June 9</em>.</span></div>
        </div>
      </div>

      <p style={{fontSize:'13.5px',opacity:0.7,margin:'12px 2px 0'}}>Agents call <strong>Search Memory</strong> (<code>memory\_search</code>) and <strong>Read Memory</strong> (<code>memory\_get</code>) automatically — in conversation, in workflows, and on scheduled runs.</p>
    </div>
  </div>
</div>

<div className="w-full py-10 xc-rise">
  <div className="actionist-tight flex flex-col gap-2 mb-6">
    <span className="actionist-section-eyebrow">The write loop</span>
    <h2 className="text-2xl md:text-3xl font-semibold tracking-tight text-gray-900 dark:text-gray-50">Watch an agent remember.</h2>

    <p className="text-base text-gray-600 dark:text-gray-400 max-w-3xl">
      A background curator watches every conversation, workflow, and scheduled run, and decides what is worth keeping. Below: one agent's day, landing in her journal as it happens.
    </p>
  </div>

  <div className="mxp-window">
    <div className="mxp-window-bar">
      <span className="mxp-window-dot" />

      <span className="mxp-window-dot" />

      <span className="mxp-window-dot" />

      <span className="mxp-window-title">agents/maya/memory/TODAY.md</span>
    </div>

    <div className="mxp-window-body">
      <div className="mxp-s1"><span className="mxp-stream-event">chat · maya · 09:14</span></div>
      <div className="mxp-stream-line mxp-s2"><span className="mxp-stream-time">09:14</span><span className="mxp-stream-text">Client call with <em>Northwind</em> — they want the Q3 report in slide form, not PDF.</span></div>
      <div className="mxp-stream-line mxp-s3"><span className="mxp-stream-time">09:14</span><span className="mxp-stream-text">Preference saved: reports as <em>slides</em> for Northwind going forward.</span></div>
      <div className="mxp-s4"><span className="mxp-stream-event">workflow · invoice-chase · 11:02</span></div>
      <div className="mxp-stream-line mxp-s5"><span className="mxp-stream-time">11:02</span><span className="mxp-stream-text">Sent 3 payment reminders. <em>Invoice #2041</em> escalated to second notice.</span></div>
      <div className="mxp-s6"><span className="mxp-stream-event">chat · maya · 14:38</span></div>
      <div className="mxp-stream-line mxp-s7"><span className="mxp-stream-time">14:38</span><span className="mxp-stream-text">New rule from the team: always CC <em>legal@</em> on contract emails.</span></div>
      <div className="mxp-stream-line mxp-s8"><span className="mxp-stream-time">14:39</span><span className="mxp-stream-text">Promoted to <em>Memory.md</em> — this one is permanent.</span></div>
      <div className="mxp-s9"><span className="mxp-stream-event">schedule · daily-digest · 17:00</span></div>
      <div className="mxp-stream-line mxp-s10"><span className="mxp-stream-time">17:00</span><span className="mxp-stream-text">Digest sent. Open rate trending up since switching to <em>bullet summaries</em>.<span className="mxp-caret" /></span></div>
    </div>
  </div>

  <div className="exp-surface-grid" style={{marginTop:'22px'}}>
    <div className="exp-surface-tile">
      <strong>Nothing blocks the agent.</strong> Curation runs asynchronously in the background — the conversation never waits for a memory write.
    </div>

    <div className="exp-surface-tile">
      <strong>Today, then history.</strong> The journal rolls into dated history files; durable rules get promoted to <code>Memory.md</code> and survive forever.
    </div>

    <div className="exp-surface-tile">
      <strong>Everything is a file.</strong> Open the workspace in any editor and read exactly what your agent knows. Edit it. Version it.
    </div>
  </div>
</div>

<div className="w-full py-10 xc-rise">
  <div className="actionist-tight flex flex-col gap-2 mb-6">
    <span className="actionist-section-eyebrow">Under the hood</span>
    <h2 className="text-2xl md:text-3xl font-semibold tracking-tight text-gray-900 dark:text-gray-50">Five stops from words to memory.</h2>
  </div>

  <div className="mxp-pipe">
    <div className="mxp-pipe-node"><strong>Conversation</strong><span>Chats, workflows, and scheduled runs emit events as they happen.</span></div>

    <div className="mxp-pipe-link" />

    <div className="mxp-pipe-node"><strong>Event queue</strong><span>Observations accumulate quietly, off the hot path.</span></div>

    <div className="mxp-pipe-link d2" />

    <div className="mxp-pipe-node"><strong>Write planner</strong><span>A background model reads the batch and plans precise file edits.</span></div>

    <div className="mxp-pipe-link d3" />

    <div className="mxp-pipe-node"><strong>Markdown files</strong><span>Plans become atomic writes to the agent's memory tree.</span></div>

    <div className="mxp-pipe-link d4" />

    <div className="mxp-pipe-node"><strong>INDEX.md</strong><span>Every durable write gets a one-line entry in a human-readable index.</span></div>
  </div>
</div>

<div className="w-full py-10 xc-rise">
  <div className="actionist-tight flex flex-col gap-2 mb-6">
    <span className="actionist-section-eyebrow">Context, spent deliberately</span>
    <h2 className="text-2xl md:text-3xl font-semibold tracking-tight text-gray-900 dark:text-gray-50">What the agent reads before you type a word.</h2>

    <p className="text-base text-gray-600 dark:text-gray-400 max-w-3xl">
      Every session opens with a deterministic preload: up to six files across five sources, wrapped in named sections, inside a total budget of 8,000 tokens — no search, no guessing. Hover a segment to inspect it.
    </p>
  </div>

  <div className="mxp-budget">
    <div className="mxp-budget-seg" style={{flexGrow:1.2, background:'#486EFF'}} title="company/Memory.md — workspace-wide company context (4,000 chars)">registry</div>
    <div className="mxp-budget-seg" style={{flexGrow:1.0, background:'#6C37FF'}} title="company/USER.md — user profile and preferences (4,000 chars)">user</div>
    <div className="mxp-budget-seg" style={{flexGrow:1.6, background:'#9000FF'}} title="agents/{id}/memory/Memory.md — long-term instructions and learned facts (8,000 chars)">Memory.md</div>
    <div className="mxp-budget-seg" style={{flexGrow:1.3, background:'#AC00D9'}} title="agents/{id}/memory/TODAY.md — rolling daily journal (8,000 chars)">TODAY.md</div>
    <div className="mxp-budget-seg" style={{flexGrow:1.5, background:'#C800B3'}} title="Two most recent history files — recent conversation summaries (4,000 chars each)">history ×2</div>
  </div>

  <div className="mxp-budget-legend">
    <span><i style={{background:'#486EFF'}} />company context · 4,000 chars</span>
    <span><i style={{background:'#6C37FF'}} />user profile · 4,000 chars</span>
    <span><i style={{background:'#9000FF'}} />agent memory · 8,000 chars</span>
    <span><i style={{background:'#AC00D9'}} />today's journal · 8,000 chars</span>
    <span><i style={{background:'#C800B3'}} />recent history · 4,000 × 2</span>
  </div>

  <Warning>
    Truncation is front-first — when a file exceeds its budget, the oldest content is dropped and the newest is kept. If you let `Memory.md` or `TODAY.md` grow uncurated, early important context disappears silently. Keep both files tight.
  </Warning>
</div>

<hr className="xc-divider" />

<div className="w-full py-10 xc-rise">
  <div className="actionist-tight flex flex-col gap-2 mb-6">
    <span className="actionist-section-eyebrow">The studio</span>
    <h2 className="text-2xl md:text-3xl font-semibold tracking-tight text-gray-900 dark:text-gray-50">The Memory tab, panel by panel.</h2>

    <p className="text-base text-gray-600 dark:text-gray-400 max-w-3xl">
      Reach it from <strong>Agents → select an agent → Memory tab</strong> (Brain icon). Three panels, each controlling a different layer.
    </p>
  </div>

  {/* TODO(image): memory-tab-overview — IMAGE SPEC: Full Agent Studio Memory tab with all three panels visible. Memory instructions panel shows sample text ('Log every client call outcome. Always prefer bullet points.'). Memory buckets panel shows Global memory (Globe icon) plus three company buckets with different permission states (Read/Write, Read, No access). Knowledge corpus panel top edge visible. Dark UI, purple accent on active controls. — replace this CSS mock with the real screenshot */}

  <div className="mxp2-mock-tab">
    <div className="mxp2-mock-tab-bar">
      <span className="mxp2-mock-dot" />

      <span className="mxp2-mock-dot" />

      <span className="mxp2-mock-dot" />

      <span className="mxp2-mock-titlebar">Agent Studio — Maya · Memory</span>
    </div>

    <div className="mxp2-mock-tabs-row">
      <span className="mxp2-mock-tab-item">Overview</span>
      <span className="mxp2-mock-tab-item">Tools</span>
      <span className="mxp2-mock-tab-item is-active">Memory</span>
      <span className="mxp2-mock-tab-item">Channels</span>
      <span className="mxp2-mock-tab-item">Schedule</span>
    </div>

    <div className="mxp2-mock-body">
      <div className="mxp2-mock-panel">
        <div className="mxp2-panel-title">Memory instructions</div>

        <div className="mxp2-instructions-box">
          <div className="mxp2-instructions-text">Log every client call outcome.<br />Prefer bullet points.<br />Never store API tokens.<span className="mxp2-instructions-cursor" /></div>
        </div>

        <div className="mxp2-autosave-badge"><span className="mxp2-autosave-dot" />auto-saves</div>
      </div>

      <div className="mxp2-mock-panel">
        <div className="mxp2-panel-title">Memory buckets</div>
        <div className="mxp2-global-row"><span className="mxp2-globe-icon" />Global memory<span className="mxp2-perm-chip mxp2-perm-rw">Read/Write</span></div>
        <div className="mxp2-bucket-row"><span className="mxp2-bucket-label">CRM</span><span className="mxp2-perm-chip mxp2-perm-rw">R/W</span></div>
        <div className="mxp2-bucket-row"><span className="mxp2-bucket-label">Products</span><span className="mxp2-perm-chip mxp2-perm-r">Read</span></div>
        <div className="mxp2-bucket-row"><span className="mxp2-bucket-label">Policies</span><span className="mxp2-perm-chip mxp2-perm-none">No access</span></div>
        <div className="mxp2-bucket-row"><span className="mxp2-bucket-label">Operations</span><span className="mxp2-perm-chip mxp2-perm-none">No access</span></div>
        <div className="mxp2-bucket-row"><span className="mxp2-bucket-label">Docs</span><span className="mxp2-perm-chip mxp2-perm-r">Read</span></div>
      </div>

      <div className="mxp2-mock-panel">
        <div className="mxp2-panel-title">Knowledge corpus</div>

        <div className="mxp2-corpus-drop">
          <span className="mxp2-corpus-icon" style={{width:'22px',height:'22px'}} />

          <span style={{fontSize:'11.5px'}}>Upload File</span>
          <span style={{fontSize:'10.5px', opacity:0.6}}>.md .txt .pdf .docx up to 10 MB</span>
        </div>

        <div className="mxp2-corpus-row">
          <span>pricing-2026.pdf</span>
          <span className="mxp2-corpus-badge">extracted</span>
        </div>
      </div>
    </div>
  </div>

  <AccordionGroup>
    <Accordion title="Memory instructions" icon="scroll-text" defaultOpen={true}>
      The markdown editor at the top of the tab writes directly to `agents/{id}/memory/Memory.md`. Use it to tell the agent what is worth remembering and how: *"Log every client call outcome. Prefer bullet points. Never store API tokens."*

      Changes auto-save as you type. To revert to the default, click the **Reset** button (arrow-clockwise icon) in the panel header.

      <Tip>
        Keep instructions under roughly 200 words. `Memory.md` is injected verbatim into every session within the 8k-token preload budget. A long essay eats into the budget for `TODAY.md` and recent history — write directives, not prose.
      </Tip>
    </Accordion>

    <Accordion title="Memory buckets" icon="database">
      Buckets are named scopes. Each one maps to a file or folder of Markdown on disk. The tab shows a row per bucket with a three-way permission control: **No access** (invisible to the agent), **Read** (search and recall), **Read/Write** (search, recall, and save new facts).

      The **Global memory** bucket (Globe icon, always at the top) covers workspace-wide scratch memory shared by every agent. It is always included in search regardless of its permission setting.

      The six built-in company buckets cover shared ground truth:

      | Bucket        | Scope                   | Contents                       |
      | ------------- | ----------------------- | ------------------------------ |
      | Business Info | `company:business-info` | Mission, values, company facts |
      | Products      | `company:products`      | Product catalogue and specs    |
      | Policies      | `company:policies`      | Internal rules and procedures  |
      | Operations    | `company:operations`    | Processes and runbooks         |
      | CRM           | `company:crm`           | Customer accounts and history  |
      | Docs          | `company:docs`          | Reference documentation        |

      You can also let one agent read another agent's memory directory by adding `agent:{targetId}` as a scope — useful for coordinator agents that need to read a specialist's learned facts.
    </Accordion>

    <Accordion title="Knowledge corpus" icon="book-open">
      The Knowledge Corpus is a private document library for this specific agent. Upload reference files — specs, pricing tables, runbooks, FAQs — and the agent retrieves the relevant excerpt via semantic search rather than loading the whole document on every turn.

      **"Private documents this agent can reference. Chunks are embedded and retrieved; nothing leaves your workspace."**

      Click **Upload File** to add a document. Accepted types for indexing: `.md`, `.txt`, `.csv`, `.json`, `.yaml`, `.yml`, `.toml`, `.ini`, `.log`. Rich document formats (`.pdf`, `.docx`, `.xlsx`) go through a text-extraction step before indexing. Maximum file size: 10 MB per file.

      To remove a file, hover the row and click the Trash icon. Confirm in the dialog: *"Delete \[filename] from the knowledge corpus?"*
    </Accordion>
  </AccordionGroup>
</div>

<div className="w-full py-10 xc-rise">
  <div className="actionist-tight flex flex-col gap-2 mb-2">
    <span className="actionist-section-eyebrow">Try it · permissions</span>
    <h2 className="text-2xl md:text-3xl font-semibold tracking-tight text-gray-900 dark:text-gray-50">Permissions you can feel.</h2>

    <p className="text-base text-gray-600 dark:text-gray-400 max-w-3xl">
      Memory is bucketed by scope so an agent only sees what it needs — a data diet, not a free-for-all. The matrix below starts in the recommended setup for a CRM agent. Change anything; watch the agent's world change.
    </p>
  </div>

  <div className="mxp-bm exp-tool-shell xc-try">
    <input className="mxp-r" type="radio" name="mb-b" id="mb-b-n" />

    <input className="mxp-r" type="radio" name="mb-b" id="mb-b-r" defaultChecked />

    <input className="mxp-r" type="radio" name="mb-b" id="mb-b-w" />

    <input className="mxp-r" type="radio" name="mb-p" id="mb-p-n" />

    <input className="mxp-r" type="radio" name="mb-p" id="mb-p-r" defaultChecked />

    <input className="mxp-r" type="radio" name="mb-p" id="mb-p-w" />

    <input className="mxp-r" type="radio" name="mb-o" id="mb-o-n" defaultChecked />

    <input className="mxp-r" type="radio" name="mb-o" id="mb-o-r" />

    <input className="mxp-r" type="radio" name="mb-o" id="mb-o-w" />

    <input className="mxp-r" type="radio" name="mb-x" id="mb-x-n" defaultChecked />

    <input className="mxp-r" type="radio" name="mb-x" id="mb-x-r" />

    <input className="mxp-r" type="radio" name="mb-x" id="mb-x-w" />

    <input className="mxp-r" type="radio" name="mb-c" id="mb-c-n" />

    <input className="mxp-r" type="radio" name="mb-c" id="mb-c-r" />

    <input className="mxp-r" type="radio" name="mb-c" id="mb-c-w" defaultChecked />

    <input className="mxp-r" type="radio" name="mb-d" id="mb-d-n" />

    <input className="mxp-r" type="radio" name="mb-d" id="mb-d-r" defaultChecked />

    <input className="mxp-r" type="radio" name="mb-d" id="mb-d-w" />

    <div style={{display:'grid', gridTemplateColumns:'repeat(auto-fit, minmax(300px, 1fr))', gap:28}}>
      <div>
        <div style={{fontSize:12, letterSpacing:'0.07em', textTransform:'uppercase', opacity:0.6, marginBottom:12}}>Set each bucket's access</div>

        <div className="mxp-bm-item">
          <span><strong>Business Info</strong><span className="mxp-bm-blurb">Mission, values, company facts</span></span>
          <span className="mxp-seg"><label htmlFor="mb-b-n">None</label><label htmlFor="mb-b-r">Read</label><label htmlFor="mb-b-w">R/W</label></span>
        </div>

        <div className="mxp-bm-item">
          <span><strong>Products</strong><span className="mxp-bm-blurb">Product catalogue and specs</span></span>
          <span className="mxp-seg"><label htmlFor="mb-p-n">None</label><label htmlFor="mb-p-r">Read</label><label htmlFor="mb-p-w">R/W</label></span>
        </div>

        <div className="mxp-bm-item">
          <span><strong>Policies</strong><span className="mxp-bm-blurb">Internal rules and procedures</span></span>
          <span className="mxp-seg"><label htmlFor="mb-o-n">None</label><label htmlFor="mb-o-r">Read</label><label htmlFor="mb-o-w">R/W</label></span>
        </div>

        <div className="mxp-bm-item">
          <span><strong>Operations</strong><span className="mxp-bm-blurb">Processes and runbooks</span></span>
          <span className="mxp-seg"><label htmlFor="mb-x-n">None</label><label htmlFor="mb-x-r">Read</label><label htmlFor="mb-x-w">R/W</label></span>
        </div>

        <div className="mxp-bm-item">
          <span><strong>CRM</strong><span className="mxp-bm-blurb">Customer accounts and history</span></span>
          <span className="mxp-seg"><label htmlFor="mb-c-n">None</label><label htmlFor="mb-c-r">Read</label><label htmlFor="mb-c-w">R/W</label></span>
        </div>

        <div className="mxp-bm-item">
          <span><strong>Docs</strong><span className="mxp-bm-blurb">Reference documentation</span></span>
          <span className="mxp-seg"><label htmlFor="mb-d-n">None</label><label htmlFor="mb-d-r">Read</label><label htmlFor="mb-d-w">R/W</label></span>
        </div>
      </div>

      <div className="exp-glass-card" style={{padding:'18px 20px', alignSelf:'start'}}>
        <div style={{fontSize:12, letterSpacing:'0.07em', textTransform:'uppercase', opacity:0.6, marginBottom:10}}>What this agent sees</div>

        <div style={{fontFamily:'"JetBrains Mono", monospace', fontSize:12.5, lineHeight:2}}>
          <div>agents/maya/memory/ <span style={{opacity:0.5}}>— always</span></div>
          <div>company/Memory.md <span style={{opacity:0.5}}>— always</span></div>
          <div className="mxp-see-line mxp-see-b">company/business/ <span className="st st-n">— no access</span><span className="st st-r">— read only</span><span className="st st-w">— read + write</span></div>
          <div className="mxp-see-line mxp-see-p">company/products/ <span className="st st-n">— no access</span><span className="st st-r">— read only</span><span className="st st-w">— read + write</span></div>
          <div className="mxp-see-line mxp-see-o">company/policies/ <span className="st st-n">— no access</span><span className="st st-r">— read only</span><span className="st st-w">— read + write</span></div>
          <div className="mxp-see-line mxp-see-x">company/operations/ <span className="st st-n">— no access</span><span className="st st-r">— read only</span><span className="st st-w">— read + write</span></div>
          <div className="mxp-see-line mxp-see-c">company/crm/ <span className="st st-n">— no access</span><span className="st st-r">— read only</span><span className="st st-w">— read + write</span></div>
          <div className="mxp-see-line mxp-see-d">company/docs/ <span className="st st-n">— no access</span><span className="st st-r">— read only</span><span className="st st-w">— read + write</span></div>
        </div>

        <div style={{marginTop:14, paddingTop:12, borderTop:'1px solid rgb(128 128 144 / 0.2)', fontSize:12.5, opacity:0.75}}>
          Struck-through paths are invisible to the agent — in chat, in workflows, and in search.
        </div>
      </div>
    </div>
  </div>

  <h3 className="text-xl font-semibold tracking-tight text-gray-900 dark:text-gray-50 mb-4 mt-8">Why the CRM preset looks like this</h3>

  <Steps>
    <Step title="CRM gets Read/Write" icon="pencil">
      The CRM agent owns customer data. Read/Write lets it both recall existing records and save new ones — call outcomes, updated deal stages, contact notes.
    </Step>

    <Step title="Products gets Read" icon="book-open">
      The agent references your catalogue when qualifying leads, but it shouldn't rewrite product facts. Read-only keeps the source of truth safe.
    </Step>

    <Step title="Operations and Policies get No access" icon="lock">
      A CRM agent has no reason to read internal process docs or policy files. No access keeps the context clean and prevents accidental contamination.
    </Step>

    <Step title="Verify with a test message" icon="message-square">
      Open a chat and ask: *"What do you know about our pricing?"* Watch the Search Memory tool call and confirm it returns results from the CRM and Products buckets only.
    </Step>
  </Steps>

  <Tip>
    Always give at least one bucket **Read/Write** for any agent that runs on a schedule or trigger. If every bucket is **Read** or **No access**, the memory agent plans writes it cannot execute — the agent appears to work normally but retains nothing between sessions.
  </Tip>

  <Note>
    <strong>Adding a custom bucket.</strong> Edit `company/Memory.md` directly using the heading-based format below. After saving, the new bucket appears in all agents' Memory tabs immediately.

    ```markdown theme={null}
    ### My Bucket Name
    - Scope: `company:my-bucket`
    - Type: file
    - Path: `company/my-bucket.md`
    - Description: What this bucket stores
    ```
  </Note>
</div>

<div className="w-full py-10 xc-rise">
  <div className="actionist-tight flex flex-col gap-2 mb-6">
    <span className="actionist-section-eyebrow">Knowledge corpus</span>
    <h2 className="text-2xl md:text-3xl font-semibold tracking-tight text-gray-900 dark:text-gray-50">Turn documents into searchable knowledge.</h2>

    <p className="text-base text-gray-600 dark:text-gray-400 max-w-3xl">
      Upload a 50-page product spec once. The agent retrieves a targeted excerpt on every relevant turn — instead of re-reading the whole file or asking you to paste it in chat. Watch a file move through its lifecycle:
    </p>
  </div>

  <div className="exp-tool-shell" style={{padding:'20px 24px'}}>
    <div className="mxp-mock-row" style={{marginBottom:0}}>
      <span style={{fontFamily:'"JetBrains Mono", monospace', fontSize:13, flex:'none'}}>pricing-2026.pdf <span style={{opacity:0.5,fontSize:11}}>· 2.4 MB</span></span>

      <span className="mxp-life">
        <span className="lf1"><i style={{background:'#24A4FF'}} />Uploading...</span>
        <span className="lf2"><i style={{background:'#6C37FF'}} />Extracting text…</span>
        <span className="lf3"><i style={{background:'#AC00D9'}} />Uploaded — indexing pending. Searchable shortly.</span>
        <span className="lf4"><i style={{background:'#6EE3B5'}} /><span className="mxp-badge-x">extracted</span> indexed and searchable</span>
      </span>
    </div>
  </div>

  <Steps>
    <Step title="Open the Knowledge corpus panel" icon="book-open">
      In the Memory tab, scroll to the **Knowledge corpus** panel and click **Upload File**.
    </Step>

    <Step title="Pick a file" icon="upload">
      Text types index directly: `.md`, `.txt`, `.csv`, `.json`, `.yaml`, `.yml`, `.toml`, `.ini`, `.log`. Rich documents (`.pdf`, `.docx`, `.xlsx`) are text-extracted first. Maximum size: **10 MB per file**.
    </Step>

    <Step title="Watch the lifecycle" icon="activity">
      Exactly the animation above: **Uploading...** → **Extracting text…** (rich files) → **indexing pending** → the **extracted** badge. If you instead see *"No text could be extracted from this document"*, the file is image-only — nothing is searchable.
    </Step>

    <Step title="Verify the agent can find it" icon="search">
      Ask the agent a question the document should answer. It calls **Search Memory** and returns a ranked excerpt — confirm the snippet is from your file.
    </Step>

    <Step title="Remove a file" icon="trash">
      Hover the file row and click the Trash icon. Confirm: *"Delete \[filename] from the knowledge corpus?"* The file and its index entries are removed immediately.
    </Step>
  </Steps>

  <Warning>
    Wait for the **extracted** badge before relying on a PDF or DOCX in a live agent. "Indexing pending" means not yet searchable; "No text could be extracted" means it never will be.
  </Warning>
</div>

<div className="w-full py-10 xc-rise">
  <div className="actionist-tight flex flex-col gap-2 mb-2">
    <span className="actionist-section-eyebrow">Try it · recall</span>
    <h2 className="text-2xl md:text-3xl font-semibold tracking-tight text-gray-900 dark:text-gray-50">Recall, ranked.</h2>

    <p className="text-base text-gray-600 dark:text-gray-400 max-w-3xl">
      Two tools power recall, and agents call them automatically — you see the tool calls inline in chat and in workflow traces. Pick a query and watch the ranking.
    </p>
  </div>

  <div className="mxp-srch exp-tool-shell xc-try">
    <div className="mxp-srch-chips">
      <label htmlFor="mq-a"><input className="mxp-r" type="radio" name="mq" id="mq-a" defaultChecked />report format</label>
      <label htmlFor="mq-b"><input className="mxp-r" type="radio" name="mq" id="mq-b" />contract emails</label>
      <label htmlFor="mq-c"><input className="mxp-r" type="radio" name="mq" id="mq-c" />demo follow-up</label>
      <label htmlFor="mq-d"><input className="mxp-r" type="radio" name="mq" id="mq-d" />tone of voice</label>
    </div>

    <div className="mxp-q-echo mxp-ea">memory\_search(<em>"report format"</em>)</div>
    <div className="mxp-q-echo mxp-eb">memory\_search(<em>"contract emails"</em>)</div>
    <div className="mxp-q-echo mxp-ec">memory\_search(<em>"demo follow-up"</em>)</div>
    <div className="mxp-q-echo mxp-ed">memory\_search(<em>"tone of voice"</em>)</div>

    <div className="mxp-srch-panel mxp-pa">
      <div className="exp-glass-card mxp-hit">
        <div className="mxp-hit-head"><span>agents/maya/memory/Memory.md:12</span><span className="score">0.91</span></div>
        <div className="mxp-hit-text">Reports for Northwind go out as slides, never PDF — their CEO reads on a phone.</div>

        <div className="mxp-result-bar" style={{width:'100%'}} />
      </div>

      <div className="exp-glass-card mxp-hit">
        <div className="mxp-hit-head"><span>company/docs/brand-voice.extracted.md:19</span><span className="score">0.48</span></div>
        <div className="mxp-hit-text">Tone of voice: direct, warm, zero filler. Short sentences win. No exclamation marks.</div>

        <div className="mxp-result-bar" style={{width:'53%'}} />
      </div>

      <div className="exp-glass-card mxp-hit">
        <div className="mxp-hit-head"><span>company/crm/accounts/northwind.md:2</span><span className="score">0.37</span></div>
        <div className="mxp-hit-text">Northwind Trading — enterprise tier, renewal in October, champion: Dana Voss.</div>

        <div className="mxp-result-bar" style={{width:'41%'}} />
      </div>
    </div>

    <div className="mxp-srch-panel mxp-pb">
      <div className="exp-glass-card mxp-hit">
        <div className="mxp-hit-head"><span>company/policies/email.md:4</span><span className="score">0.94</span></div>
        <div className="mxp-hit-text">Always CC legal@ on anything containing contract terms or pricing commitments.</div>

        <div className="mxp-result-bar" style={{width:'100%'}} />
      </div>

      <div className="exp-glass-card mxp-hit">
        <div className="mxp-hit-head"><span>agents/maya/memory/TODAY.md:14</span><span className="score">0.52</span></div>
        <div className="mxp-hit-text">New rule from the team: always CC legal@ on contract emails. Promoted to Memory.md.</div>

        <div className="mxp-result-bar" style={{width:'55%'}} />
      </div>

      <div className="exp-glass-card mxp-hit">
        <div className="mxp-hit-head"><span>company/products/pricing.md:7</span><span className="score">0.29</span></div>
        <div className="mxp-hit-text">Pro plan pools usage across the team; Basic is single-seat with a monthly reset.</div>

        <div className="mxp-result-bar" style={{width:'31%'}} />
      </div>
    </div>

    <div className="mxp-srch-panel mxp-pc">
      <div className="exp-glass-card mxp-hit">
        <div className="mxp-hit-head"><span>agents/maya/memory/history/2026-06-09.md:31</span><span className="score">0.89</span></div>
        <div className="mxp-hit-text">Demo follow-ups convert best when sent within 4 hours, with one concrete next step.</div>

        <div className="mxp-result-bar" style={{width:'100%'}} />
      </div>

      <div className="exp-glass-card mxp-hit">
        <div className="mxp-hit-head"><span>company/crm/accounts/northwind.md:2</span><span className="score">0.44</span></div>
        <div className="mxp-hit-text">Northwind Trading — enterprise tier, renewal in October, champion: Dana Voss.</div>

        <div className="mxp-result-bar" style={{width:'49%'}} />
      </div>

      <div className="exp-glass-card mxp-hit">
        <div className="mxp-hit-head"><span>agents/maya/memory/TODAY.md:8</span><span className="score">0.33</span></div>
        <div className="mxp-hit-text">Invoice #2041 escalated to second notice; finance wants weekly status on it.</div>

        <div className="mxp-result-bar" style={{width:'37%'}} />
      </div>
    </div>

    <div className="mxp-srch-panel mxp-pd">
      <div className="exp-glass-card mxp-hit">
        <div className="mxp-hit-head"><span>company/docs/brand-voice.extracted.md:19</span><span className="score">0.93</span></div>
        <div className="mxp-hit-text">Tone of voice: direct, warm, zero filler. Short sentences win. No exclamation marks.</div>

        <div className="mxp-result-bar" style={{width:'100%'}} />
      </div>

      <div className="exp-glass-card mxp-hit">
        <div className="mxp-hit-head"><span>agents/maya/memory/Memory.md:12</span><span className="score">0.41</span></div>
        <div className="mxp-hit-text">Reports for Northwind go out as slides, never PDF — their CEO reads on a phone.</div>

        <div className="mxp-result-bar" style={{width:'44%'}} />
      </div>

      <div className="exp-glass-card mxp-hit">
        <div className="mxp-hit-head"><span>company/policies/email.md:4</span><span className="score">0.27</span></div>
        <div className="mxp-hit-text">Always CC legal@ on anything containing contract terms or pricing commitments.</div>

        <div className="mxp-result-bar" style={{width:'29%'}} />
      </div>
    </div>

    <div className="mxp-kbd-hint" style={{marginTop:16}}>
      Ranked with the real engine's hybrid weights: 0.6 semantic similarity · 0.25 keyword match · 0.15 recency, re-ranked so one document never dominates. Demo data, real scoring shape.
    </div>
  </div>

  <div className="mt-8" />

  <div className="xc-quote">
    <p>"You explained the Northwind report format once. In March."</p>
    <span>maya · memory\_search</span>
  </div>

  | Tool            | Display name  | What it does                                                                                                                                           | Key default                                                                       |
  | --------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- |
  | `memory_search` | Search Memory | Semantic + keyword hybrid search across all permitted buckets and corpus files. Returns ranked results with file path, line range, score, and snippet. | Up to 6 results per call                                                          |
  | `memory_get`    | Read Memory   | Reads a specific memory file. Accepts `path` (required), `from` (start line, optional), and `lines` (line count, optional). Scope-enforced.            | Up to 200 lines per call; omit `lines` to read the full file (also capped at 200) |

  <Note>
    `memory_get` is scope-enforced. An agent can only read files in buckets where it has at least **Read** permission — attempting to read outside the permitted scope returns an error, not the file contents. Recall works the same everywhere: in chat, in workflows, and on scheduled runs, with each tool call visible in the trace.
  </Note>
</div>

<div className="w-full py-10 xc-rise">
  <div className="actionist-tight flex flex-col gap-2 mb-6">
    <span className="actionist-section-eyebrow">Memory in practice</span>
    <h2 className="text-2xl md:text-3xl font-semibold tracking-tight text-gray-900 dark:text-gray-50">Three teams, one pattern.</h2>

    <p className="text-base text-gray-600 dark:text-gray-400 max-w-3xl">
      Memory is most useful when it surfaces exactly the right context without being asked. These recipes show how agents across roles use recall and write to stay useful across sessions.
    </p>
  </div>

  <div className="xc-recipes">
    <div className="xc-recipe">
      <div className="xc-recipe-who">
        <i style={{background:'linear-gradient(135deg,#24A4FF,#6C37FF)'}} />

        Dario · Sales
      </div>

      <div className="xc-recipe-flow">
        Before a call, <em>memory\_search("northwind deal stage")</em> surfaces the last three touchpoints, open commitments, and the champion's name — all logged automatically from prior sessions. Dario opens the call with context instead of asking the CRM for a briefing.
      </div>

      <span className="xc-recipe-save">saves \~6 min per call</span>
    </div>

    <div className="xc-recipe">
      <div className="xc-recipe-who">
        <i style={{background:'linear-gradient(135deg,#4ED8A7,#24A4FF)'}} />

        Priya · Support lead
      </div>

      <div className="xc-recipe-flow">
        A support ticket asks about refund eligibility. The agent runs <em>memory\_search("refund policy")</em> against the Policies bucket, finds the exact clause, and cites the source file and line number in its reply — no tab-switching, no guesswork.
      </div>

      <span className="xc-recipe-save">cited answer in \~8 sec</span>
    </div>

    <div className="xc-recipe">
      <div className="xc-recipe-who">
        <i style={{background:'linear-gradient(135deg,#7C5BFF,#E3008E)'}} />

        Maya · Marketing Manager
      </div>

      <div className="xc-recipe-flow">
        Maya said once: <em>"Northwind reports go out as slides, never PDF."</em> That preference was written to Memory.md and now applies on every run — campaign drafts, digest emails, and scheduled summaries all arrive in the right format without reminders.
      </div>

      <span className="xc-recipe-save">zero repeat instructions</span>
    </div>
  </div>
</div>

<hr className="xc-divider" />

<div className="w-full py-10 xc-rise">
  <div className="actionist-tight flex flex-col gap-2 mb-6">
    <span className="actionist-section-eyebrow">Best practices</span>
    <h2 className="text-2xl md:text-3xl font-semibold tracking-tight text-gray-900 dark:text-gray-50">Memory habits that pay off.</h2>

    <p className="text-base text-gray-600 dark:text-gray-400 max-w-3xl">
      Six habits that prevent the most common memory failures — and make the most of the context you have.
    </p>
  </div>

  <AccordionGroup>
    <Accordion title="Write directives, not essays" icon="pencil">
      Memory instructions are injected verbatim at session start, inside the 8,000-token preload budget. Every word you write competes with `TODAY.md` and recent history. Write short, imperative sentences: *"Log every client call outcome. Prefer bullet points. Never store API tokens."* Past 200 words, you are writing prose that belongs in a corpus document.
    </Accordion>

    <Accordion title="Match Read/Write to ownership" icon="lock">
      Think of each agent as owning the buckets it controls: your CRM agent gets **Read/Write** on CRM, **Read** on Products, **No access** on Policies. Giving multiple agents Read/Write on the same bucket creates contention — agent A's writes can contradict agent B's in the same file. One writer per bucket is the clean pattern.
    </Accordion>

    <Accordion title="Always give at least one bucket Read/Write" icon="check">
      If every bucket is **Read** or **No access**, the memory subsystem plans writes it cannot execute. The agent appears to work — answers questions, runs workflows — but retains nothing, and the next session starts from zero. For any scheduled or triggered agent, confirm one Read/Write bucket before production.
    </Accordion>

    <Accordion title="Use the corpus for reference docs, not chat pastes" icon="book-open">
      Pasting a 50-page spec into chat loads the whole document into context every turn. Uploading it to the corpus chunks and indexes it — the agent retrieves the relevant excerpt only when needed. Good corpus candidates: specs, pricing tables, SLAs, runbooks, brand guidelines, FAQs. Bad candidates: short facts (Memory.md) and image-only PDFs (nothing extracts).
    </Accordion>

    <Accordion title="Wait for the 'extracted' badge" icon="badge-check">
      Rich documents (PDF, DOCX, XLSX) are text-extracted before indexing. The **extracted** badge confirms usable text came out. *"No text could be extracted"* means the file is image-only — OCR is not performed, nothing is searchable. Don't put a corpus file in a production agent's remit until the badge appears.
    </Accordion>

    <Accordion title="Review INDEX.md periodically for long-lived agents" icon="list">
      The curator maintains `agents/{id}/memory/INDEX.md` automatically — one line per memory file, hard-capped at 200 lines or 25 KB, oldest entries dropped first. For agents running for months, open it occasionally and confirm your most important facts still have entries. If a critical early fact was evicted, re-surface it: ask the agent to log it again, or edit the file directly.
    </Accordion>
  </AccordionGroup>
</div>

<div className="w-full py-10 xc-rise">
  <div className="actionist-tight flex flex-col gap-2 mb-6">
    <span className="actionist-section-eyebrow">Why it's built this way</span>
    <h2 className="text-2xl md:text-3xl font-semibold tracking-tight text-gray-900 dark:text-gray-50">Four principles, no compromises.</h2>
  </div>

  <Columns cols={4}>
    <Card title="Plain Markdown" icon="file-text">
      Human-readable files, not embeddings in a vault. What you can read, you can trust.
    </Card>

    <Card title="Permissioned" icon="lock">
      Bucket-level read/write grants per agent. A support agent never wanders into finance.
    </Card>

    <Card title="On-device" icon="hard-drive">
      The store and its search index live on your machine, not in someone else's cloud.
    </Card>

    <Card title="Survives sessions" icon="infinity">
      Monday's lesson still applies on Friday. Memory is the product, not a side effect.
    </Card>
  </Columns>
</div>

<div className="w-full py-10 xc-rise">
  <div className="actionist-cta-panel xc-border">
    <div className="relative z-10 flex flex-col items-center gap-5 max-w-2xl mx-auto">
      <span className="actionist-eyebrow">Always on</span>

      <h2 className="text-2xl md:text-3xl font-semibold tracking-tight text-white leading-tight">
        Memory that works while you sleep.
      </h2>

      <p className="text-base md:text-lg text-white/85">
        Configure buckets once. Upload your reference docs. Let the agent carry context forward on every session, every schedule, every run.
      </p>

      <div className="flex flex-wrap items-center justify-center gap-3 pt-2">
        <a className="actionist-cta-btn-primary" href="https://app.actionist.ai" target="_blank" rel="noreferrer">
          Open the Dashboard

          <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round">
            <path d="M5 12h14" />

            <path d="m12 5 7 7-7 7" />
          </svg>
        </a>

        <a className="actionist-cta-btn-secondary" href="mailto:support@actionist.ai">
          Email the team
        </a>
      </div>
    </div>
  </div>
</div>

<div className="w-full pt-2 pb-6">
  <p className="actionist-trust-line">
    Every fact lives in a plain file you own — readable, editable, version-controllable.<br />
    Permissioned by bucket · Indexed on-device · Nothing leaves your workspace.
  </p>
</div>

<div className="w-full pb-16">
  <div className="actionist-tight flex flex-col gap-2 mb-6">
    <span className="actionist-section-eyebrow">Keep going</span>
    <h2 className="text-2xl md:text-3xl font-semibold tracking-tight text-gray-900 dark:text-gray-50">Next steps.</h2>
  </div>

  <Columns cols={4}>
    <Card title="Agents" icon="users" href="/Folders/agents">
      Configure the agent that holds this memory — tools, approval mode, channels, and schedule.
    </Card>

    <Card title="Files" icon="folder-open" href="/Folders/files">
      Browse and edit the underlying Markdown files your agents read and write.
    </Card>

    <Card title="Schedules" icon="calendar-clock" href="/Folders/schedules">
      Put a memory-backed agent on a recurring schedule — and why bucket permissions matter for unattended runs.
    </Card>

    <Card title="Skills" icon="puzzle" href="/Folders/skills">
      Portable behavior packs that pair well with memory — a skill plus a well-scoped bucket makes a focused specialist.
    </Card>
  </Columns>
</div>
