MemoFSMemoFS

What is MemoFS?

The file-first memory runtime for AI agents — architecture, mental model, and agent memory loop.

MemoFS is a file-first memory runtime for AI agents. It bridges the gap between ephemeral agent context windows and persistent codebase evolution by storing decisions, architectural constraints, project conventions, and search indexes directly as Markdown and JSONL files in your repository.

Designed for Two Primary Paths

Whether you are a developer using AI coding agents day-to-day (Claude Code, Cursor, Codex, Copilot, Cline) or an engineer building custom AI agents and agentic systems, MemoFS provides the standard runtime for structured, persistent agent memory.

Which Path Fits You?


The 4-Stage Agent Memory Loop

Every effective AI agent follows the four-phase MemoFS memory cycle:

1

Load Context

At the start of every session or task, the agent calls memofs.context to load core rules, architecture constraints, and recent briefing fragments.

2

Recall Past Decisions

Before modifying code or making assumptions, the agent queries memofs.recall to surface exact past reasoning, schemas, or prior bug fixes.

3

Execute With Memory

The agent performs the code modifications, refactors, or tests while strictly adhering to recalled decisions and repository constraints.

4

Persist Discoveries

Before ending the turn, the agent calls memofs.remember to write newly learned facts, root causes, or architectural patterns into .memofs/.


The Mental Model in 3 Core Tenets


Architectural Comparison

  • Storage: Plain Markdown & JSONL in .memofs/
  • Offline Execution: 100% local, 0 external API keys required
  • Search: BM25 keyword + optional vector hybrid search + knowledge graph
  • Collaboration: Git-versioned with optional cloud edge replication
  • Transparency: Fully human-auditable and editable in any IDE

Explore the Documentation

On this page