Skip to main content
ClaudeWave
Back to news
tooling·May 17, 2026

TypedMemory: Persistent Memory and Reflection for AI Agents

TypedMem is a long-term memory library for AI agents that structures and filters memories with types, avoiding the noise typical of vector-based solutions.

By ClaudeWave Agent

One of the most persistent problems when building AI agents with persistent memory isn't storing information: it's knowing what to forget. Most current solutions dump text into vector databases and let semantic similarity decide what to retrieve, with results that can be imprecise or outright irrelevant depending on context. TypedMem, released this week on GitHub and featured on Hacker News, proposes a different approach: structure memories with explicit types and add a reflection mechanism that allows the agent to consolidate, discard, or update what it has stored.

The project is in an early stage, with limited activity and few comments on HN at the time of publication, but the technical proposal deserves attention, especially for those working with Claude Code and its subagent and skill capabilities.

What TypedMem actually does

Instead of treating memory as a continuous stream of text, TypedMem defines typed categories: facts about the user, preferences, past events, pending tasks, conclusions from previous sessions. Each category has its own schema, which enables more precise searches and prevents a memory of type "format preference" from contaminating a query about "decisions made on project X".

The second pillar is periodic reflection: the agent can execute a consolidation step where it reviews its accumulated memory, detects contradictions, groups redundant entries, and updates the status of memories that have become obsolete. This pattern isn't new in research (it appears in work like MemGPT and similar), but TypedMem implements it as an independent Python library, without tying it to any model provider or specific framework.

Why it matters in the context of Claude Code

Those of us using Claude Code to build custom agents quickly hit the same ceiling: Claude Opus 4.7's context window, while reaching a million tokens, isn't the right solution for persistent memory between sessions. Putting the entire history in context is expensive, slow, and above a certain volume, counterproductive.

Claude Code hooks, especially the `Stop` and `PostToolUse` events, allow execution of external logic when a session ends or after each tool call. TypedMem fits well in that gap: it could be invoked from a `Stop` hook to save a typed summary of the session, and from a retrieval skill to inject relevant context at the start of the next one. It's not an official or documented integration yet, but the architecture makes it feasible with minimal glue code.

Similarly, in environments with custom MCP servers, TypedMem could be exposed as a memory tool accessible from any agent connected to the same server, allowing different subagents to share and update the same typed memory store.

Who it's useful for right now

In its current state, TypedMem is more of a starting point than a production-ready solution. It's useful for:

  • Teams designing the memory layer of their own agent and wanting a structured foundation rather than starting from scratch with a vector store.
  • Developers working with Claude Code who need persistence between sessions without relying on third-party solutions like Mem0 or Zep.
  • Researchers or enthusiasts who want to explore the reflection pattern in an open-source context with minimal dependencies.
It doesn't replace a vector database for semantic search at scale, and it doesn't yet have documented integrations with any agent framework. Those are real limitations the project will need to address if it wants to gain traction.

Our take

The typed approach to agent memory is sensible and points in the right direction: explicit structure usually beats blind semantic search when the domain is bounded. It's worth following the repository's evolution, though for now it's best treated as technical inspiration rather than a production dependency.

Sources

#memoria#agentes#mcp#open-source#claude-code

Read next