basic-memory
Базовая память
Базовая память позволяет вам создавать устойчивые знания посредством естественных разговоров с Большими языковыми моделями (LLM), такими как Клод, сохраняя все в простых файлах Markdown на вашем компьютере. Он использует протокол контекста модели (MCP), чтобы любой совместимый LLM мог читать и записывать в вашу локальную базу знаний.
Сайт: https://basicmachines.co
Документация: https://memory.basicmachines.co
Продолжайте разговор с того места, где вы остановились.
Помощники на основе искусственного интеллекта могут загружать контекст из локальных файлов в новый разговор
Заметки сохраняются локально в виде файлов Markdown в режиме реального времени.
Не требуется никаких знаний проекта или специальных подсказок.
https://github.com/user-attachments/assets/a55d8238-8dd0-454a-be4c-8860dbbd0ddc
Related MCP server: memora
Быстрый старт
# Install with uv (recommended)
uv tool install basic-memory
# Configure Claude Desktop (edit ~/Library/Application Support/Claude/claude_desktop_config.json)
# Add this to your config:
{
"mcpServers": {
"basic-memory": {
"command": "uvx",
"args": [
"basic-memory",
"mcp"
]
}
}
}
# Now in Claude Desktop, you can:
# - Write notes with "Create a note about coffee brewing methods"
# - Read notes with "What do I know about pour over coffee?"
# - Search with "Find information about Ethiopian beans"
Вы можете просмотреть общий контекст через файлы в ~/basic-memory (расположение каталога по умолчанию).
Альтернативная установка через кузницу
Вы можете использовать Smithery для автоматической настройки базовой памяти для Claude Desktop:
npx -y @smithery/cli install @basicmachines-co/basic-memory --client claudeЭто устанавливает и настраивает базовую память без необходимости ручного редактирования файла конфигурации Claude Desktop. Сервер Smithery размещает компонент сервера MCP, в то время как ваши данные остаются локально сохраненными в виде файлов Markdown.
Глама.ай
Почему базовая память?
Большинство взаимодействий LLM эфемерны — вы задаете вопрос, получаете ответ, и все забывается. Каждый разговор начинается заново, без контекста или знаний из предыдущих. Текущие обходные пути имеют ограничения:
Истории чатов фиксируют разговоры, но не являются структурированными знаниями.
Системы RAG могут запрашивать документы, но не позволяют LLM писать ответ
Векторные базы данных требуют сложных настроек и часто находятся в облаке.
Для поддержки графов знаний обычно требуются специализированные инструменты.
Базовая память решает эти проблемы с помощью простого подхода: структурированные файлы Markdown, которые могут читать и писать как люди, так и LLM. Ключевые преимущества:
Локально: все знания хранятся в файлах, которые вы контролируете
Двунаправленный: и вы, и LLM читаете и пишете в одни и те же файлы
Структурированный, но простой: использует знакомый Markdown с семантическими шаблонами
Проходимый граф знаний: LLM могут отслеживать связи между темами
Стандартные форматы: Работает с существующими редакторами, такими как Obsidian.
Облегченная инфраструктура: только локальные файлы, индексированные в локальной базе данных SQLite.
С помощью базовой памяти вы можете:
Ведите беседы, которые основываются на предыдущих знаниях
Создавайте структурированные заметки во время естественных разговоров
Общайтесь с магистрами права, которые помнят, о чем вы уже говорили ранее
Семантически перемещайтесь по графу знаний
Держите все локально и под своим контролем
Используйте знакомые инструменты, такие как Obsidian, для просмотра и редактирования заметок
Создайте личную базу знаний, которая будет расти со временем
Как это работает на практике
Допустим, вы изучаете методы заваривания кофе и хотите закрепить свои знания. Вот как это работает:
Начните с обычного чата:
I've been experimenting with different coffee brewing methods. Key things I've learned:
- Pour over gives more clarity in flavor than French press
- Water temperature is critical - around 205°F seems best
- Freshly ground beans make a huge difference...продолжить разговор.
Попросите магистра права помочь структурировать эти знания:
"Let's write a note about coffee brewing methods."LLM создает новый файл Markdown в вашей системе (который вы можете мгновенно увидеть в Obsidian или вашем редакторе):
---
title: Coffee Brewing Methods
permalink: coffee-brewing-methods
tags:
- coffee
- brewing
---
# Coffee Brewing Methods
## Observations
- [method] Pour over provides more clarity and highlights subtle flavors
- [technique] Water temperature at 205°F (96°C) extracts optimal compounds
- [principle] Freshly ground beans preserve aromatics and flavor
## Relations
- relates_to [[Coffee Bean Origins]]
- requires [[Proper Grinding Technique]]
- affects [[Flavor Extraction]]Заметка содержит семантическое содержание и ссылки на другие темы с помощью простого форматирования Markdown.
Вы видите этот файл на своем компьютере в режиме реального времени в текущем каталоге проекта (по умолчанию
~/$HOME/basic-memory).
Синхронизация в реальном времени включена по умолчанию в версии v0.12.0.
В чате с LLM вы можете упомянуть тему:
Look at `coffee-brewing-methods` for context about pour over coffeeLLM теперь может создавать богатый контекст из графа знаний. Например:
Following relation 'relates_to [[Coffee Bean Origins]]':
- Found information about Ethiopian Yirgacheffe
- Notes on Colombian beans' nutty profile
- Altitude effects on bean characteristics
Following relation 'requires [[Proper Grinding Technique]]':
- Burr vs. blade grinder comparisons
- Grind size recommendations for different methods
- Impact of consistent particle size on extractionКаждый связанный документ может привести к более глубокому контексту, создавая богатое семантическое понимание вашей базы знаний.
Это создает двусторонний поток, где:
Люди пишут и редактируют файлы Markdown
LLM читают и пишут через протокол MCP
Синхронизация обеспечивает единообразие всего
Все знания сохраняются в локальных файлах.
Техническая реализация
Под капотом базовая память:
Сохраняет все в файлах Markdown
Использует базу данных SQLite для поиска и индексации
Извлекает семантическое значение из простых шаблонов Markdown
Файлы становятся объектами
EntityКаждая
Entityможет иметьObservationsили факты, связанные с ней.Relationsсвязывают сущности вместе, формируя граф знаний.
Поддерживает локальный график знаний, полученный из файлов
Обеспечивает двунаправленную синхронизацию между файлами и графом знаний.
Реализует протокол контекста модели (MCP) для интеграции ИИ
Предоставляет инструменты, которые позволяют помощникам на основе искусственного интеллекта перемещаться по графу знаний и манипулировать им
Использует URL-адреса memory:// для ссылки на сущности в инструментах и диалогах.
Формат файла — просто Markdown с простой разметкой:
Каждый файл Markdown имеет:
Frontmatter
title: <Entity title>
type: <The type of Entity> (e.g. note)
permalink: <a uri slug>
- <optional metadata> (such as tags) Наблюдения
Наблюдения — это факты о теме. Их можно добавить, создав список Markdown со специальным форматом, который может ссылаться на category , tags с использованием символа «#» и необязательный context .
Формат Markdown для наблюдений:
- [category] content #tag (optional context)Примеры наблюдений:
- [method] Pour over extracts more floral notes than French press
- [tip] Grind size should be medium-fine for pour over #brewing
- [preference] Ethiopian beans have bright, fruity flavors (especially from Yirgacheffe)
- [fact] Lighter roasts generally contain more caffeine than dark roasts
- [experiment] Tried 1:15 coffee-to-water ratio with good results
- [resource] James Hoffman's V60 technique on YouTube is excellent
- [question] Does water temperature affect extraction of different compounds differently?
- [note] My favorite local shop uses a 30-second bloom timeОтношения
Отношения — это ссылки на другие темы. Они определяют, как сущности соединяются в графе знаний.
Формат разметки:
- relation_type [[WikiLink]] (optional context)Примеры отношений:
- pairs_well_with [[Chocolate Desserts]]
- grown_in [[Ethiopia]]
- contrasts_with [[Tea Brewing Methods]]
- requires [[Burr Grinder]]
- improves_with [[Fresh Beans]]
- relates_to [[Morning Routine]]
- inspired_by [[Japanese Coffee Culture]]
- documented_in [[Coffee Journal]]Использование с VS Code
Для установки в один клик нажмите одну из кнопок установки ниже...
Вы можете использовать Basic Memory с VS Code для легкого извлечения и сохранения информации во время кодирования. Нажмите кнопки установки выше для настройки в один клик или следуйте инструкциям по ручной установке ниже.
Ручная установка
Добавьте следующий блок JSON в файл настроек пользователя (JSON) в VS Code. Это можно сделать, нажав Ctrl + Shift + P и введя Preferences: Open User Settings (JSON) .
{
"mcp": {
"servers": {
"basic-memory": {
"command": "uvx",
"args": ["basic-memory", "mcp"]
}
}
}
}При желании вы можете добавить его в файл .vscode/mcp.json в вашем рабочем пространстве. Это позволит вам поделиться конфигурацией с другими.
{
"servers": {
"basic-memory": {
"command": "uvx",
"args": ["basic-memory", "mcp"]
}
}
}Использование с Claude Desktop
Базовая память построена с использованием протокола MCP (Model Context Protocol) и работает с настольным приложением Claude ( https://claude.ai/ ):
Настройте Claude Desktop для использования базовой памяти:
Отредактируйте файл конфигурации MCP (обычно он находится в ~/Library/Application Support/Claude/claude_desktop_config.json для OS X):
{
"mcpServers": {
"basic-memory": {
"command": "uvx",
"args": [
"basic-memory",
"mcp"
]
}
}
}Если вы хотите использовать определенный проект (см. Несколько проектов ), обновите конфигурацию Claude Desktop:
{
"mcpServers": {
"basic-memory": {
"command": "uvx",
"args": [
"basic-memory",
"--project",
"your-project-name",
"mcp"
]
}
}
}Синхронизируйте свои знания:
Базовая память синхронизирует файлы вашего проекта в режиме реального времени, если вы вносите изменения вручную.
В Claude Desktop магистр права теперь может использовать следующие инструменты:
write_note(title, content, folder, tags) - Create or update notes
read_note(identifier, page, page_size) - Read notes by title or permalink
build_context(url, depth, timeframe) - Navigate knowledge graph via memory:// URLs
search_notes(query, page, page_size) - Search across your knowledge base
recent_activity(type, depth, timeframe) - Find recently updated information
canvas(nodes, edges, title, folder) - Generate knowledge visualizationsПримеры подсказок для пробы:
"Create a note about our project architecture decisions"
"Find information about JWT authentication in my notes"
"Create a canvas visualization of my project components"
"Read my notes on the authentication system"
"What have I been working on in the past week?"Дополнительная информация
Более подробную информацию смотрите в документации , в том числе:
Лицензия
АГПЛ-3.0
Вклады приветствуются. См. руководство по вкладам для получения информации о настройке проекта локально и подаче PR.
История Звезды
Создано с ♥️ компанией Basic Machines
Available Tools
12 toolsbm_contextBuild contextARead-onlyIdempotent
Follow the Basic Memory knowledge graph from a note: the note, its observations, and the notes its relations reach, up to depth hops (1-5). identifier is a path, permalink, memory:// URL, or a pattern such as 'specs/*'. since limits related results to recent changes. compact returns the graph without note bodies; read chosen notes with bm_read.
Inputs: project (required), identifier (required), page, depth, +5 more. Returns: result
bm_deleteDelete noteADestructiveIdempotent
Delete a Basic Memory note (identifier) or a directory (path). A directory delete removes every file under it and needs recursive=true. Pass expected_checksum (from bm_read) to delete a note only if it is still the revision you read. A note that does not exist is an error. This cannot be undone.
Inputs: project (required), path, recursive, identifier, +2 more. Returns: result
bm_editEdit noteADestructive
Change part of an existing Basic Memory note. command: append or prepend content; find_replace find_text with content (exact text, which must occur expected_replacements times, default 1); replace_section, insert_before_section or insert_after_section for a section heading ('Decisions', 'Auth/Decisions', 'Decisions[1]', as bm_read takes it); set_metadata to merge metadata into the frontmatter without touching the body. metadata also merges with any other command. Pass expected_checksum (from bm_read) to edit only the revision you read. A missing note is an error; create notes with bm_write.
Inputs: command (required), project (required), identifier (required), content, +7 more. Returns: result
bm_findFind filesARead-onlyIdempotent
Find files in a Basic Memory project, recursively. With name, match file names against a glob ('meeting'). With filters, match notes by frontmatter, e.g. {"status": "active"} or {"priority": {"$in": ["high"]}}, and with fields return just those frontmatter values per note. path limits the search to a folder. For ranked text or meaning search, use bm_search.
Inputs: project (required), name, page, path, +5 more. Returns: result
bm_listList folderARead-onlyIdempotent
List one folder of a Basic Memory project: its subfolders, then its files with title, date and id. project is required; '/' lists its root. Discover projects with bm_project(command='list'). Filter files with glob and order them with sort. For a recursive search by name or frontmatter, use bm_find.
Inputs: project (required), glob, page, path, +3 more. Returns: result
bm_manManualARead-onlyIdempotent
Read the Basic Memory manual. With no arguments, the index of every page. page reads one page: 'bm-search(3)' for an MCP tool, 'grep(1)' for a shell command; a tool name such as 'bm_search' works too. query lists the pages that mention every word given, like man -k.
Inputs: page, query, output_format. Returns: result
bm_moveMove noteA
Move or rename a Basic Memory note (identifier) or a directory (path) within its project. destination is the new project-relative path; ending it with '/' moves into that folder under the current name ('archive/'). A note keeps its file extension ('.markdown' may become '.md'). Pass expected_checksum (from bm_read) to move a note only if it is still the revision you read. Moving into another project is refused: bm_read, bm_write there, then bm_delete.
Inputs: project (required), destination (required), path, identifier, +2 more. Returns: result
bm_projectProjectsB
Basic Memory projects. command: list (projects, grouped by workspace); create (name, path, optional set_default, workspace); recent (what changed lately in the required project: since, items, paging).
Inputs: command (required), name, page, path, +7 more. Returns: result
bm_readRead noteARead-onlyIdempotent
Read a Basic Memory note or file by path, permalink, memory:// URL or exact title. Slice a long note with section (a heading), start_line/end_line or max_tokens; line numbers count the whole file, frontmatter included. A text file such as .txt takes start_line/end_line too. include_content=false returns only the metadata and the checksum that bm_write and bm_edit take as expected_checksum. Images come back as images and other binary files as documents. A missing note is an error: find notes with bm_search.
Inputs: project (required), identifier (required), section, end_line, +5 more.
bm_schemaNote schemasARead-onlyIdempotent
Basic Memory note schemas (Picoschema). command: validate notes against their schema (one note_type, one note by identifier, or every type that has a schema); infer a schema from the notes of a note_type; diff a note_type's notes against its schema to find drift. A schema is a note with type: schema whose entity field names the note type it describes.
Inputs: command (required), project (required), note_type, threshold, +2 more. Returns: result
bm_searchSearch notesARead-onlyIdempotent
Search a Basic Memory project, ranked by relevance. query supports quoted phrases, AND/OR/NOT and tag:name. mode picks hybrid (the default when semantic search is available), text, semantic, title or permalink (globs with *). Narrow with filters (frontmatter), note_types, items (notes, observations, relations) and since. lines returns the matching lines of each hit with that many lines of context, like grep. path limits the search to a folder; identifier searches one note. Scope every search with project (one project), projects (a list), or all_projects=true. Read full notes with bm_read.
Inputs: mode, page, path, items, +18 more. Returns: result
bm_writeWrite noteADestructive
Create or replace a Basic Memory note. Give a file path as identifier ('notes/plan.md'), or title plus directory. With a path the file lands exactly there and the title comes from the content's frontmatter, then title, then the file name. An existing note is an error unless overwrite=true; pass expected_checksum (from bm_read) to replace only the revision you read. To change part of a note use bm_edit. Content may hold frontmatter, observations ('- [category] fact #tag') and relations ('- relation_type [[Other Note]]').
Inputs: content (required), project (required), tags, title, +7 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
There is real overlap among three retrieval tools (bm_find, bm_list, bm_search), but the descriptions explicitly route the agent: bm_list for one folder, bm_find for recursive name/frontmatter matching, bm_search for ranked text/semantic search. Similarly bm_read (one note body) is distinguished from bm_context (graph traversal) and bm_write (full replace) from bm_edit (partial change). Only a small chance of misselection remains for an agent skimming names.
All 12 tools follow a single predictable bm_<word> snake_case pattern with no style mixing. Most suffixes are verbs (find, list, read, write, edit, move, delete, search), but a few are nouns/commands (bm_context, bm_schema, bm_project, bm_man), which is a minor deviation rather than an inconsistency.
Twelve tools sit comfortably in the well-scoped range and each maps to a distinct capability: directory listing, find, search, read, write, edit, move, delete, graph context, schema ops, project ops, and docs. None look like padding, and the surface is not so thin that agents would have to chain workarounds.
Note lifecycle is fully covered (create/replace, read, partial edit, move, delete, plus graph context and search), and bm_schema and bm_project cover schema and project management. Minor gaps: bm_project only supports list/create/recent (no rename or delete of projects), and there is no copy/duplicate operation, though the description notes the read+write+delete workaround.
Maintenance
Related MCP Connectors
Personal wiki and memory layer for AI assistants. Persistent, structured memory across sessions.
Persistent memory and knowledge graph for AI assistants — keyword + vector + graph search.
Long-term memory for your AI as a private knowledge graph: facts, people, links, sources.
Turn your notes, links and conversations into a Living Brain your AI tools share and build on.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceProvides persistent memory functionality for AI conversations by creating, managing and querying entities and relationships in a knowledge graph. Features SQLite storage, advanced search capabilities, and Windows auto-start integration for long-term AI memory retention.34 npmMIT
- AlicenseAqualityBmaintenancePersistent memory with knowledge graph visualization, semantic/hybrid search, importance scoring, and cloud sync (S3/R2) for cross-session context management.44749MIT
- AlicenseNot gradedqualityDmaintenanceProvides persistent memory for AI tools by building a local knowledge graph from conversations, enabling cross-session recall and context awareness without cloud dependencies.9MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to share persistent, self-improving memory by ingesting, classifying, synthesizing, and retrieving knowledge from Obsidian vaults, code, documents, transcripts, bookmarks, and sessions through MCP and REST interfaces with token-optimized search.10 npmMIT