MemoryLake
Engineering & Developerpersistent memory for AI coding agents

Give Coding Agents Memory That Survives Every Session Boundary

Every new coding session starts cold. The agent re-discovers your repo, re-asks about conventions, and re-makes decisions it already made yesterday. MemoryLake gives AI coding agents persistent memory across sessions, tools, and models — so what the agent learned about your codebase stays learned.

Day 1“Every new coding session starts cold.”✓ Got it, I will remember.Day 7 — new session“Same task again — can you keep the context?”× Sure — what was the context again?(forgot every detail you taught it)+ MEMORYLAKE LAYERMemory auto-loadedRepo-scoped persistent memoryCross-tool portabilityReflection memory blocks repeat mistakesSESSION OUTPUT✓ Same prompt, on-brand answerNo re-briefing required.

Give Coding Agents Memory That Survives Every Session Boundary

Get Started Free

Free forever · No credit card required

The problem: AI coding agents forget everything between sessions

A coding agent spent two hours yesterday mapping your microservices and deciding how to refactor the auth layer. Today, new session, blank slate. It re-reads the same files, re-asks the same clarifications, and possibly proposes the approach you already rejected.

How MemoryLake solves persistent memory for AI coding agents

Repo-scoped persistent memory

Repo-scoped persistent memory

Every agent action, decision, and rejected suggestion is stored as typed memory tied to the repository.

MEMORYCross-tool portability

Cross-tool portability

The agent's memory works whether it's running in Cursor, Claude Code, Windsurf, a custom CLI, or a CI pipeline.

MEMORYReflection memory blocks repeat mistakes

Reflection memory blocks repeat mistakes

When a suggestion gets rejected, the reason is captured. Future sessions stop proposing the same dead end.

Git-style memory branches

Git-style memory branches

Memory follows feature branches. Speculative work doesn't pollute the main memory until you merge.

Get Started Free

Free forever · No credit card required

How it works for AI coding agents

  1. Connect — Add MemoryLake to the agent via SDK or MCP.
  2. Structure — Every action, file read, and decision is classified into the right memory type.
  3. Reuse — On the next session, the agent loads relevant prior memory before its first reasoning step.

Before vs. after: coding agent persistent memory

Without MemoryLakeWith MemoryLake
New session beginsAgent re-explores the repoAgent loads prior memory
Same refactor questionAsked again every timeDecision already in memory
Switching from Cursor to Claude CodeLose contextSame memory, new tool
Six-hour autonomous runRestart from zero on crashResume from last commit

Who this is for

Engineering teams running AI coding agents for refactors, migrations, code reviews, or long-running automation — where the agent needs to remember decisions across sessions and the cost of starting over is real engineering time.

Runnable demoabout 7 minutes

Try this use case on your own account

Saltmarrow Pay's coding agent runs on Claude Haiku 4.5 through MemoryRouter. Every request carries the same 12,100-token repository guide, marked for Anthropic prompt caching, and MemoryRouter attaches what the team decided in earlier sessions. The developer works a short session, steps away for five and a half minutes, and comes back. With the default 5-minute cache, the first request after the break wrote the whole guide again at the cache-write price (6 of 6 runs). With a 1-hour TTL, or one keep-alive call four minutes into the break, the guide was read from the cache (6 and 6 of 6). The memory was there either way: every setting answered from decisions written before the break. Over both sessions the default cost 0.42 times an uncached agent, the 1-hour TTL 0.37 and the keep-alive 0.29.

What you will see

  • Yesterday's session notes go in with fact add, one boundary covers them, and prices come from memorylake router models (cache write for 5 minutes and for 1 hour, cache read)
  • Every request goes out four ways with memorylake router messages --body and --boundary: no cache_control, the default 5-minute TTL, ttl: 1h, and 5 minutes plus a 1-token ping
  • The break is real, 5½ idle minutes; each reply's ephemeral_5m_input_tokens, ephemeral_1h_input_tokens and cache_read_input_tokens show which cache survived it
  • The bill splits both sessions and the break, with a computed table for other break lengths; ask sends one question with the team's memory; there is a local web UI

You need: a MemoryLake API key · the memorylake CLI · Python 3.9+

Run it

git clone https://github.com/memorylake-ai/memorylake-usecases.git
cd memorylake-usecases/cache-ttl-memory
export MEMORYLAKE_API_KEY=sk-…
python3 demo.py          # or: python3 web/server.py

Watch it run · real, unedited recordings

Related use cases

Frequently asked questions

Does this work with autonomous coding agents like Devin or SWE-agent?

Yes. Any agent that can call an MCP server or HTTP API can use MemoryLake as its memory backend.

How is repo-scoped memory isolated?

Each repository has its own namespace. Per-branch scoping is available for speculative or feature-specific memory.

What gets logged in the audit trail?

Every memory write, with author (agent or human), timestamp, and source. Critical for reviewing what an autonomous agent did overnight.