Aidimag

io.github.AiDimag由 GitHub 帳號 AiDimag 發布v1.0.22更新於 Oct 24, 2026

Persistent, verified memory for AI coding agents: recall, capture, guardrails, review queue.

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

AIDimag 為程式開發助理提供持久、經證據驗證的程式碼倉庫記憶,保存在本機 .aidimag/ 目錄並透過 MCP 提供。

可以做什麼
搜尋與召回倉庫記憶,支援依路徑限定與依可信度排序,並提供工作階段開始簡報與短期工作階段便箋。提出新記憶、在對話中即時記錄事實、擷取工作階段紀錄,並以基於已驗證記憶的第二審查者進行檢視。將提交、PR、聊天紀錄與貼上的文件挖掘為需人工審核的候選項目,未經審核不會寫入。從已連接的工單系統取得工單,讓工單脈絡與候選項目並列顯示。把已驗證記憶輸出為靜態脈絡檔案,供不使用 MCP 的助理讀取。
適用情境
適用於助理長期在同一程式碼倉庫工作、需要跨工作階段記住決策、慣例、易錯點與失敗作法的情境,也適用於過時或未經驗證的事實比沒有記憶更危險的情況。適合希望記憶先經審核再寫入、並隨程式碼變動持續驗證的團隊。
執行需求
以 npm 套件形式透過 npx 在本機執行,需要 Node 22 或更新版本。AIDIMAG_REPO 應指向要服務的 git 倉庫,否則從目前工作目錄往上尋找。AIDIMAG_LLM 選擇擷取所用的提供者(openai、ollama 或 off),可自動偵測;僅在使用 OpenAI 提供者時需要 OPENAI_API_KEY。選用的團隊同步與工單整合需要各自的憑證。
安裝前請注意
選擇 OpenAI 提供者進行擷取時,OPENAI_API_KEY 會傳送給 OpenAI。安裝過程會寫入 git 鉤子,並可能在倉庫中產生 .cursorrules、CLAUDE.md、AGENTS.md 等脈絡檔案。工單憑證依倉庫存放在 .aidimag/config.json,或透過 AIDIMAG_TICKET_TOKEN 提供。經團隊同步傳入的 shell 指令證據在檢查並核准前不會執行;擷取工作階段紀錄可能包含敏感資訊。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Aidimag,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README


What is AI Dimag?

AI Dimag is a memory system for software engineering — not a general-purpose "AI memory" app. It gives any MCP-compatible agent (Claude, Cursor, Copilot, Windsurf…) a persistent memory of your codebase that survives across sessions — decisions, conventions, gotchas, failed approaches, guardrails, and reusable skills — stored as falsifiable claims with grounding evidence in .aidimag/ next to your code.

The subject of memory is your repository, not your preferences or chat history. Every capability — evidence, git-hook verification, guardrails, pre-commit checks, path-scoped recall, session scratchpad — exists to serve day-to-day development work.

The Difference: Claim-and-Verify, Not Store-and-Retrieve

Most memory systems store text and retrieve whatever is similar later — a stored fact is assumed true forever. That's dangerous in a codebase, where a confidently-retrieved stale fact is worse than no memory at all.

Every AI Dimag memory carries evidence (a shell check, an anchored commit, a test) that dim verify re-runs against the current repo — automatically, via git hooks, on every pull, checkout, and rebase. Beliefs that stop being true go STALE instead of silently misleading your AI.

Works with Every AI Tool

  • MCP tools (Claude, Cursor, etc.) get real-time memory via the MCP server
  • Non-MCP tools (Copilot, Windsurf, etc.) get static context files (.cursorrules, CLAUDE.md, AGENTS.md, etc.)

Install

sh
npm install -g aidimag

Requires Node 22+. Ships two equivalent binaries: dim (short) and aidimag.

Quick Start

sh
cd your-repodim init                    # creates .aidimag/, installs additive git hooksdim bootstrap               # optional: LLM-survey the repo into a starter memory setdim review                  # approve what enters memory (nothing is stored unreviewed)
dim remember "All DB access goes through src/db/store.ts" -k INVARIANT -p src \  -e "STATIC_CHECK:! grep -rl better-sqlite3 src --include=*.ts | grep -v store.ts"dim recall db accessdim verify                  # re-run all evidence; stale beliefs get flaggeddim brief                   # session-start briefing: in-scope memory, guardrails, gaps
# For non-MCP tools (Copilot, Cursor without MCP, etc.):dim generate-context --format all --auto   # creates .cursorrules, CLAUDE.md, AGENTS.md, etc.

One-command setup

sh
dim setup --yes              # init + git hooks + MCP configs for detected agents + context filesdim setup-ollama             # install Ollama + pull a free local embedding model for semantic searchdim doctor                   # verify everything is wired correctly

Connect to Your AI Agent (MCP)

Add to your agent config (e.g. .mcp.json for Claude Code):

json
{  "mcpServers": {    "aidimag": {      "command": "npx",      "args": ["-y", "aidimag", "mcp"],      "env": { "AIDIMAG_REPO": "/path/to/your/repo" }    }  }}

MCP Tools get memory_search, memory_propose, context_note (live in-chat fact capture), chat_harvest (live, tool-agnostic session harvesting with server-side secret redaction), memory_critique (a second critic grounded in verified memory), session-start briefings, session-end extraction, and more.

Non-MCP Tools: dim generate-context -f all renders verified memory into .cursorrules, CLAUDE.md, AGENTS.md, .windsurfrules, and .github/copilot-instructions.md (--auto keeps them refreshed).

Hermes Agent: dim hermes install registers aidimag as a native Hermes memory provider — one command, no pip, no venv. A single stdlib-only Python bridge delegates to the MCP server: session briefings are injected into the system prompt, recall is prefetched per turn, and session learnings become review-queue proposals (never silent writes). Then: hermes config set memory.provider aidimag.

Key Features

Human-Gated Capture

Commits, PRs, AI-chat transcripts (Claude Code, Codex, Copilot, Cursor), and pasted docs are mined into proposals. Nothing enters memory until you approve it in dim review (auto-triaged best-first, approve all --min-score 0.7 for batches).

Verification Lifecycle

STATIC_CHECK / COMMIT_REF / TEST_RESULT / EXEC_TRACE / HUMAN_ATTESTED evidence. Failing evidence flips memories to STALE and auto-drafts a recovery proposal. Confidence decays without re-confirmation.

Evidence Trust Gate

Shell-command evidence that arrives via team sync is never executed until you inspect and approve it (dim verify --trust).

Hybrid Semantic Recall

FTS5 keyword + vector KNN (OpenAI, local Ollama, or AWS Bedrock; auto-detected except Bedrock, which is explicit opt-in; works keyword-only with none).

Guardrails & Skills

Behavioral rules (never / ask-first / always) and step-by-step procedures, enforced by dim check (pre-commit) and memory_critique.

Team Mode, Self-Hosted

dim serve + dim sync: local-first replicas, device-code login, brain-scoped API keys, hashed credentials, cross-machine verification consensus.

Knowledgebase Inbox

Drop design docs / ADRs / PDFs / DOCX into knowledge/ and they're summarized into reviewed, pinned memories.

Scratchpad & Provenance Audit

dim scratch (and the scratchpad_* MCP tools) hold short-term session notes — TTL-expiring, never synced, never durable memory. dim audit lists memories resting on the weakest ground (agent-authored, evidence-free, stale, or long-unverified) so you can fix them up like a dependency audit for your repo's knowledge.

Web Dashboard & Extensions

dim ui — run checks, session briefings, bootstrap, harvest, and context generation from the browser — plus VS Code and IntelliJ extensions.

Ticketing Integration

Commits tell you what changed; tickets hold the why. aiDimag connects to your ticketing system so that context flows into your memory — ticket titles, types, and statuses appear next to mined proposals during dim review, and agents can fetch tickets via the ticket_get MCP tool.

Supported providers

Jira, GitHub Issues, Linear, GitLab Issues, Azure DevOps, ClickUp, Shortcut, YouTrack, Asana, Trello, Notion, Pivotal Tracker, a custom HTTP middleware, or Remote (team sync server — zero local credentials).

Quick start

sh
# Connect a provider (interactive)dim ticket connect
# Check statusdim ticket status
# View a specific ticketdim ticket show XXX-2100
# Share credentials with your team (admin)dim ticket share

Per-repo credential storage

Ticket credentials are stored per-repo in .aidimag/config.json under tickets.token (with file mode 0o600), matching the same pattern as cloud sync tokens. Credentials never leak between projects. You can also set the AIDIMAG_TICKET_TOKEN environment variable, which takes precedence over the config file.

Team-shared tickets (Remote provider)

One admin shares their ticket credential via the sync server (dim ticket share). Team members select "Remote (team sync server)" as their provider — they resolve tickets through the server and hold zero ticket credentials locally. When a cloud server is linked, the dashboard auto-discovers the team's ticket provider and shows a "Connect now" button.

Branch conventions

Define a branch-naming convention and have aiDimag warn or block on violations:

sh
dim ticket branch-rule        # manage the conventiondim branch XXX-2100           # create a conforming branch (fetches title for slug)
EnforcementEffect
offNo checking
warnHeads-up at branch creation (post-checkout)
pushBlocks pushing non-conforming branches (pre-push)

Full guide: Connecting tickets

How It Compares

AI Dimag follows a claim-and-verify model; other memory systems follow store-and-retrieve. The short version:

Conversational memory layersVector-store memory pluginsHand-maintained context filesAI Dimag
Built forChat assistants remembering usersGeneral recall over embedded textStatic instructions for coding agentsCoding agents in a living repo
Unit of memoryExtracted facts / chat summariesEmbedded text chunksProseFalsifiable, typed claims with evidence
How memory gets inAutomatic captureAutomatic embeddingManual editsHuman-gated review queue
When the code changesNothing — stored facts stay "true"NothingFile silently rotsEvidence re-runs via git hooks; broken claims flip STALE
Trust modelWrite-time label, never re-checkedSimilarity ≈ trust"It's in the file"Verification status + decaying confidence; trust-ranked retrieval
EnforcementNone — injection onlyNoneHope the model reads itGuardrails + pre-commit dim check + memory_critique
Failure modeConfidently recalls outdated factsRetrieves similar, true or notInstructions drift from realitySays "this went STALE" instead of guessing

Full comparison: aidimag.com/comparison

vs. named tools

How aiDimag relates to the memory tools people usually ask about. These solve a different problem (remembering users and conversations); aiDimag remembers your repository and proves its memories are still true:

aiDimagMnemosynemem0LettaHonchoSuperMemoryHindsightChromaDB
Subject of memoryYour codebaseChat/agent sessionsUser & agent factsAgent's own contextUser/peer reasoningPersonal + agentAgent memory— (vector DB)
Local-first✅ SQLite per repo✅ SQLite⚠️ Hybrid❌ Docker+PG⚠️ PG+worker❌ SaaS✅ SQLite✅ Embedded
MCP server✅ Built-in✅❌❌❌✅✅❌
Verifies memories against code✅ Evidence re-runs via git hooks❌❌❌❌❌❌❌
Human-gated writes✅ Review queue❌ Auto-capture❌ Auto❌❌❌❌—
Enforcement✅ Guardrails + pre-commit + critique❌❌❌❌❌❌❌
Open source✅ MIT✅ MIT✅ Apache 2.0✅ Apache 2.0⚠️ AGPL❌ Proprietary✅ MIT✅ Apache 2.0
Published benchmarkOwn suite: 100% staleness detection, 0% FPBEAM 65.2% / LongMemEval 98.9% R@All@5 (self-reported)LoCoMoLoCoMo 83.2%LongMemEval 90.4%MemoryBench 85.2%BEAM 73.4% / LongMemEval 94.6%—

Chat-memory benchmarks (LoCoMo, LongMemEval, BEAM) score recall over conversation histories, so they don't apply to aiDimag — its memory subject is the repo. Instead aiDimag publishes its own reproducible suite (below), including the metric none of the chat benchmarks measure: does memory notice when the code changes?

Benchmarks

Reproducible performance and quality suites live in benchmark/ (npm run bench, npm run bench:quality). Headline results (Apple M4, Node 24, 10,000-memory brain — full tables at aidimag.com/benchmarks):

MetricResult
FTS keyword search1.45ms p50
Vector KNN (768-dim, sqlite-vec)4.15ms p50
Memory writes (transactional, incl. FTS + event log)~5,400/s
CLI cold start (dim --help)~41ms p50
Staleness detection (broken claims → STALE, real git fixture)100% (4/4)
False positives (intact claims wrongly flagged)0% (0/4)
Retrieval, keyword queries (Recall@1 / MRR, FTS-only)1.00 / 1.00
Retrieval, paraphrase queries (FTS-only; hybrid closes this gap)0.25 / 0.27

Documentation

Full documentation: aidimag.com


Contributing

Contributions welcome! See CONTRIBUTING.md for dev setup, project principles, and the PR checklist. All participation is governed by our Code of Conduct.

License & Pricing

AI Dimag is open source under the MIT License — free for everyone, any team size, forever. Use it, fork it, embed it.

The entire local-first product is free: CLI, MCP server, verification, guardrails, skills, IDE extensions, local dashboard, and self-hosted team sync (dim serve).

Want team sync without running a server? AI Dimag Cloud is an optional managed sync subscription — that's how the project stays funded and open source. See Pricing.


Built by Anup Khanal

Website • Documentation • Cloud • npm • License

來源:README.md,提交 6f62807

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.22最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分