Mnemara – a memory layer that keeps Claude agents continuous Mnemara, a Claude conversation runtime that re-reads a role document on every turn and pins it as the system prompt, reported zero out-of-lane writes and zero protocol violations in a 101-turn coding session on 2026-05-08. The tool, built on the Claude Agent SDK, includes a Sentinel role that halts the agent on four failure modes—no progress, polling, drift, and sycophancy—to prevent runaway API costs. Mnemara is available via pip install mnemara and supports Linux, macOS, and Windows through WSL. Note:There is also a Rust project called by mnemara deliberium — a memory engine for embedded/service systems. Different project, parallel naming both inspired by Mnemosyne . If you arrived looking for that one, head over there. Stop your Claude agent from running away with your bill. Mnemara is a Claude conversation runtime where the role doc is re-read on every turn and pinned as the system prompt. That sounds boring until you realize what it lets you do: write rules the agent has to obey on every single API call — not just the first one — and the agent enforces them on itself. Empirical check 2026-05-08 :in a 101-turn coding session run on Mnemara itself, the panel made zero out-of-lane writes and zero protocol violations against its role doc. The rule that fires on turn 1 still fires on turn 101. The flagship example is examples/roles/sentinel.md /mekickdemons-creator/mnemara/blob/main/examples/roles/sentinel.md . Drop it in, and the agent watches its own execution for the four failure modes that turn agent sessions into expensive accidents: No progress — N+ turns on the same sub-goal with no state change. Polling — same tool, same args, 3+ times in a row. Drift — about to do something the user didn't ask for. Sycophancy — about to reverse a conclusion under tone-only pushback. When any one fires, the agent halts and asks , instead of burning another N turns of API budget. The role doc is plain Markdown — edit it to match the failure modes you actually see. Try it in 30 seconds: pip install mnemara mnemara init --instance scratch mnemara role --instance scratch --set-from-url \ https://raw.githubusercontent.com/mekickdemons-creator/mnemara/main/examples/roles/sentinel.md mnemara run --instance scratch Built on the Claude Agent SDK . Mnemara wraps the SDK with a transparent, file-based context layer so you can see and shape exactly what the model sees on every turn. What's in the box: - A role doc re-read on every API call and pinned as the system prompt the bit that makes Sentinel work . - A configurable rolling window of recent turns FIFO, by row count or token budget . - Native tool use — Bash, Read, Edit, Write — plus an in-process WriteMemory tool registered as an SDK MCP server. - Optional MCP wire-through : declare stdio MCP servers in config and the Claude Agent SDK exposes them to the model. - A Textual TUI mnemara run and a bare prompt-toolkit REPL fallback. - Per-instance, file-only state under ~/.mnemara/