Memory that survives the session.

Persistent memory for AI agents. File-based. Git-native. Zero database.

Get started
$ npm install perlith

The problem

AI agents forget everything between sessions. Every conversation starts from scratch. Developers compensate with massive configuration files, copy-pasted context, and fragile prompt engineering. The longer the session, the worse the output gets.

Perlith gives agents a structured memory that lives outside the context window. Facts are stored as plain files. Changes are git commits. Retrieval is fast and precise. Nothing is lost when a session ends.

Plain files

Every memory is a markdown file on disk. Read them with cat, search with grep, version with git. No proprietary format.

Git-native

Every write is a commit. Full provenance via git log. Diff any two points in time. Blame any fact to its source.

Tiered memory

L1 episodic (raw), L2 semantic (consolidated facts), L3 procedural (learned behaviors). Nightly dream cycle promotes and prunes.

Multi-agent

Namespace isolation by default. Shared memory with access control. Each agent has its own memory, governed by the same system.

Quick start

const perlith = require('perlith')

// Initialize an agent
await perlith.initAgent('./memory', 'my-agent')

// Store a memory
await perlith.addMemory('./memory', 'my-agent', {
  layer: 'L1',
  body: 'User prefers dark mode and uses VS Code.',
  tags: ['preferences', 'editor'],
})

// Retrieve relevant memories
const results = await perlith.retrieve(
  './memory', 'my-agent', 'editor preferences'
)
MCP Ready

Works with Claude Code, Cursor, and any MCP client

Perlith ships an MCP server. One line in your config, five tools available to your agent: init, store, retrieve, search, and list.

// claude_desktop_config.json or .claude.json
{
  "mcpServers": {
    "perlith": {
      "command": "npx",
      "args": ["perlith-mcp"],
      "env": { "PERLITH_BASE_DIR": "./memory" }
    }
  }
}

Or connect to the hosted endpoint at perlith.dev/mcp for quick experimentation.

Full audit trail

Every decision your agent makes is traceable. No opaque vector stores, no hidden state.

git log --follow agent/L2_semantic/topics/preference-001.md

When was this fact learned? How has it changed?

git diff HEAD~1

What changed in the last memory consolidation?

git blame agent/L2_semantic/topics/preference-001.md

Which agent authored each line of this memory?

Architecture

Perlith is modeled on human memory consolidation. Raw experiences (L1) are clustered overnight into durable facts (L2). Repeated patterns are elevated to procedures (L3). A decay function ensures retrieval quality stays high by letting stale memories fade.

There is no vector database. There is no infrastructure to manage. It runs wherever Node runs, stores data wherever files live, and versions history wherever git works.

Coming soon

Perlith Cloud

Managed Perlith for teams. Same file-based agent memory, cross-device sync, web inspector, and team seats — without the self-host.

  • Managed hosting on our infra
  • Web memory inspector
  • Cross-device / cross-agent sync
  • Team seats with shared namespaces
  • Private GitHub-backed history
  • SOC2-aligned ops (on roadmap)
Join the waitlist →

Opens your mail client. We reply with a short questionnaire and ship invites in waves.