Persistent codebase memory for AI coding agents
AI coding agents are stateless by default — every session starts from zero, re-learning the same codebase, repeating the same mistakes. Mindr fixes this. It gives every agent — Claude Code, Codex, OpenCode, Cursor, Aider — a persistent, structured memory of your codebase that compounds over time.
Note on naming. Mindr is the product name. The CLI binary on npm is
mindragent(the namemindrwas already taken). The npm SDK package is still@ai-emart/mindr. MCP tool names likemindr:get_contextare protocol identifiers and remain unchanged.
# Install
npm install -g mindragent
# Set up Mindr in your repo
cd my-project
mindragent init
# Generate AGENTS.md from observed patterns
mindragent generate agents-mdSample output:
# AGENTS.md
## Project Overview
- Stack: TypeScript, Express, PostgreSQL
- Pattern: tRPC internally, REST externally
## Conventions
- camelCase functions: 97%
- PascalCase classes: 100%
- kebab-case files: 89%
## Recent Decisions
- Apr 17: Switched to tRPC for internal APIs [api-layer]
- Mar 30: JWT + Redis refresh tokens [auth]
- Mar 15: Paystack only, Flutterwave deferred [payments]
## Technical Debt
- src/billing/invoice.ts:47 — Temporary retry logic (43 days)
- src/auth/session.ts:112 — Race condition under high load (12 days)npm install -g mindragentAdd to .claude/settings.json:
{
"mcpServers": {
"mindr": { "command": "mindragent", "args": ["serve"] }
}
}Add to codex.toml:
[[mcp_servers]]
name = "mindr"
command = "mindragent serve"npm install @ai-emart/mindrimport { Mindr } from '@ai-emart/mindr';
const mindr = await Mindr.open({ project: './my-project' });
await mindr.remember('We use tRPC for all internal APIs', { type: 'decision', module: 'api' });
const context = await mindr.getSessionContext({ module: 'auth' });
const decisions = await mindr.query({ type: 'decision', module: 'auth' });
const debt = await mindr.getDebt();
const conventions = await mindr.getConventions();
mindr.close();MIT © 2026 ai-emart