infinit-mem
v3.1.0
Published
Persistent typed memory for AI coding agents — install & forget: auto-inject context via git hooks, 13 memory types, confidence tracking, conflict detection, grounded QA, codebase graphs
Downloads
473
Maintainers
Readme
infinit-mem
Persistent typed memory for AI coding agents (Codebuff, Claude Code, Cursor, Codex, etc.). Three-layer context system inspired by Memanto's memory architecture.
- 13 typed memories — instruction, fact, decision, goal, commitment, preference, relationship, context, event, learning, observation, artifact, error
- Confidence & provenance — every memory tracks how sure you are (0-100) and where it came from (explicit, inferred, observed)
- Codebase graph — deterministic structural map of the entire codebase (zero LLM cost, SHA-256 cached)
Install
npm install -g infinit-memQuick Start
# 1. Initialize a project (creates knowledge.md with memory markers)
cd your-project
infinit-mem init
# 2. Generate the codebase structure graph
infinit-mem graph
# 3. Inject context before starting your agent
infinit-mem injectCommands
Core Memory
| Command | Description |
|---|---|
| infinit-mem save <title> <content> | Save a memory with type, confidence, provenance |
| infinit-mem search <query> | Search with keyword, semantic (--semantic), or temporal (--as-of, --changed-since) filters |
| infinit-mem get <id> | View full memory by ID |
| infinit-mem edit <id> | Edit memory (creates version history) |
| infinit-mem forget <id> | Soft-delete a memory (--hard for permanent) |
| infinit-mem bulk | Bulk import JSON from stdin |
Intelligence
| Command | Description |
|---|---|
| infinit-mem conflicts | Detect contradictory memories (semantic similarity + LLM check) |
| infinit-mem answer <question> | Grounded QA — retrieve relevant memories + LLM answer |
| infinit-mem daily-summary | Summarize yesterday's observations |
| infinit-mem upload <file> | Upload files (.md, .txt, .json, .csv, .py, .ts, etc.) into memory |
Project Setup
| Command | Description |
|---|---|
| infinit-mem init | Create knowledge.md template in current directory |
| infinit-mem graph | Generate/update the codebase structure graph |
| infinit-mem inject | Inject memories + codebase graph into knowledge.md |
| infinit-mem embed | Generate BGE embeddings for all observations |
| infinit-mem session | Start/end/summarize coding sessions |
| infinit-mem export <vault-path> | Export to Obsidian vault (wikilinks, tag indexes) |
| infinit-mem serve [port] | Start HTTP API server |
System
| Command | Description |
|---|---|
| infinit-mem health | Database statistics |
| infinit-mem timeline | Recent sessions for a project |
| infinit-mem projects | List all known projects |
Memory Types (13 from Memanto)
instruction fact decision goal commitment preference relationship context event learning observation artifact error
Plus backwards-compatible aliases: architecture, bugfix, gotcha, codebase-graph
Save with Confidence & Provenance
infinit-mem save "API key rotation schedule" "Rotate all keys every 90 days" \
--type instruction --confidence 95 --provenance explicit --importance 9Temporal Queries
# What changed since last week?
infinit-mem search --changed-since 2026-06-21 --project /my/project
# What did we know as of a specific date?
infinit-mem search "port configuration" --as-of 2026-06-01Conflict Detection
# Find potentially contradictory memories
infinit-mem conflicts --project /my/project --limit 5Grounded Q&A
infinit-mem answer "What database credentials are we using for production?" \
--project /my/project --top-k 5File Upload
infinit-mem upload docs/api-spec.md --type artifact --title "API Specification"
infinit-mem upload data/export.csv --type observationFresh Machine Setup
npm install -g infinit-mem
git clone <your-repo> && cd <your-repo>
infinit-mem init && infinit-mem graph && infinit-mem inject
# Your agent now has full contextEnvironment
| Variable | Default | Description |
|---|---|---|
| INFINIT_MEM_PROJECT | cwd | Default project path |
| INFINIT_MEM_SESSION | — | Current session ID |
| INFINIT_MEM_PORT | 37777 | HTTP server port |
| LLAMA_CPP_BASE_URL | http://127.0.0.1:8081 | LLM for summaries/QA |
License
MIT
