YULEI LI37 downloadsTurn conversations, files, clipboard text, and web articles into linked A-mem-inspired Obsidian notes.
English — Auto-Zettelkasten turns conversations, files in an Obsidian vault, clipboard text, and web articles into reusable atomic notes. Inspired by A-MEM: Agentic Memory for LLM Agents, it automatically generates metadata and tags, retrieves related notes, creates bidirectional wikilinks, and performs lightweight memory evolution.
中文 — Auto-Zettelkasten 将对话、Obsidian vault 内的文件、剪贴板文本和网页文章转换成一组可复用的原子笔记(atomic notes)。它借鉴 A-MEM: Agentic Memory for LLM Agents 的思路,自动生成元数据和标签、检索相关笔记、建立双向链接,并进行轻量的记忆演化。
This is an Obsidian Community plugin project, not a wrapper around the A-mem Python repository. It maps A-mem's
MemoryNotemetadata, nearest-neighbor retrieval, andstrengthen/update_neighborevolution operations to Obsidian Markdown, YAML frontmatter, and wikilinks.这是一个 Obsidian 社区插件项目,不是 A-mem Python 仓库的封装。它把 A-mem 的
MemoryNote元数据、近邻检索和strengthen/update_neighbor演化流程映射到 Obsidian Markdown、YAML frontmatter 和 wikilinks。
Auto-Zettelkasten: Open notes chatbot command or the sidebar message icon. It embeds your question, retrieves the most relevant A-mem notes, answers only from those notes, and links to each source. Retrievals update each note's retrieval_count and last_accessed. Chat history stays in the sidebar session and is not written to the vault.Auto-Zettelkasten: Open notes chatbot 或侧栏消息图标打开。插件对问题生成 embedding,从 A-mem 索引检索最相关的 notes,再仅依据这些内容回答,并附上可点击的来源笔记。每次检索会更新对应 note 的 retrieval_count 与 last_accessed。聊天记录默认只存在当前侧栏会话,不会写入 Vault。requestUrl.requestUrl 获取的网页文章 URL。content, keywords, context, category, tags, timestamps, retrieval counts, links, and evolution history.content、keywords、context、category、tags、时间戳、检索次数、链接和演化历史。strengthen / update_neighbor decisions. It creates bidirectional wikilinks and optionally updates existing notes' context, tags, retrieval_count, and evolution_history.strengthen / update_neighbor 决策;建立双向 [[wikilink]],并可更新旧 note 的 context、tags、retrieval_count 和 evolution_history。A-mem/_A-mem MOC.md and persists a lightweight semantic index in A-mem/_amem-index.json.A-mem/_A-mem MOC.md,并在 A-mem/_amem-index.json 中保存轻量检索索引和向量。English — Run these commands in the project directory:
中文 — 在本项目目录执行:
npm install
npm run build
English — Create the target folder:
中文 — 创建目标目录:
<your Obsidian vault>/.obsidian/plugins/auto-zettelkasten/
English — Copy the build artifacts into that folder, then enable the plugin.
中文 — 将以下构建产物复制到该目录,然后启用插件。
main.js
manifest.json
styles.css
English — In Obsidian: open Settings → Community plugins, disable Restricted mode if needed, refresh the community plugin list, and enable Auto-Zettelkasten.
中文 — 在 Obsidian 中:打开 Settings → Community plugins,如有需要先关闭 Restricted mode,刷新社区插件列表并启用 Auto-Zettelkasten。
English — For development, link or copy this project into the plugin folder, run
npm run buildafter each change, then reload the plugin.中文 — 开发时,可以把此项目目录直接链接或复制到上述插件目录;每次修改后运行
npm run build,然后在 Obsidian 中重新加载插件。
English — Open Settings → Auto-Zettelkasten and fill in:
中文 — 打开 Settings → Auto-Zettelkasten,填写:
| Setting / 配置项 | Description / 说明 |
|---|---|
OpenAI-compatible base URL |
Root URL of the chat service, usually ending in /v1. The plugin calls POST /chat/completions. 聊天模型服务的根 URL,通常以 /v1 结尾。 |
API key |
Chat model API key; use a restricted key where possible. 聊天模型 API key,建议使用可限制额度/权限的 key。 |
Chat model |
A chat model that can return structured JSON. 能稳定返回 JSON 的对话模型。 |
Embedding model |
Used for nearest-neighbor retrieval. 用于近邻检索的 embedding 模型。 |
Embedding base URL / API key |
Optional. Set these when your chat provider does not expose /embeddings; leave empty to reuse the chat URL and key. 可选。如果聊天供应商没有 /embeddings,可单独填写另一个 OpenAI-compatible embedding 服务;留空则复用聊天 URL 与 key。 |
English — Chat and embedding APIs can be different services. If embedding fails, notes are still created with tags and the plugin falls back to keyword similarity.
中文 — 聊天和 embedding API 可以分开:例如用支持 /chat/completions 的模型生成笔记,再使用另一个兼容 /embeddings 的服务建立关联。如果 embedding 调用失败,插件仍会生成带标签的笔记,并降级为关键词相似度。
English — Copy a conversation, then run Auto-Zettelkasten: Ingest clipboard text as A-mem notes. Alternatively, export the conversation as Markdown/JSON into the vault and run Auto-Zettelkasten: Ingest current file as A-mem notes.
中文 — 复制对话内容后,运行 Auto-Zettelkasten: Ingest clipboard text as A-mem notes。或者将对话导出为 Markdown/JSON 放入 vault,再对该文件运行 Auto-Zettelkasten: Ingest current file as A-mem notes。
English — An Obsidian plugin cannot read the current conversation state of an external web/desktop app (including the DSH GUI). Clipboard and exported chat files are the one-click entry points today.
中文 — Obsidian 插件无法直接读取外部网页/桌面应用(包括 DSH GUI)的当前对话状态;剪贴板和聊天导出文件是当前的一键入口。
Auto-Zettelkasten: Ingest current file as A-mem notes.Auto-Zettelkasten: Ingest current file as A-mem notes。Create A-mem notes from this file.Create A-mem notes from this file。Auto-Zettelkasten: Ingest selected text as A-mem notes.Auto-Zettelkasten: Ingest selected text as A-mem notes。Auto-Zettelkasten: Ingest web article URL as A-mem notes and enter a URL.Auto-Zettelkasten: Ingest web article URL as A-mem notes 并输入文章 URL。English — Markdown, TXT, HTML, JSON, and CSV are supported directly. Convert PDFs to Markdown or plain text first. Dynamically rendered pages may need their content saved manually.
中文 — 当前直接支持 Markdown、TXT、HTML、JSON、CSV。PDF 需先用 OCR/文本提取器转换为 Markdown 或纯文本;动态渲染且正文不在初始 HTML 中的网站也可能需要先保存正文。
English — Notes are written to A-mem/ by default:
中文 — 默认写入 vault 的 A-mem/ 目录:
A-mem/
├── 20250308-1530-example-note-a1b2c3.md
├── 20250308-1531-another-note-d4e5f6.md
├── _A-mem MOC.md
└── _amem-index.json
English — A generated note looks like:
中文 — 每条生成笔记类似:
---
id: "uuid"
amem: true
note_type: "insight"
category: "Research"
tags:
- "amem"
- "amem/source/article"
- "amem/category/research"
- "amem/agent-memory"
keywords:
- "A-mem"
- "Zettelkasten"
context: "…"
links:
- "related-memory-id"
evolution_history: []
---
# 笔记标题
独立、可复用的笔记正文。
## Links
- [[A-mem/相关笔记|相关笔记]]
| A-mem field / 字段 | Obsidian mapping / 映射 |
|---|---|
id, content |
YAML id and Markdown body / YAML id 与 Markdown 正文 |
keywords, context, category, tags |
YAML frontmatter + body sections / YAML frontmatter + 正文小节 |
links |
YAML memory IDs + bidirectional [[wikilink]] / YAML 内存 ID + 双向 [[wikilink]] |
timestamp, last_accessed, retrieval_count |
YAML frontmatter |
evolution_history |
YAML evolution history / YAML 演化记录 |
| Chroma similarity search | Cosine similarity over embeddings persisted in _amem-index.json / _amem-index.json 中持久化 embedding 的余弦相似度检索 |
data.json to untrusted locations.data.json 到不可信位置。Maximum notes per ingestion or disable Auto-link and A-mem evolution to control cost.Maximum notes per ingestion 或关闭 Auto-link and A-mem evolution 控制成本。sentence-transformers service is required.sentence-transformers 服务。update_neighbor action writes back to existing notes.update_neighbor 时才写回旧 note。English — The project is validated with:
中文 — 本项目已通过:
npx tsc --noEmit
npm run build