← Back to Blog
Product

Auto Memory — Your AI Agent Remembers You

·5 min read
productmemoryauto-memorycross-sessionv0.15.6

The Fresh Intern Problem

Every time you start a new session, your AI agent has amnesia. It doesn't know:

So you explain it again. And again. And again. Each session feels like onboarding a new intern who forgot everything overnight.

Auto Memory: Your Agent Gets Smarter Over Time

Aii CLI v0.15.6 introduces Auto Memory — a persistent, file-based memory system that survives across sessions. Your agent quietly learns what matters and recalls it when relevant.

No setup. No configuration. No "save this to memory" commands. It just works.

Let's see it with TaskPilot — a CLI task board built with TypeScript.

Session 1: Tell It What Matters

text
> remember that I'm a full-stack engineer taking over this TaskPilot project.
  We use Jest for testing, never console.log — use the logger utility.
  Our bug tracker is Linear project "TASKPILOT".

● I'll save this as a memory about your role, testing practices, and bug tracker.

  Write(~/.aii/projects/.../memory/user_full_stack_engineer.md (8 lines))
  Write(~/.aii/projects/.../memory/feedback_jest_testing_no_console_log.md (20 lines))
  Write(~/.aii/projects/.../memory/reference_linear_taskpilot.md (10 lines))
  Write(~/.aii/projects/.../memory/MEMORY.md (5 lines))

● Done. I've saved three memories — your role, testing preferences, and
  bug tracker location. These will be available in future sessions.

The keyword "remember" triggers immediate memory creation. Three files saved, MEMORY.md index updated:

text
~/.aii/projects/.../memory/
├── MEMORY.md
├── user_full_stack_engineer.md
├── feedback_jest_testing_no_console_log.md
└── reference_linear_taskpilot.md

Even without "remember", the background extraction agent quietly captures knowledge from natural conversation — but explicit saves give you control.

Session 2: It Knows You

Next day. New session. Same project.

text
> fix the failing task validation test

● I'll look at the failing test. Since you prefer the logger utility
  over console.log, I'll make sure the fix uses that pattern. Let me
  also check if this relates to any known issues in Linear...

Your preferences from yesterday surfaced automatically. The agent connected dots without being told.

Two Weeks Later: Staleness Awareness

text
> what's the status of the storage refactor?

● I have a memory about the storage refactor from 12 days ago — it was
  planned for Sprint 5. Note: this memory is 12 days old, so the details
  may be outdated. Let me check the current code...

  [reads files, checks git log]

  The refactor is complete — merged in commit abc123 last week.

The agent doesn't blindly trust old memories. It warns you when information might be stale and verifies against the current codebase.

How It Works

Session-aware. When you start a session, Aii loads your memories for the current project. The agent knows what it learned from previous conversations before you type a word.

Context-relevant. Each time you send a message, the most relevant memories surface automatically. Ask about testing? Your testing preferences appear. Ask about deployment? Your deploy freeze schedule appears. You don't manage what gets recalled — the system does.

Always learning. After each response, Aii quietly checks if the conversation contained anything worth remembering. New preferences, corrections, project decisions — captured automatically without interrupting your flow.

Four Memory Types

Each memory is a simple markdown file with YAML frontmatter — human-readable, editable, deletable:

markdown
---
name: Use logger utility
description: Never use console.log — use the project's logger utility
type: feedback
created_at: 2026-04-07
updated_at: 2026-04-07
---

Never use console.log for debugging or output. Use the logger utility.

**Why:** console.log bypasses the project's log levels and formatting.

**How to apply:** Import from src/utils/logger.ts. Use logger.info(),
logger.error(), logger.debug() instead of console.log().

What It Doesn't Remember

Auto Memory is selective. It explicitly avoids saving:

Quality over quantity. A typical project accumulates 5-20 memories, not hundreds.

You're Always in Control

text
> remember that deploy freezes happen every Thursday after 2pm

● Saved — I'll remember the Thursday deploy freeze schedule.
text
> forget the memory about the storage refactor

● Removed the storage refactor memory.

Or just edit the files directly — they're standard markdown at ~/.aii/projects/{project}/memory/.

Zero Configuration

Auto Memory is enabled by default. No setup, no API keys, no database. Memories are plain files on disk.

Want to disable it? Two options:

bash
# Environment variable
AII_AUTO_MEMORY_ENABLED=0 aii

# Or in ~/.aii/config.yaml
autoMemoryEnabled: false

Want a cheaper model for the background extraction? Set a utility model:

yaml
# ~/.aii/config.yaml
utilityModel: "deepseek-chat"

Project Isolation

Each project gets its own memory directory. Memories from your payment service don't leak into your frontend app. Git worktrees share the same memory — switch branches freely without losing context.

Get Started

bash
npm install -g @aiiware/aii
aii

Start a conversation. Your agent will start remembering. No configuration needed.


Auto Memory ships in Aii CLI v0.15.6. Update with npm update -g @aiiware/aii.