memstate-ai

memstate-ai is a skill for Claude Code, Codex from memstate-ai/memstate-mcp. It costs 60 tokens per session (2,054 once invoked), scanned A, original, Apache-2.0.

A persistent memory system for AI agents that stores facts and project notes in named paths, keeps previous versions, and supports meaning-based search. It requires a Memstate API key.

In plain words
What is it for?
Use it to save and recall facts, manage project knowledge, import Markdown notes, assign values directly, and search agent summaries.
Why use it?
It prevents useful project information from being lost between agent sessions and preserves how that information changed over time.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/ubuntu/skills/memstate-ai/scripts/memstate_search.py.

Good fit Use it to save and recall facts, manage project knowledge, import Markdown…

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code, Codex.

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 memstate-ai

README.md
[![agentmods](https://agentmods.dev/badge/skills/memstate-ai/memstate-mcp/skill.svg)](https://agentmods.dev/skills/memstate-ai/memstate-mcp/skill)
Your own site
<a href="https://agentmods.dev/skills/memstate-ai/memstate-mcp/skill"><img src="https://agentmods.dev/badge/skills/memstate-ai/memstate-mcp/skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,054 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.00060 $0.02054
Opus 5 $0.00030 $0.01027
Sonnet 5 $0.00012 $0.00411
Haiku 4.5 $0.00006 $0.00205

Measured 6d ago against content hash 8d03359f4e8e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

memstate-ai 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 6d ago.

The scan reads SKILL.md. This mod also ships 9 executable files (scripts/memstate_delete_project.py, scripts/memstate_delete.py, scripts/memstate_get.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skill/SKILL.md · 250 lines

How it starts

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

Memstate AI Memory Management

This skill provides a full-featured alternative to the Memstate MCP plugin by interacting directly with the Memstate REST API. It gives agents a persistent, structured, and versioned knowledge base with conflict detection, semantic search, and full version history.

Core Concepts

Concept Description
Project Top-level container for memories (e.g., my_app, backend_api). Auto-created on first write.
Keypath Dot-separated hierarchical path (e.g., auth.method). Auto-prefixed with project.{project_id}.
Memory A single fact or markdown summary stored at a keypath with full version history.
Versioning Writing to an existing keypath supersedes the old value. History is always preserved.
Tombstone Deleting a keypath creates a tombstone version — history is never destroyed.

Input Formats

Direct keypath = value assignment

config.port = 8080
database.engine = PostgreSQL 16
auth.method = JWT with httpOnly cookies
status.deployment = production

Markdown (preferred for task summaries)

## Architecture Decision
- Database: PostgreSQL 16
- Auth: JWT with httpOnly cookies
- Deploy: Docker on AWS ECS
- API style: REST with OpenAPI 3.1

Workflows

Before Starting a Task (Recall)

Always check what already exists before making decisions or modifying code.

# 1. Semantic search — find relevant facts by meaning
python3 /home/ubuntu/skills/memstate-ai/scripts/memstate_search.py \
  --project "my_app" \
  --query "how is authentication configured"

# 2. Browse the full project tree (all domains and keypaths)
python3 /home/ubuntu/skills/memstate-ai/scripts/memstate_get.py \
  --project "my_app"

# 3. Get a specific subtree with full content
python3 /home/ubuntu/skills/memstate-ai/scripts/memstate_get.py \
  --project "my_app" --keypath "database" --include-content

After Completing a Task (Remember)

# Store a single fact (config, status, version numbers)
python3 /home/ubuntu/skills/memstate-ai/scripts/memstate_set.py \
  --project "my_app" \
  --keypath "config.port" \
  --value "8080" \
  --category "fact"

# Store a rich markdown summary (AI extracts keypaths automatically)
python3 /home/ubuntu/skills/memstate-ai/scripts/memstate_remember.py \
  --project "my_app" \
  --content "## Auth Migration\n- Changed from JWT to server-side sessions\n- Added MFA via TOTP\n- Files: auth.go, middleware.go" \
  --source "agent"

Read the full file on GitHub · 250 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. 6d ago First seen · 250 lines · 60 tokens per session scan A 8d03359f4e8e

Subscribe to this mod's changes

memstate-ai is a skill published in the GitHub repository memstate-ai/memstate-mcp (8 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 60 tokens to every session and 2,054 once invoked, about $0.0003 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 skills, from other repositories

dashboard

Open OwnMem Console, the local dashboard for this repository's memory. Use when the user asks to open the dashboard, see memory metrics, check adoption or recall quality, or set up the optional embedding lane. Requires a repository initialized with the dashboard layer.

grpcer/ownmem · 53 tokens

recall

Recall this repository's OwnMem local memory before changing code, and keep it healthy. Use when a repository contains .ownmem/, when past debugging lessons could apply ("have we hit this before", "why is it done this way"), or when the user mentions ownmem, project memory, or recalling across sessions.

grpcer/ownmem · 66 tokens

init

Install or update OwnMem in the current repository. Use when the user asks to set up OwnMem, add local project memory for coding agents, or refresh an existing OwnMem installation after a version bump.

grpcer/ownmem · 43 tokens

ultramemory-snapshot

Compose and save a durable, wayback-grade session snapshot to UltraMemory. Use this whenever you are asked to write a session snapshot or rollup of the work just done — in particular when the UltraMemory capture hook nudges you to "Compose a session snapshot per the ultramemory-snapshot Skill rubric ... and save it…

LogicLabsAI/ultramemory-mcp · 97 tokens

setup

Guides Claude through first-time UltraMemory configuration after plugin install — API key, MCP server registration, test recall, and 401/403 troubleshooting.

LogicLabsAI/ultramemory-mcp · 32 tokens

ownmem-init

Install or update OwnMem in the current repository. Use when the user asks to set up OwnMem, add local project memory for coding agents, or refresh an existing OwnMem installation after a version bump.

grpcer/ownmem · 45 tokens