# codex-memory-curator

> Audit, prune, and secure your AI agent's long-term memory to prevent pollution and data leakage.

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

- Price: Free
- Creator: [servrox](https://www.agensi.io/creators/marcel-mayer)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Uses: 6
- Version: 1.0
- Last updated: 2026-05-31
- Security: scan passed (2026-05-31); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/codex-memory-curator
- Tags: ai-agents, memory-management, context-window, ai-ops

## About this skill

### What it does

The Codex Memory Curator is a specialized maintenance utility designed to audit and prune AI agent "memories." As agents accumulate long-term context, they often suffer from memory pollution—stale rules, duplicate entries, or sensitive data leakage across different repositories. This skill provides a structured workflow to inventory, scan for risks, and clean up your agent's durable state.

### Why use this skill

Standard prompting can't easily fix an agent's underlying memory architecture. This skill acts as a professional librarian and security auditor for your agent. It classifies every memory entry into one of several categories (KEEP, MOVE TO AGENTS.md, DELETE, etc.), ensuring that repo-specific rules stay in the repo and global preferences stay in memory.

Key advantages include:

- **Security First:** Employs a redacted risk scanner to identify credentials or sensitive data before you see them.

- **Safe Operations:** Never performs destructive edits without creating a timestamped backup and receiving explicit confirmation.

- **Context Optimization:** Shrinks context windows by moving misplaced documentation from memory into the appropriate project files or config.

### Supported tools

Developed for developers using the Codex ecosystem, it interacts with `~/.codex/memories` and `config.toml` using specialized Node.js scripts for non-destructive inventory and risk assessment.

## Known limitations

- Cannot resolve conflicts in unreachable private repositories.
- Scan depth limited to prevent context overflow.
- Edits require manual multi-step approval.

## 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 codex-memory-curator 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

### What specific problems does the Codex Memory Curator solve?

This skill audits and optimizes your AI agent's long-term memory by identifying 'memory pollution'—such as stale data, duplicate rules, and sensitive information—ensuring your agent remains efficient and secure over time.

### How does the skill ensure I don't lose important information or credentials?

Before any cleanup begins, the tool runs a risk scanner to flag sensitive data and creates a timestamped backup of your current memory state, ensuring no data is lost during the pruning process.

### What platforms or AI agent enviroments is this skill compatible with?

The skill is designed specifically for the Codex ecosystem, interacting directly with local `.codex/memories` and `config.toml` files via specialized Node.js scripts.

### What is included in the package when I purchase this skill?

Your purchase includes the full workflow logic for memory auditing, the pre-built risk scanning scripts, and a set of categorization protocols developed to optimize context window usage.

### Are updates included with the purchase?

Yes, users receive access to version updates that include refined risk signatures and improved classification logic as memory management standards for AI agents evolve.

### What does the initial setup look like for this skill?

Setup is straightforward: once the skill is added to your environment, it hooks into your existing memory directories using provided Node.js utilities to map out your current data structure.

---

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.
