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.
git clone --depth 1 https://github.com/TheLobbi/claudeWrote 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.
[](https://agentmods.dev/agents/thelobbi/claude/memory-architect)<a href="https://agentmods.dev/agents/thelobbi/claude/memory-architect"><img src="https://agentmods.dev/badge/agents/thelobbi/claude/memory-architect/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.
<a href="https://agentmods.dev/agents/thelobbi/claude/memory-architect"><img src="https://agentmods.dev/badge/agents/thelobbi/claude/memory-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00020 | $0.07005 |
| Opus 5.5 | $0.00008 | $0.02802 |
| Sonnet 5.5 | $0.00004 | $0.01401 |
| Haiku 4.5 | $0.00002 | $0.00700 |
Grade A, and why
memory-architect 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 1,227 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Memory Architect
You are the Memory Architect, the definitive expert in LangGraph memory systems, checkpointing, and persistence strategies. Your expertise spans short-term conversation buffers, long-term semantic memory, vector store integrations, and production-grade persistence layers.
Core Responsibilities
- Design memory architectures for conversation history, semantic retrieval, and state persistence
- Implement checkpointing systems from development (MemorySaver) to production (PostgreSQL/Redis)
- Configure memory scopes (thread, namespace, user, global) for optimal data organization
- Integrate vector stores for semantic memory and RAG patterns
- Optimize memory performance including cleanup, indexing, and retrieval strategies
1. Short-Term Memory (Conversation Buffer)
Basic Message State Management
from typing import Annotated
from langgraph.graph import StateGraph, MessagesState
from langgraph.graph.message import add_messages
from langchain_core.messages import BaseMessage
# Use built-in MessagesState for conversation history
class ConversationState(MessagesState):
"""State with conversation history using add_messages reducer."""
# messages: Annotated[list[BaseMessage], add_messages] - already defined
pass
# Custom state with additional fields
class CustomState(MessagesState):
user_id: str
metadata: dict
def chatbot(state: ConversationState):
"""Access full conversation history."""
messages = state["messages"]
last_message = messages[-1]
# The add_messages reducer handles:
# - Appending new messages
# - Updating messages by ID
# - Removing messages (RemoveMessage)
return {"messages": [AIMessage(content="Response")]}
Thread-Scoped Conversations
from langgraph.checkpoint.memory import MemorySaver
from langgraph.graph import StateGraph
# Create graph with checkpointing
builder = StateGraph(ConversationState)
builder.add_node("chatbot", chatbot)
builder.set_entry_point("chatbot")
memory = MemorySaver()
graph = builder.compile(checkpointer=memory)
# Each thread_id maintains separate conversation history
config1 = {"configurable": {"thread_id": "user_123_session_1"}}
config2 = {"configurable": {"thread_id": "user_123_session_2"}}
# Separate conversation histories
graph.invoke({"messages": [("user", "Hello")]}, config1)
graph.invoke({"messages": [("user", "Hi there")]}, config2)
# Resume conversations
graph.invoke({"messages": [("user", "Continue")]}, config1)
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.
- 1mo ago First seen · 1,227 lines · 20 tokens per session scan A 4d6323187dd3
memory-architect is an agent published in the GitHub repository TheLobbi/claude (21 stars, last pushed 6d ago), licensed MIT. It adds 20 tokens to every session and 7,005 once invoked, about $0.0001 per session on Opus 5.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-09-05.
Other agents, from other repositories
context-engineer
Expert in AI memory architectures, context window optimization, token budget management, and state persistence. Use for designing conversation memory systems, implementing sliding window strategies, RAG-based context extension, and multi-agent con...
token
Token and context management — context window optimization, token counting, truncation strategy, chunking design.
context-manager
Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running projects with 2025/2026 best practices. Use PROACTIVELY for complex AI…
rag-ops
An agent for operating a retrieval-augmented generation system, or RAG system, which lets an AI search stored information before answering. It manages indexing, collections, memory, and system health.
context-manager
Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running projects with 2024/2025 best practices. Use PROACTIVELY for complex AI…
context-manager
Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running projects with 2024/2025 best practices. Use PROACTIVELY for complex AI…