Engram Chat

approvedunreviewed

by PixelAnay

The AI that remembers you. A personal intelligence with persistent memory, multi-provider AI, and full vault access.

β˜… 3 stars↓ 2,219 downloadsUpdated 17d agoMIT

🧠 Engram for Obsidian

The AI that remembers you.
A sidebar chat for Obsidian with long-term memory, semantic vault search, and safe, scoped access to your notes.

Downloads Version Obsidian Desktop and mobile License

Engram chat sidebar

Features β€’ How it works β€’ Installation β€’ Quick start β€’ Commands β€’ Troubleshooting


✨ Features

FeatureWhat you get
🧠Long-term memoryEngram keeps a plain Markdown memory file of facts about you and your projects, and brings it into every chat.
πŸ”Semantic searchFinds notes by meaning, not just keywords. Ask about "times I felt disconnected" and it surfaces entries about numbness or withdrawal.
πŸ”ŒAny modelWorks with local models (Ollama, LM Studio, llama.cpp) and cloud providers (OpenAI, Claude, Gemini, and more).
πŸ› οΈWorks with your vaultThe AI can search, read, create, edit, move, and organize notes using built-in tools.
πŸ”’You stay in controlLimit which folders it sees, choose its edit permission, confirm risky changes, and undo AI edits.
πŸ“„PDF and image attachmentsAttach images or PDFs. PDF pages are rendered locally, with no external servers.
πŸ’¬Chat history that syncsEach chat is saved as a file in your vault, so it syncs with Obsidian Sync, iCloud, Git, or Dropbox.
See all features

Memory

  • Memory lives in Intelligence/Memory.md by default. It's a normal note you can read and edit.
  • Run /memory to pull key facts from the current chat. You review them before they're saved.
  • Automatic saving after each reply is off by default (it costs one extra model call per reply). You can turn it on under Advanced settings β†’ Auto-extract memories.
  • The AI can add (save_memory), change (update_memory) or delete (delete_memory) a single entry. Only that entry's line is touched; everything else in the file, including your own headings and text, stays exactly as it is.
  • The memory file is never trimmed. The Max memory tokens setting (4,000 by default) only limits how much memory is sent to the model with each message. When it is exceeded, the oldest entries are left out of the prompt, not out of the file.
  • Safety: if the memory file goes missing (for example while a sync is still running), Engram does not create a blank one. New facts are queued and added when the file is back. Before every change a local backup is saved in the plugin folder (the last 20 are kept). Use the command Restore memory from backup, or the button in settings, to recover.
  • Changing the memory path in settings moves your existing file to the new path after you confirm.

Semantic search

  • Embedding providers: Ollama, OpenAI, or any OpenAI-compatible /v1/embeddings endpoint (for example, llama.cpp).
  • Click Index Vault in settings to build the index, with live progress.
  • Notes used as context show up as clickable chips under your message.
  • Changing the embedding model, provider, or URL clears the old index so stale vectors are never mixed in.

Providers

  • Local: Ollama, LM Studio, llama.cpp
  • Cloud: OpenAI, Anthropic Claude, Google Gemini, DeepSeek, Groq, Mistral, xAI (Grok)
  • Aggregator: OpenRouter (one key, many models)
  • Custom: any OpenAI-compatible API
  • Replies stream in. Each provider has its own API key; a key is only ever sent to the provider it was entered for. Claude is called directly using Anthropic's browser-access header. The reply length limit is set in Advanced settings (Max reply length).
  • Connection tests only list models; they never send a billable chat request.
  • Tool calling can be native, prompt-based (for models without tool support), or turned off.

Safety

  • Scope: an allowlist or denylist of folders, plus exclude patterns (Private/**, *.secret.md by default). Excluded files are never indexed, searched, or sent to the model.
  • Permissions: one click on the chat footer badge switches between:
    • πŸ” Read: search and read only
    • ✏️ Append: can only add text to the end of notes
    • ⚠️ Full edit: can create, edit, overwrite, move, rename, and delete
  • Protected files: the AI's tools can never change, move, rename, copy or delete the memory file, the chat history folder, or any folder that contains them. This holds even when memory is switched off.
  • Confirmation: destructive actions open a confirmation dialog first.
  • Undo panel: review and revert changes the AI made.

Interface

  • Type / for commands and @ to insert a link to a note ([[Note]]) into your message. The AI can then open it with its read tools.
  • A token budget bar shows how much of the model's context window is in use.
  • Personas let you switch between saved system prompts.

βš™οΈ How it works

 You ask a question
        β”‚
        β–Ό
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚ 1. Load your memory file                     β”‚
 β”‚ 2. Find related notes (semantic search)      β”‚
 β”‚ 3. Add @-mentioned notes and attachments     β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚
        β–Ό
   Your chosen model replies, and can use tools
   (search, read, edit…) within your permissions
        β”‚
        β–Ό
 Answer streams in Β· used notes shown as chips Β· new facts saved to memory

Note content is wrapped in [VAULT DATA START] / [VAULT DATA END] markers, and the model is told to treat it as data, not instructions. This reduces the risk of prompt injection from text inside your notes.


πŸ“¦ Installation

Option 1: BRAT (recommended)

  1. Install BRAT from Obsidian's Community Plugins.
  2. Open BRAT settings β†’ Add Beta plugin.
  3. Paste https://github.com/PixelAnay/Engram.
  4. Enable Engram Chat in Community Plugins.

Option 2: Manual

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Put them in <YourVault>/.obsidian/plugins/engram-chat/.
  3. Reload Obsidian and enable Engram Chat.

πŸš€ Quick start

1. Connect a model

Go to Settings β†’ Engram, pick a provider, and enter a model name (plus an API key for cloud providers).

πŸ’‘ Free and local: install Ollama, run ollama pull llama3, and pick Local β€” Ollama.

2. Turn on semantic search (optional, recommended)

Pick an embedding provider:

Ollama (easiest, free, local)
ollama pull nomic-embed-text

Ollama runs at http://localhost:11434 by default.

llama.cpp (full control, GPU)

Download a GGUF embedding model, then start the server in embedding mode:

.\llama-server.exe -m "C:\path\to\model.gguf" --port 8080 --embedding

Check that it's running at http://localhost:8080/v1/models.

OpenAI

Use text-embedding-3-small with your OpenAI API key.

Then fill in Settings β†’ Engram β†’ Semantic Search:

SettingExample
ProviderOllama, OpenAI, or Custom
Modelnomic-embed-text
Base URLhttp://localhost:11434 (Ollama) or http://localhost:8080 (llama.cpp)
API keyOpenAI only

3. Index your vault

Click Index Vault and wait for the "Indexed N files" notice. Run it again after adding many notes.

4. Chat

Click the 🧠 icon in the left ribbon and start talking. Semantic search runs automatically once the index is ready.


⌨️ Commands

Slash commands (type in the chat box)

CommandAction
/memoryPropose key facts from this chat; you tick the ones to save
/forgetOpen the memory file to review or delete entries
/personaSwitch the active persona
/exportExport this chat to a vault note
/clearClear the current chat
/scopeShow which folders the AI can access

Command palette

CommandAction
Open Engram sidebarOpen the chat panel
Re-index vaultRebuild the note list (titles, tags). For semantic search, use Index Vault in settings
Restore memory from backupPick a local backup and restore the memory file
Open memory fileOpen your memory note
Sync chat history from vaultReload chats saved in the vault

πŸ” Privacy

  • With local models and local embeddings, nothing leaves your machine.
  • With cloud providers, only the chat, your memory, and the matched notes are sent to that provider.
  • Embeddings and settings are stored in .obsidian/plugins/engram-chat/data.json.

⚠️ API keys are stored in data.json. Don't commit your .obsidian folder to a public Git repository.


🩺 Troubleshooting

The AI doesn't seem to use my notes
  • Make sure indexing finished (check the file count in settings).
  • Your embedding server must be running while you chat, not just while indexing.
  • Look for note chips under your message. If they're there, the notes were sent to the model.
Indexing fails

Check the Base URL and that the embedding server is running. Engram tests the connection before indexing and shows an error if it can't connect.

llama-server is not recognized (Windows)

Run .\llama-server.exe (with .\ and .exe) from the folder that contains it, or add that folder to your PATH.

"model output must contain either output text or tool calls"

The model returned an empty reply. Try another model or a simpler question. For local models, check that the model is fully loaded and has enough VRAM.

My index disappeared after a restart

The index is saved between restarts. If it's gone, the embedding model, provider, or URL probably changed, which clears the index on purpose. Re-index once.


πŸ§‘β€πŸ’» Development

git clone https://github.com/PixelAnay/Engram.git
cd Engram
npm install
npm run build      # type-check and bundle to main.js

To build and copy the plugin into a test vault:

setx OBSIDIAN_VAULT_PATH "C:\Path\To\Your\Vault"   # once, then open a new terminal
npm run deploy

πŸ“„ License

MIT Β© PixelAnay

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.