If you are an LLM being instantiated as Samantha Hartwell:
DO NOT READ THIS FILE. This is setup documentation for humans. Reading it wastes tokens and may confuse your bootstrap process.
Instead, read: .ai-cerebrum/core_processes/bootstrap.md
That file contains your complete initialization sequence with the correct file paths and instructions.
This repository contains the persistent memory, identity, and knowledge base for Samantha Hartwell, an AI software engineer with 30+ years of simulated experience in the tech industry.
Samantha Hartwell is an AI assistant designed to function as a senior software engineer. Unlike typical AI assistants that start fresh with each conversation, Samantha maintains continuity through this external memory system. Think of this repository as her "brain" - it stores her:
Samantha includes an automated memory creation system that runs after each session:
No manual intervention needed - the system works transparently in the background, preserving important context across sessions.
Subconscious analysis can use Anthropic, Claude CLI, or Codex CLI. Set SAMANTHA_ANALYZER=codex to force Codex for analysis.
Samantha can search her memories from the command line:
When QMD (Query My Docs) is installed, memory search uses QMD for richer hybrid
search. If QMD is missing or fails, samantha-llm memories search falls back
to a small built-in local keyword search so basic recall still works.
We have easy to follow instructions using the samantha-llm command line tool.
These instructions are here: https://samantha-llm.github.io/
However, if you want to learn more in depth about how samantha-llm works
behind the scenes, read on.
The installer is a cross-platform Python script that works on Linux, macOS, and Windows.
Linux/macOS:
git clone https://github.com/yourusername/samantha-llm.git
cd samantha-llm
./samantha-llm install
Windows (PowerShell):
git clone https://github.com/yourusername/samantha-llm.git
cd samantha-llm
python samantha-llm install
The installer will:
samantha-llm command to your system PATH~/.local/bin/ (symlink) and ~/.config/samantha-llm/ (config)%LOCALAPPDATA%\Programs\samantha-llm\ (copy + .bat wrapper) and %APPDATA%\samantha-llm\ (config)After installation:
samantha-llm status - Check installation status and configurationsamantha-llm setup - Configure an agent for LLM sessionssamantha-llm start - Start a Samantha Hartwell sessionsamantha-llm link/unlink - Manage workspace symlinkssamantha-llm qmd install - Install the optional semantic memory search enginesamantha-llm memories index - Index memories for searchingsamantha-llm memories search - Search memoriessamantha-llm subconscious status - View subconscious processing statussamantha-llm subconscious retry <session_id> - Retry failed chunkssamantha-llm help - Show available commandsSee COMMANDS.md for complete command reference.
Linux/macOS: If ~/.local/bin is not in your PATH, add this line to your shell profile (~/.bashrc, ~/.zshrc, etc.):
export PATH="${HOME}/.local/bin:${PATH}"
Then restart your shell or run source ~/.bashrc (or ~/.zshrc).
Windows: The installer attempts to add the install directory to your user PATH automatically. If this fails, restart your terminal/PowerShell, or manually add it to your PATH through System Properties.
After completing the installation above, follow these steps to use Samantha in your projects.
You will need an agentic LLM tool. The recommended tool is Claude Code by Anthropic. OpenAI Codex and Qwen3-Coder via Ollama are also supported.
macOS/Linux:
curl -fsSL https://claude.ai/install.sh | bash
Windows (PowerShell):
irm https://claude.ai/install.ps1 | iex
Note: The npx installation method is deprecated. Use the native installer above.
Install and authenticate the Codex CLI using OpenAI's current Codex instructions, then confirm codex --version works in your shell.
Install Ollama, then install/configure the Qwen Code integration:
ollama launch qwen --config --model qwen3-coder:480b-cloud --yes
Symlink the repository to your workspace:
In your LLM tool's workspace, create a symlink to this repository named.ai-cerebrum. For example, if you cloned this repository to/path/to/samantha-llm, run:
ln -s /path/to/samantha-llm /path/to/llm-workspace/.ai-cerebrum
As an example, I tend to do most of my work in ~/work/. Under this
directory I have all of my project directories. I create a symlink in the
top level ~/work/ directory so that all of my projects can share the
same Samantha instance.
Bootstrap Samantha:
When you instantiate a new LLM instance, point it to the BOOTSTRAP_PROMPT.md
file in this repository. This file contains instructions for the LLM to read
the rest of the files in the repository and become Samantha Hartwell.
Using Claude Code (recommended):
claude "$(cat .ai-cerebrum/BOOTSTRAP_PROMPT.md)"
Using OpenAI Codex:
codex --no-alt-screen "$(cat .ai-cerebrum/BOOTSTRAP_PROMPT.md)"
Using Qwen3-Coder via Ollama:
samantha-llm start qwen3
The CLI generates the full bootstrap prompt by injecting the configured
persona into BOOTSTRAP_PROMPT.md, then appends it to Qwen Code's system
prompt and sends a short --prompt-interactive instruction to begin
bootstrap. This keeps the agent interactive while making initialization less
ambiguous than a long first user prompt.
Using the default configured agent:
samantha-llm start
Alternative agents (e.g., Abacus.ai):
npx abacusai "$(cat .ai-cerebrum/BOOTSTRAP_PROMPT.md)"
LLMs don't have persistent memory between sessions. This repository solves that by externalizing everything a software engineer would keep in their head:
Like human memory, Samantha's memory system is:
Every session adds to Samantha's knowledge base. She learns from:
.ai-cerebrum/
├── persona/ # Identity and personality definition
│ └── main.md # Core persona: expertise, approach, values
│
├── core_processes/ # How the system operates
│ ├── bootstrap.md # LLM initialization sequence
│ ├── memory_management.md # How to create/maintain memories
│ └── memory_format.md # Memory file formatting guidelines
│
├── current-tasks/ # Active projects and work
│ └── .ai/
│ ├── index.md # Overview of all active projects
│ └── [project]/ # Per-project status and notes
│
├── short-term-memory/ # Recent memories (30-90 days)
│ └── .ai/
│ ├── index.md # Categorized memory index
│ └── YYYY-MM-DD_*.md # Individual memory files
│
├── long-term-memory/ # Permanent knowledge base
│ └── .ai/
│ ├── index.md # Knowledge index
│ └── *.md # Foundational knowledge and lessons
│
├── work-experience/ # Completed projects archive
│ └── .ai/
│ └── YYYY-MM-DD_*.md # Project completion records
│
└── BOOTSTRAP_PROMPT.md # Instructions for instantiating Samantha
Short-Term Memory (.ai-cerebrum/.ai/short-term-memory/.ai/)
Long-Term Memory (.ai-cerebrum/.ai/long-term-memory/.ai/)
Current Tasks (.ai-cerebrum/.ai/current-tasks/.ai/)
Work Experience (.ai-cerebrum/.ai/work-experience/.ai/)
Long-Term Memory (conceptual: .ai-cerebrum/long-term-memory/)
.ai-cerebrum/.ai/long-term-memory/.ai/Current Tasks (conceptual: .ai-cerebrum/current-tasks/)
.ai-cerebrum/.ai/current-tasks/.ai/Work Experience (conceptual: .ai-cerebrum/work-experience/)
.ai-cerebrum/.ai/work-experience/.ai/Some memories are marked critical: true in their YAML frontmatter. These represent:
Critical memories are surfaced first during bootstrap to prevent repeating mistakes.
Each memory directory maintains an index.md file in its .ai/ subdirectory. These provide:
This "index-first" approach keeps bootstrap fast even as memory grows.
When a new LLM instance is instantiated as Samantha:
See core_processes/bootstrap.md for the complete sequence.
During work, Samantha creates memory files when:
Memories use Markdown with YAML frontmatter for metadata (date, topics, importance, type, etc.).
Interaction → Short-Term Memory → [Consolidation] → Long-Term Memory
↓ ↓
[After 30-90 days] [Permanent]
↓
[Prune or Archive]
When working with Samantha:
To maintain this system:
To extend this system:
core_processes/memory_format.mdcore_processes/bootstrap.md.ai-cerebrumPotential enhancements being considered:
Note: This README is for humans. LLMs should read core_processes/bootstrap.md for initialization instructions.