The memory your Copilot chats leave behind.
VS Code writes thousands of Copilot Chat session files to disk — hard to search and scattered across workspaces. Engram turns that pile into one local, searchable SQLite database with full-text search. It ships as both an indexer and a built-in skill for chat interaction, with direct SQL available when needed.
Pure Python stdlib. Zero dependencies. Built-in Copilot skill. Sibling project to Anya.
> irm https://raw.githubusercontent.com/aasis21/engram/main/install.ps1 | iex
> /engram find me my chat about dotnet10 upgrade
> /engram search my Copilot history for service bus retry
> /engram show me what I did in session 769739be
Every chat, every workspace,
in one queryable place.
VS Code stores chat sessions per-workspace under %APPDATA%\Code\User\workspaceStorage\<hash>\chatSessions\. Thousands of files, multiple formats, many GB. Engram consolidates everything into one local SQLite DB.
-
01
Full-text search.
FTS5 across user prompts and assistant responses, ranked by relevance with highlighted snippets.
-
02
Incremental indexing.
A watermark tracks the newest
mtimeseen. Subsequent runs reparse only the files that changed — typically a handful, in well under a second. -
03
Schema-compatible with Copilot CLI.
Same tables as
session-store.db—sessions,turns,session_files,session_refs— so any tool that reads one can read the other. -
04
Hidden, hands-off.
A Windows Scheduled Task runs every 10 minutes (configurable) under
pythonw.exe. No console windows, no surprises. -
05
Read-only & local.
Engram only reads VS Code's chat files; your editor state is never touched. The database lives entirely under
~\.copilot\. Nothing uploaded, no telemetry. -
06
Copilot-skill bundled.
The installer drops a user-level skill at
~\.copilot\skills\engram\— invoke it anywhere via/engram <prompt>in Copilot CLI, VS Code Chat, or Anya. Ask "/engram find me my chat about dotnet10" and the agent searches both Chat and CLI stores in one go.
One line. That's it.
Requires Python 3.8+ and git on PATH. The bootstrap clones the repo to %LOCALAPPDATA%\Engram-src, copies the indexer to %LOCALAPPDATA%\Engram, runs the initial full index, and registers the scheduled task.
# PowerShell irm https://raw.githubusercontent.com/aasis21/engram/main/install.ps1 | iex # With arguments (faster polling, custom location) & ([scriptblock]::Create((irm https://raw.githubusercontent.com/aasis21/engram/main/install.ps1))) -Interval 5 # Uninstall (keeps DB) .\uninstall.ps1 .\uninstall.ps1 -RemoveData # also delete the DB
Just type /engram.
Installs a user-level Copilot skill to ~\.copilot\skills\engram\. Invoke it with the /engram slash-command in Copilot CLI, VS Code Copilot Chat, or Anya. The agent searches both stores in one pass and tags every hit as CHAT or CLI.
# Natural language — the agent picks the right query/filter /engram find me my chat about dotnet10 /engram what did I work on in the ModernOrder repo this week /engram show me what I did in session 769739be # Or run the underlying script directly python "$env:USERPROFILE\.copilot\skills\engram\scripts\engram_search.py" ` list --query "net8 upgrade" --source chat -w ModernOrder --days 90 --json python "$env:USERPROFILE\.copilot\skills\engram\scripts\engram_search.py" ` show --session 769739be --query upgrade
Read-only, FTS5 + regex, stdlib-only. Works the same whether you have just the Chat store, just the CLI store, or both.
Plain Python, or plain SQL.
Use the bundled CLI for full-text search, or open the database with any SQLite tool and write your own queries.
# CLI — ranked FTS5 results with highlighted snippets python engram.py query "service bus retry" python engram.py status # last run, totals, watermark # Or hit the DB directly sqlite3 "$env:USERPROFILE\.copilot\session-store-vscode-chat.db" ` "SELECT repository, COUNT(*) FROM sessions GROUP BY repository ORDER BY 2 DESC LIMIT 15;"
Familiar shape.
Mirrors Copilot CLI's session-store.db, plus state and audit tables for incremental indexing.
| Table | Purpose |
|---|---|
| sessions | One row per chat session — id, repository, cwd, summary, timestamps. |
| turns | One row per request/response turn within a session. |
| session_files | Files referenced or edited inside a session. |
| session_refs | Tool invocations and other refs. |
| search_index | FTS5 virtual table over user + assistant text. |
| index_state | Schema version, watermark, totals, last-run info. |
| index_runs | Per-run audit log: scanned, changed, indexed, failed, duration. |