$ show rohitg00/agentmemory
AgentMemory is a persistent memory system designed for AI coding agents (Claude Code, Cursor, Codex, etc.) that captures agent observations via hooks, compresses and stores them, and enables semantic/recall search across sessions. Built on the iii-engine framework, it provides a modular architecture with CLI, REST API, MCP server, and web viewer interfaces. The system eliminates repetitive context re-explanation by automatically injecting relevant memories into agent sessions, implements memory consolidation to extract stable facts, and includes features like working memory management, audit trails, and health monitoring. Agent integrations occur through platform-specific hooks and MCP tools, allowing agents to store observations and retrieve context without manual intervention.
The LLM identified 5 files worth highlighting for reuse:
Provides async keyed mutex implementation for preventing race conditions on specific resources. Self-contained with minimal dependencies, this pattern ensures safe concurrent access to shared resources like sessions or actions. Extractable to any Node.js application needing resource-specific locking mechanisms.
Implements TTL-based deduplication using Map with automatic cleanup. Solves the common problem of preventing duplicate processing without external timers or complex scheduling. The component is self-contained, dependency-free, and could be extracted for use in any caching or deduplication scenario requiring time-based expiration.
Centralized privacy filtering system that detects and strips personally identifiable information (PII) from agent observations. Uses comprehensive regex patterns for emails, phone numbers, API keys, and other sensitive data. Self-contained and easily extractable, this module provides essential data protection for any system handling user-generated content.
Implements resilient provider pattern with circuit breaker and fallback chain mechanisms for LLM provider integration. Protects against cascading failures and provides graceful degradation when external services become unavailable. Demonstrates non-obvious skill in combining multiple resilience patterns into a cohesive, reusable solution.
Standardized hook implementation pattern for AI agent integration. Each hook follows a consistent structure: reading JSON stdin, filtering SDK child contexts, and POSTing to the REST API. This pattern solves the problem of inconsistent agent hook implementations and provides a reusable template for integrating with new agent platforms.