# AI Memory

> Git-native long-term memory for AI agents to persist project architecture, module boundaries, and coding preferences.

AI Memory is a free AI agent skill on Agensi by Maxx, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Maxx](https://www.agensi.io/creators/maxx)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-11-27
- Security: scan passed (2026-11-27); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/ai-memory
- Tags: ai-agents, git, markdown, mcp-server, context-management

## About this skill

Engineering knowledge often dies in ephemeral chat threads. AI coding agents lose context across sessions, leading to repeated mistakes, architectural drift, and manual re-explanation of preferences. This skill provides a durable, Git-native memory layer that persists across Claude Code, Cursor, and other IDE agents.

### What it does
- **Persistent Memory Management**: Maintains a three-layer hierarchy of global preferences, project architectures, and module-specific design decisions.
- **Context Bootstrapping**: Rapidly loads architectural constraints and past pitfalls when starting a new task or taking over an existing module.
- **Decision Distillation**: Extracts durable conclusions from conversations while filtering out noise like temporary debug logs or trial-and-error drafts.
- **Cross-Agent Sync**: Uses a private Git-backed Markdown repository to share project context across different devices and AI tools.
- **Secret Blocking**: Automatically checks for and blocks API keys, tokens, and PII from being saved into the long-term memory store.

### How it works
1. **Initialize**: Call `bootstrap` or `get_core_context` to load existing project rules, module indices, and personal coding profiles.
2. **Context Retrieval**: Use `takeover` or `search_memory` to find specific design decisions, API contracts, or related module relationships before writing code.
3. **Execution**: Implement features while following the retrieved constraints and avoiding documented "hard-won pitfalls."
4. **Distill**: Use the `distill` or `remember` commands to save new architectural decisions and update the `Last Verified` timestamps.

### Frameworks & tools
The system is built on local Markdown files and Git. It includes an optional local Node.js (>= 18.18) MCP server for structured tool access. It works with any IDE-based AI agent including Claude Code, Cursor, Windsurf, and VS Code Copilot.

### Why this beats prompting it yourself
Manual prompting requires you to remember what to tell the AI every single time. This skill automates the retrieval of complex module relationships and past mistakes that you would otherwise forget to mention, ensuring the AI never makes the same error twice.

### Use cases
- **Module Handoff**: Quickly onboard an AI agent to a legacy module by loading its specific constraints and external contracts.
- **Architectural Alignment**: Maintain consistency across a multi-repo project by sharing a single `overview.md` for architectural conventions.
- **Pitfall Prevention**: Document a specific bug-prone pattern once so the agent avoids it in all future sessions.
- **Agent Switching**: Move a task from Claude Code to Cursor without losing the high-level design decisions made in the previous chat.

### Known limitations
Does not support automatic Git commits or pushes to the memory repository. Requires manual review of diffs and syncing via provided shell scripts.

### Companion Local MCP Server
Includes setup instructions for the optional open-source **AI-Memory** local stdio MCP server and cross-platform Git sync scripts (MIT License, search `MiaoBiao / AI-Memory` on GitHub).

## Requires

- Node.js
- Git
- Print MCP

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the AI Memory skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does AI Memory prevent my coding agent from forgetting project rules between sessions?

This skill solves the "ephemeral context" problem by providing a Git-native Markdown layer where AI agents can store and retrieve architectural decisions, module boundaries, and coding preferences that usually get lost when a chat session ends.

### Which AI agents and IDEs are compatible with this memory skill?

The skill is designed for any IDE-based agent that supports local tool execution, including Claude Code, Cursor, Windsurf, and VS Code Copilot, utilizing a local Node.js-based MCP server for structured access.

### What is required to set up the memory store for the first time?

Setup involves initializing a private Git repository for your memory files and connecting the provided Node.js MCP server to your agent's configuration to enable tool-based memory retrieval and distillation.

### Does this skill pose any security risks regarding my API keys or sensitive project data?

For security, the skill includes a built-in "Secret Blocking" feature that automatically identifies and prevents API keys, tokens, and PII from being saved into your long-term memory store.

### Why should I use this instead of just adding project rules to my system prompt?

Unlike static prompts, this skill acts as a dynamic database that automatically retrieves only relevant module relationships and "hard-won pitfalls" for the specific task at hand, reducing token noise and manual effort.

### What exactly is included in the purchase of this skill?

You receive the complete MCP server implementation, a structured Markdown template system for organizing project hierarchy, and the specialized tool definitions that allow your agent to "distill" and "search" memory.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
