Agent-Memory: Persistent Memory for AI Coding Agents
This repository profile is provided by osrepos.com, an open source repository discovery platform.
Summary
Agent-Memory provides persistent memory for AI coding agents, ensuring they remember past interactions and learned patterns across sessions. Built on the iii engine, it eliminates the need for re-explaining context, significantly improving agent efficiency and reducing token usage. This solution integrates seamlessly with various agents, offering a robust memory management system.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Agent-Memory is a groundbreaking open-source solution providing persistent memory for AI coding agents. It addresses the common challenge of agents forgetting context between sessions, ensuring they remember everything from architectural decisions to specific code patterns. Built on the robust iii engine, Agent-Memory significantly enhances agent efficiency, reduces token usage, and offers seamless integration across various AI coding environments.
This tool ensures your coding agent remembers everything, eliminating the need for constant re-explanation. It boasts impressive benchmarks, including 95.2% retrieval R@5 and 92% fewer tokens, all while requiring zero external databases. Agent-Memory is compatible with a wide range of agents, including Claude Code, Cursor, Gemini CLI, Codex CLI, Hermes, OpenClaw, pi, OpenCode, and any MCP client.
Installation
Getting started with Agent-Memory is straightforward. You can install it globally via npm or use npx for a quick start.
To install globally and have agentmemory on your PATH:
npm install -g @agentmemory/agentmemory
# If you encounter EACCES on macOS/Linux, try:
# sudo npm install -g @agentmemory/agentmemory
Once installed, start the memory server:
agentmemory
Alternatively, use npx for a no-install run:
npx @agentmemory/agentmemory
Examples
Try it in 30 seconds
To see Agent-Memory in action, run the demo which seeds sample data and demonstrates recall:
# Terminal 1: start the server
npx @agentmemory/agentmemory
# Terminal 2: seed sample data and see recall in action
npx @agentmemory/agentmemory demo
The demo command populates Agent-Memory with realistic sessions (e.g., JWT auth, N+1 query fix, rate limiting) and performs semantic searches, showcasing its ability to find relevant information beyond keyword matching. You can also open http://localhost:3113 in your browser to watch the memory build live.
Connecting with Agents
Agent-Memory works with any agent that supports hooks, MCP, or a REST API. For example, to connect with Claude Code, you can use the following steps:
- Start the memory server:
npx @agentmemory/agentmemoryin a separate terminal. - In Claude Code, add and install the plugin:
/plugin marketplace add rohitg00/agentmemoryand/plugin install agentmemory.
For other agents like Codex CLI, Cursor, or Gemini CLI, similar integration steps involving MCP configuration or plugin installation are available. Refer to the official repository for detailed instructions for each agent.
Programmatic Access
Agent-Memory's core operations are exposed as iii functions (mem::remember, mem::observe, mem::smart-search). You can access these programmatically using the iii-sdk in Python, Rust, or Node.js.
from iii import register_worker
iii = register_worker("ws://localhost:49134")
iii.connect()
iii.trigger({
"function_id": "mem::smart-search",
"payload": {"project": "demo", "query": "how do tokens refresh"},
})
Why use Agent-Memory
AI coding agents often forget context, leading to repetitive explanations and wasted tokens. Agent-Memory solves this by silently capturing agent interactions, compressing them into searchable memory, and injecting relevant context into new sessions. This results in significant token savings, improved precision in retrieval, and a more natural, continuous development experience.
Unlike built-in agent memory solutions (like MEMORY.md in Claude Code or notepads in Cursor), Agent-Memory offers:
- Unlimited Scale: No 200-line cap, handles vast amounts of information.
- Advanced Search: Hybrid semantic, keyword (BM25), and knowledge graph search with RRF fusion.
- Token Efficiency: Achieves approximately 1,900 tokens per session, a 92% reduction compared to loading full context.
- Cross-Agent Compatibility: Works across multiple agents via MCP and REST APIs, allowing shared memory.
- 4-Tier Memory Consolidation: Inspired by human memory, it processes raw observations into episodic, semantic, and procedural memories, with decay and strengthening mechanisms.
- Automatic Capture: Records every tool use via hooks, requiring zero manual effort.
- Privacy First: Strips API keys and secrets before storage.
- Real-time Viewer: Provides a live observation stream, session explorer, and knowledge graph visualization on
http://localhost:3113.
Links
- GitHub Repository: https://github.com/adamaragon/Agent-Memory
- Official Website: https://agent-memory.dev
- License: Apache-2.0
Related repositories
Similar repositories that may be relevant next.

CCCC: Coordinate Your Coding Agents Like a Group Chat
September 29, 2026
CCCC is a production-minded orchestrator designed to coordinate coding agents like a group chat, offering features such as read receipts, delivery tracking, and remote operations from your phone. It enables 24/7 workflow for multi-agent teams with a single `pip install` and zero infrastructure. This tool helps manage diverse AI runtimes, ensuring persistent collaboration across different machines and trusted working groups.
AI Session Search: Ultra-Fast AI Agent Session Analysis
September 29, 2026
AI Session Search (aise) is an ultra-fast, Rust-powered tool designed for searching and analyzing local AI agent coding sessions. It seamlessly integrates and indexes nine different session formats, including those from Claude, Codex, Cursor, and Gemini CLI. This powerful utility enables developers to quickly recover context, track agent behavior, and efficiently manage their AI-generated code history.

Pydantic AI Harness: Enhancing Your AI Agents with Robust Capabilities
September 28, 2026
Pydantic AI Harness is the official capability and harness library for Pydantic AI, designed to extend agents for complex, long-running tasks. It provides a modular system of "capabilities" for functionalities like file system interaction, web research, memory, and sub-agent delegation. This library enables developers to build sophisticated and durable AI agents with ease.

Router: Optimize AI Model Selection and Costs for Agentic Systems
September 28, 2026
The Weave-OS Router is an intelligent model router for agentic systems, optimizing AI model selection for every request. It acts as a drop-in proxy for major AI providers, routing prompts to the most suitable model in under 50ms. This solution helps users significantly cut costs, often by 40-70%, simply by changing an endpoint.
Source repository
Open the original repository on GitHub.
14 counted GitHub visits