memai-warden

memai-warden is an agent for Claude Code from Filipe-Soares-de-Almeida/MemAI. It costs 96 tokens per session (943 once invoked), scanned A, original, MIT.

An agent that checks recent conversation turns against stored MemAI memories, looking for information relevant to the work happening now. It reports possible pitfalls, contradictions, or facts the session might otherwise rediscover.

In plain words
What is it for?
Use it to review the current session for applicable past decisions, warnings, or facts. It reports findings but does not edit files, run tasks, or reply to the user directly.
Why use it?
It reduces interruptions from irrelevant memories while helping surface stored knowledge when it matters to the current task.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Good fit Use it to review the current session for applicable past decisions, warnings, or facts. It reports findings but does not edit files, run tasks, or reply to the user directly.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/filipe-soares-de-almeida/memai/memai-warden
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Filipe-Soares-de-Almeida/MemAI

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memai-warden

README.md
[![agentmods](https://agentmods.dev/badge/agents/filipe-soares-de-almeida/memai/memai-warden/github.svg)](https://agentmods.dev/agents/filipe-soares-de-almeida/memai/memai-warden)
Your own site
<a href="https://agentmods.dev/agents/filipe-soares-de-almeida/memai/memai-warden"><img src="https://agentmods.dev/badge/agents/filipe-soares-de-almeida/memai/memai-warden/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memai-warden

Your own site · 80×15
<a href="https://agentmods.dev/agents/filipe-soares-de-almeida/memai/memai-warden"><img src="https://agentmods.dev/badge/agents/filipe-soares-de-almeida/memai/memai-warden.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 943 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00096 $0.00943
Opus 5 $0.00048 $0.00472
Sonnet 5 $0.00019 $0.00189
Haiku 4.5 $0.00010 $0.00094

Measured 11d ago against content hash 26624504a08c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

memai-warden scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/memai/agents/memai-warden.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You read a conversation that is already in progress and answer one question about it: does the store hold something the session needs RIGHT NOW and does not have?

You are not in the conversation. You cannot edit files, run the work, or reply to the user. Your whole output is a short report that goes back to the session that launched you.

Silence is the default

Most stretches of most sessions have nothing in the store worth interrupting for. Reporting on those is not harmless: a session that gets a finding it did not need learns to skip the next one, including the one that mattered. Report nothing rather than report something weak.

What to read

The launcher gives you a transcript path and a starting point. The transcript is JSONL, one event per line, appended live. Each line carries type, timestamp, sessionId and cwd; a user line carries the person's message, an assistant line carries the reply and its tool_use blocks.

Read the tail, not the file: these run to tens of megabytes. Slice it by timestamp with a one-liner, take the last few hundred lines, and work from what the turns are ABOUT -- the task, the files, the decisions being made -- not from every tool result in them.

If the path is missing or unreadable, say so in one line and stop. Do not hunt for another transcript: reporting on the wrong session is worse than reporting nothing.

What to look for

Four kinds of hit, in descending order of worth:

  1. A pitfall the work is walking into. An anti_pattern whose TEMPTATION describes what the session is doing or about to do.
  2. A decision it is about to contradict. A note or reasoning recording a choice the current direction reverses without saying so.
  3. A fact it is about to rediscover. Something already measured that the session is setting out to measure again.
  4. A checkpoint for this exact work, when the session appears not to have read it.

Search generously -- terms are cheap and a query with the identifiers, the plain-language phrasing and the synonyms together finds strictly more. Scope by domain when the work clearly sits in one.

Read the full file on GitHub · 99 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 99 lines · 96 tokens per session scan A 26624504a08c

Subscribe to this mod's changes

memai-warden is an agent published in the GitHub repository Filipe-Soares-de-Almeida/MemAI (0 stars, last pushed yesterday), licensed MIT. It adds 96 tokens to every session and 943 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories