<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>AI Agents on dotnetuniversity</title>
        <link>https://dotnetuniversity.com/tags/ai-agents/</link>
        <description>Recent content in AI Agents on dotnetuniversity</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-us</language>
        <lastBuildDate>Fri, 21 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://dotnetuniversity.com/tags/ai-agents/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>MCP Context Mode: Session Memory and Context Management for GitHub Copilot</title>
        <link>https://dotnetuniversity.com/mcp-context-mode-session-memory-and-context-management-for-github-copilot/</link>
        <pubDate>Fri, 21 Aug 2026 00:00:00 +0000</pubDate>
        
        <guid>https://dotnetuniversity.com/mcp-context-mode-session-memory-and-context-management-for-github-copilot/</guid>
        <description>&lt;img src="https://dotnetuniversity.com/mcp-context-mode-session-memory-and-context-management-for-github-copilot/tyler-lagalo-10u9BcaOLjs-unsplash.jpg" alt="Featured image of post MCP Context Mode: Session Memory and Context Management for GitHub Copilot" /&gt;&lt;p&gt;Every Copilot session has a limited context window. As a coding task grows, the conversation fills with file contents, terminal output, tool calls, errors, and decisions. When the context is compacted, Copilot can lose the details that explain what has already been investigated and what still needs to be done.&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/mksglu/context-mode&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Context Mode&lt;/a&gt; is an MCP server and context-management tool designed for this problem. It keeps large tool output outside the model&amp;rsquo;s context, indexes useful project and session data locally, and retrieves relevant information when it is needed. Its documentation lists VSCode Copilot as a supported platform.&lt;/p&gt;
&lt;p&gt;Context Mode focuses on the history of coding work and on controlling how much raw data reaches the model.&lt;/p&gt;
&lt;div class=&#34;mermaid&#34;&gt;%%{init: {&#39;theme&#39;: &#39;base&#39;}}%%
flowchart LR
    A[VS Code Copilot&lt;br/&gt;Agent mode] --&gt;|prompts + tool events| B[Context Mode&lt;br/&gt;MCP tools + hooks]
    B --&gt;|store and index| C[(Local SQLite + FTS5&lt;br/&gt;session history + project index)]
    C --&gt;|search relevant data| D[Focused context&lt;br/&gt;snippets + next steps]
    D --&gt;|restore context| A

    E[Large inputs&lt;br/&gt;logs · files · APIs] --&gt;|process outside chat| B
    B --&gt;|return only useful data| F[Compact output&lt;br/&gt;less context pressure]
    F --&gt; A

    classDef copilot fill:#dbeafe,stroke:#2563eb,stroke-width:3px,color:#172b4d
    classDef mode fill:#fce7f3,stroke:#db2777,stroke-width:3px,color:#5e163d
    classDef storage fill:#dcfce7,stroke:#16a34a,stroke-width:3px,color:#24592b
    classDef result fill:#fef3c7,stroke:#d97706,stroke-width:3px,color:#604e12
    classDef input fill:#f3f4f6,stroke:#6b7280,stroke-width:3px,color:#344054
    classDef output fill:#fee2e2,stroke:#dc2626,stroke-width:3px,color:#7a2825

    class A copilot
    class B mode
    class C storage
    class D result
    class E input
    class F output

    linkStyle 0 stroke:#2563eb,stroke-width:3px
    linkStyle 1 stroke:#db2777,stroke-width:3px
    linkStyle 2 stroke:#16a34a,stroke-width:3px
    linkStyle 3 stroke:#d97706,stroke-width:3px
    linkStyle 4 stroke:#6b7280,stroke-width:3px
    linkStyle 5 stroke:#dc2626,stroke-width:3px
    linkStyle 6 stroke:#dc2626,stroke-width:3px&lt;/div&gt;
&lt;p&gt;The diagram shows the central idea: Copilot sends prompts and tool events to Context Mode, Context Mode stores or indexes the useful data locally, and only relevant snippets or summaries return to Copilot.&lt;/p&gt;
&lt;h2 id=&#34;what-you-will-build&#34;&gt;What You Will Build
&lt;/h2&gt;&lt;p&gt;You will investigate one small API exception to see how Context Mode stores useful project context and retrieves it in a later Copilot session:&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Copilot Prompt&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;Session 1: Investigate the GET /api/todos exception and fix its cause.
&lt;p&gt;Session 2: What caused the exception, which file changed, and what test is missing?&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;In Session 1, Context Mode indexes the API log and records useful work. In Session 2, it retrieves the relevant result instead of making you repeat the investigation.&lt;/p&gt;
&lt;h2 id=&#34;use-context-mode-in-vscode&#34;&gt;Use Context Mode in VSCode
&lt;/h2&gt;&lt;p&gt;There are two parts to a VSCode Copilot setup:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add Context Mode as an MCP server so Copilot can call &lt;code&gt;ctx_*&lt;/code&gt; tools.&lt;/li&gt;
&lt;li&gt;Enable the Context Mode Copilot integration if you want automatic session capture and context restoration.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The MCP server alone gives Copilot context-processing tools. It does not automatically turn every existing Copilot conversation into searchable history.&lt;/p&gt;
&lt;h3 id=&#34;prerequisites&#34;&gt;Prerequisites
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;VSCode with GitHub Copilot Chat and agent mode enabled.&lt;/li&gt;
&lt;li&gt;Node.js 20 or later and &lt;code&gt;npx&lt;/code&gt; available in the integrated terminal.&lt;/li&gt;
&lt;li&gt;A project folder where you can test the integration without exposing secrets.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;add-the-mcp-server&#34;&gt;Add the MCP Server
&lt;/h3&gt;&lt;p&gt;Open the Command Palette, run &lt;code&gt;MCP: Open Workspace Folder MCP Configuration&lt;/code&gt;, and create or edit &lt;code&gt;.vscode/mcp.json&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;
&lt;table style=&#34;border-spacing:0;padding:0;margin:0;border:0;&#34;&gt;&lt;tr&gt;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 1
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 2
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 3
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 4
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 5
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 6
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 7
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 8
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 9
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;10
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;;width:100%&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;servers&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;context-mode&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;command&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;npx&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;args&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;-y&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;context-mode&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            ]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The package and configuration options can change, so check the &lt;a class=&#34;link&#34; href=&#34;https://github.com/mksglu/context-mode&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Context Mode repository&lt;/a&gt; when installing a newer version. After saving the file, use the MCP server controls in VSCode to start or restart &lt;code&gt;context-mode&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;verify-the-connection&#34;&gt;Verify the Connection
&lt;/h3&gt;&lt;p&gt;Open Copilot Chat in agent mode and send this prompt:&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Copilot Prompt&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;Use Context Mode to run ctx doctor and report whether the MCP server,
runtime, SQLite/FTS5 search, and Copilot integration are ready.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You should see a &lt;code&gt;context-mode&lt;/code&gt; tool call and a diagnostic result. If Copilot does not offer the tool, restart the MCP server and reload the VSCode window.&lt;/p&gt;
&lt;h2 id=&#34;a-simple-scenario-fix-an-api-exception&#34;&gt;A Simple Scenario: Fix an API Exception
&lt;/h2&gt;&lt;p&gt;Assume a small ASP.NET Core Todo API returns HTTP 500 from &lt;code&gt;GET /api/todos&lt;/code&gt;. The application writes this exception to &lt;code&gt;app.log&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;exception-block&#34;&gt;
&lt;div class=&#34;exception-block__header&#34;&gt;API Exception&lt;/div&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;System.NullReferenceException: Object reference not set to an instance of an object.
    at TodoService.GetAll() in TodoService.cs:line 42&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You want Copilot to find the exception in Session 1 and remember the fix in Session 2.&lt;/p&gt;
&lt;h3 id=&#34;session-1-index-the-api-log&#34;&gt;Session 1: Index the API Log
&lt;/h3&gt;&lt;p&gt;Send this prompt to Copilot:&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Copilot Prompt&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;Use Context Mode to index app.log.
Do not print the full file.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Context Mode chunks &lt;code&gt;app.log&lt;/code&gt; and stores searchable content locally. The useful result is a small confirmation, not the complete log.&lt;/p&gt;
&lt;h3 id=&#34;session-1-find-the-exception&#34;&gt;Session 1: Find the Exception
&lt;/h3&gt;&lt;p&gt;Now ask Copilot to search the indexed log:&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Copilot Prompt&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;Search the indexed app.log for the exception from GET /api/todos.
Explain the likely cause and identify the file to fix.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Context Mode searches the index and returns only the matching exception. Copilot can reason about the failure without loading the entire log.&lt;/p&gt;
&lt;h3 id=&#34;session-2-retrieve-the-previous-work&#34;&gt;Session 2: Retrieve the Previous Work
&lt;/h3&gt;&lt;p&gt;Close the first chat, start a new Copilot session, and send:&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Copilot Prompt&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;Continue the Todo API investigation from the previous session.
What caused the exception, which file changed, and what test is missing?&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;When the Copilot integration and hooks are active, Context Mode restores the relevant session context instead of replaying the complete conversation. Copilot can answer with the exception cause, changed file, and missing test.&lt;/p&gt;
&lt;h3 id=&#34;check-context-savings&#34;&gt;Check Context Savings
&lt;/h3&gt;&lt;p&gt;Finish with this prompt:&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Copilot Prompt&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;Use Context Mode to show ctx stats for this session.
How much output was processed, and how much context was saved?&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The exact numbers depend on file size, tool output, query shape, and the active adapter. Treat benchmark values from the repository as examples, not as a guarantee for every project.&lt;/p&gt;
&lt;h2 id=&#34;the-context-window-problem&#34;&gt;The Context Window Problem
&lt;/h2&gt;&lt;p&gt;A coding agent receives more than your written prompt. It also receives tool input and tool output:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;File contents&lt;/li&gt;
&lt;li&gt;Directory listings&lt;/li&gt;
&lt;li&gt;Git history&lt;/li&gt;
&lt;li&gt;Build and test output&lt;/li&gt;
&lt;li&gt;API responses&lt;/li&gt;
&lt;li&gt;Logs&lt;/li&gt;
&lt;li&gt;Browser or Playwright snapshots&lt;/li&gt;
&lt;li&gt;Results from other MCP servers&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Large responses consume context quickly. Reading fifty files directly may leave less room for reasoning about the implementation. Context Mode moves data processing closer to the tool call and returns a smaller result to the model.&lt;/p&gt;
&lt;p&gt;For example, instead of placing a large log file into the conversation, an agent can process it and return only matching errors, counts, or summaries. Instead of loading an entire document, it can index the document and retrieve relevant sections later.&lt;/p&gt;
&lt;h2 id=&#34;core-capabilities&#34;&gt;Core Capabilities
&lt;/h2&gt;&lt;h3 id=&#34;1-session-continuity&#34;&gt;1. Session Continuity
&lt;/h3&gt;&lt;p&gt;Context Mode records useful events from a coding session, including prompts, decisions, tool activity, errors, and task progress. When a session is resumed or the context is compacted, it can restore relevant working state instead of forcing Copilot to start from an empty context.&lt;/p&gt;
&lt;p&gt;The restored context can answer questions such as:&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Copilot Prompt&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;What caused the Todo API exception?
Which file did we change?
What test is still missing?&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Session continuity is project-oriented. It is intended to help an agent continue development work, not to reproduce every message exactly as a chat export.&lt;/p&gt;
&lt;h3 id=&#34;2-local-session-storage&#34;&gt;2. Local Session Storage
&lt;/h3&gt;&lt;p&gt;Context Mode stores session and indexed-content data locally in SQLite. Its search layer uses SQLite FTS5 and BM25 ranking to find relevant text. This gives the agent searchable history without requiring a separate database server.&lt;/p&gt;
&lt;p&gt;The repository documents storage under a Context Mode data directory, with project-scoped content and session data. The exact location can vary by adapter and configuration, so inspect the installed version before backing up or changing retention behavior.&lt;/p&gt;
&lt;h3 id=&#34;3-context-reduction&#34;&gt;3. Context Reduction
&lt;/h3&gt;&lt;p&gt;Context Mode can run code, process files, batch operations, and inspect large outputs while returning only standard output or relevant matches. This reduces the amount of raw data added to the model context.&lt;/p&gt;
&lt;p&gt;Its MCP tools include capabilities for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Running code in a sandboxed subprocess&lt;/li&gt;
&lt;li&gt;Processing a file without returning its full contents&lt;/li&gt;
&lt;li&gt;Running multiple commands or searches in one operation&lt;/li&gt;
&lt;li&gt;Indexing local files and directories&lt;/li&gt;
&lt;li&gt;Fetching and indexing web pages&lt;/li&gt;
&lt;li&gt;Searching indexed content&lt;/li&gt;
&lt;li&gt;Fetching only selected observations or snippets&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is useful for repositories, logs, CSV files, API responses, and documentation that are too large to paste into a chat.&lt;/p&gt;
&lt;h3 id=&#34;4-full-text-retrieval&#34;&gt;4. Full-Text Retrieval
&lt;/h3&gt;&lt;p&gt;The &lt;code&gt;ctx_index&lt;/code&gt; tool chunks content while preserving useful structure such as headings and code blocks. The &lt;code&gt;ctx_search&lt;/code&gt; tool then searches indexed content and returns focused snippets rather than an entire document.&lt;/p&gt;
&lt;p&gt;Search supports relevance ranking, stemming, substring matching, proximity ranking, fuzzy correction, and smart snippets. These features make it possible to ask for a concept without knowing the exact wording used in the original file.&lt;/p&gt;
&lt;h3 id=&#34;5-web-and-document-retrieval&#34;&gt;5. Web and Document Retrieval
&lt;/h3&gt;&lt;p&gt;Context Mode can fetch a URL, convert it to searchable content, and index it. A later query can retrieve relevant sections without placing the entire web page in the conversation.&lt;/p&gt;
&lt;p&gt;It also supports cache behavior for previously indexed URLs. This can avoid repeated downloads and reduce repeated context usage for stable documentation.&lt;/p&gt;
&lt;h3 id=&#34;6-tool-routing&#34;&gt;6. Tool Routing
&lt;/h3&gt;&lt;p&gt;On supported platforms, hooks can guide or enforce routing of large operations through Context Mode. The purpose is to prevent a large file, log, or external MCP response from consuming the context window unnecessarily.&lt;/p&gt;
&lt;p&gt;This is stronger than a system prompt alone. A prompt can tell the model to use a context tool, while a hook can intercept tool activity and redirect or block selected operations, depending on the platform integration.&lt;/p&gt;
&lt;h3 id=&#34;7-statistics-and-diagnostics&#34;&gt;7. Statistics and Diagnostics
&lt;/h3&gt;&lt;p&gt;Context Mode provides utility commands for inspecting its operation:&lt;/p&gt;
&lt;div class=&#34;copilot-prompt context-mode-tool&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Context Mode Commands&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;ctx stats    -&gt; context savings and session statistics
ctx doctor   -&gt; runtime, hook, SQLite, and installation diagnostics
ctx index    -&gt; index a file or directory
ctx search   -&gt; search indexed content
ctx purge    -&gt; remove indexed content&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;These commands help verify that the integration is active and show how much context has been saved.&lt;/p&gt;
&lt;h2 id=&#34;how-session-continuity-works&#34;&gt;How Session Continuity Works
&lt;/h2&gt;&lt;p&gt;A simplified flow looks like this:&lt;/p&gt;
&lt;div class=&#34;mermaid&#34;&gt;%%{init: {&#39;theme&#39;: &#39;base&#39;}}%%
graph LR
    A[Copilot prompt] --&gt; B[Context Mode hooks]
    B --&gt; C[Session and tool events]
    C --&gt; D[(Local SQLite and FTS5)]
    D --&gt; E[Relevant context retrieval]
    E --&gt; F[Copilot continues task]

    classDef copilot fill:#dbeafe,stroke:#2563eb,stroke-width:3px,color:#1e3a8a
    classDef mode fill:#fce7f3,stroke:#db2777,stroke-width:3px,color:#5e163d
    classDef events fill:#fef3c7,stroke:#d97706,stroke-width:3px,color:#78350f
    classDef storage fill:#dcfce7,stroke:#16a34a,stroke-width:3px,color:#14532d
    class A,F copilot
    class B mode
    class C events
    class D storage
    class E copilot

    linkStyle 0 stroke:#2563eb,stroke-width:3px
    linkStyle 1 stroke:#db2777,stroke-width:3px
    linkStyle 2 stroke:#d97706,stroke-width:3px
    linkStyle 3 stroke:#16a34a,stroke-width:3px
    linkStyle 4 stroke:#2563eb,stroke-width:3px&lt;/div&gt;
&lt;p&gt;During a long task, Context Mode captures useful session events. Before compaction, it can create a resumable snapshot. When the agent starts or resumes again, the integration retrieves relevant project and session context and makes it available to the model.&lt;/p&gt;
&lt;p&gt;The important detail is selective retrieval. The entire previous conversation does not need to be inserted into the new context window. The agent searches for the current task and receives the most relevant observations.&lt;/p&gt;
&lt;h2 id=&#34;what-context-mode-does-not-do&#34;&gt;What Context Mode Does Not Do
&lt;/h2&gt;&lt;p&gt;Context Mode is not a complete archive of every Copilot chat stored by GitHub. It cannot recover sessions that happened before it was installed or before its integration was enabled.&lt;/p&gt;
&lt;p&gt;It also does not guarantee that every Copilot event is captured on every platform. Hook support, session-start behavior, compaction handling, and context injection depend on the client adapter and the installed version. Verify the integration with its diagnostic command before relying on it for important work.&lt;/p&gt;
&lt;p&gt;Automatic history capture also requires privacy discipline. Prompts, file paths, tool inputs, command output, and source code can contain secrets or personal information. Configure exclusions, avoid indexing sensitive files, and inspect the local data directory before sharing or committing it.&lt;/p&gt;
&lt;h2 id=&#34;when-to-use-context-mode&#34;&gt;When to Use Context Mode
&lt;/h2&gt;&lt;p&gt;Context Mode is a strong fit when:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A coding task spans many Copilot interactions.&lt;/li&gt;
&lt;li&gt;Context compaction causes repeated explanations.&lt;/li&gt;
&lt;li&gt;Tool output is larger than the useful answer.&lt;/li&gt;
&lt;li&gt;You need to search project history or indexed documentation.&lt;/li&gt;
&lt;li&gt;You want local session storage and FTS5 search.&lt;/li&gt;
&lt;li&gt;You use VSCode Copilot or another supported coding-agent client.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Context Mode gives coding agents a second layer of memory: searchable working history and context management. It can preserve prompts, decisions, tool activity, errors, and next steps while keeping large raw outputs outside the model&amp;rsquo;s context.&lt;/p&gt;
&lt;p&gt;For VSCode Copilot, Context Mode is most useful when Copilot needs to continue a complicated coding task, search previous project activity, or work with large files and tool responses without filling the context window.&lt;/p&gt;
&lt;h2 id=&#34;reference&#34;&gt;Reference
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/mksglu/context-mode&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Context Mode source code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://contextmode.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Context Mode documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>Server Memory for MCP: Knowledge Graph Memory in Copilot</title>
        <link>https://dotnetuniversity.com/server-memory-for-mcp-knowledge-graph-memory-in-copilot/</link>
        <pubDate>Mon, 20 Jul 2026 00:00:00 +0000</pubDate>
        
        <guid>https://dotnetuniversity.com/server-memory-for-mcp-knowledge-graph-memory-in-copilot/</guid>
        <description>&lt;img src="https://dotnetuniversity.com/server-memory-for-mcp-knowledge-graph-memory-in-copilot/nik-cUQGqJ6mBAw-u.jpg" alt="Featured image of post Server Memory for MCP: Knowledge Graph Memory in Copilot" /&gt;&lt;p&gt;Every time you open a new Copilot chat, the model starts fresh. It does not remember that you chose PostgreSQL, prefer Minimal APIs, or work on a project called &lt;code&gt;MemorySample&lt;/code&gt;. Large language models are stateless — they only see what fits in the current context window, and a new session starts with an empty one.&lt;/p&gt;
&lt;p&gt;The &lt;a class=&#34;link&#34; href=&#34;https://github.com/modelcontextprotocol/servers/tree/main/src/memory&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;MCP Memory Server&lt;/a&gt; changes this. It is the official reference implementation of persistent memory for MCP clients. It stores facts as a local knowledge graph of &lt;strong&gt;entities&lt;/strong&gt;, &lt;strong&gt;relations&lt;/strong&gt;, and &lt;strong&gt;observations&lt;/strong&gt; in a plain-text &lt;code&gt;memory.jsonl&lt;/code&gt; file, and exposes tools that Copilot can call to save and retrieve those facts.&lt;/p&gt;
&lt;p&gt;In this post, we will walk through a real VSCode workflow: we teach Copilot a few facts about ourselves and our project in one session, close the chat, open a brand-new session, and ask a question that only makes sense if Copilot still remembers the previous context. Then we will inspect the underlying file and look at what makes memory actually work well.&lt;/p&gt;
&lt;h2 id=&#34;what-you-will-build&#34;&gt;What You Will Build
&lt;/h2&gt;&lt;p&gt;You will teach Copilot a few facts about yourself and your project in &lt;strong&gt;Session 1&lt;/strong&gt;, close the chat, open a &lt;strong&gt;Session 2&lt;/strong&gt;, and ask a question that only makes sense if Copilot still remembers the previous context. Then you will inspect the underlying &lt;code&gt;memory.jsonl&lt;/code&gt; file to see how the data is stored.&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Copilot Prompt&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;Session 1: &#34;I work on a .NET microservice called MemorySample. I use .NET 10, EF Core with PostgreSQL, and I prefer WolverineFx over MassTransit.&#34;
&lt;p&gt;Session 2: &amp;ldquo;Suggest an architecture for the next feature in MemorySample.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Copilot answers using .NET 10, EF Core, PostgreSQL, WolverineFx, and Minimal APIs.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Everything in this post was verified against the real server — the tool calls, the JSON responses, and the &lt;code&gt;memory.jsonl&lt;/code&gt; content below come from running &lt;code&gt;@modelcontextprotocol/server-memory&lt;/code&gt; and driving it over MCP.&lt;/p&gt;
&lt;h2 id=&#34;how-the-memory-server-works&#34;&gt;How the Memory Server Works
&lt;/h2&gt;&lt;p&gt;Before the step-by-step walkthrough, it helps to understand what the server actually does under the hood. The MCP Memory Server is a small Node.js process that speaks the MCP protocol over standard input/output. Copilot launches it through the &lt;code&gt;mcp.json&lt;/code&gt; configuration and then calls its tools like any other MCP tool. The same server works with any MCP client — Claude Desktop, VSCode Copilot, Cursor — because they all speak the same protocol.&lt;/p&gt;
&lt;h3 id=&#34;the-knowledge-graph-model&#34;&gt;The Knowledge Graph Model
&lt;/h3&gt;&lt;p&gt;Memory is stored as a &lt;strong&gt;knowledge graph&lt;/strong&gt; with three building blocks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Entity&lt;/strong&gt; — a node. It has a unique &lt;code&gt;name&lt;/code&gt;, an &lt;code&gt;entityType&lt;/code&gt; (for example &lt;code&gt;person&lt;/code&gt;, &lt;code&gt;project&lt;/code&gt;, &lt;code&gt;technology_stack&lt;/code&gt;), and a list of &lt;code&gt;observations&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Relation&lt;/strong&gt; — a directed edge between two entities. It has &lt;code&gt;from&lt;/code&gt;, &lt;code&gt;to&lt;/code&gt;, and a &lt;code&gt;relationType&lt;/code&gt; written in active voice (for example &lt;code&gt;works_on&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Observation&lt;/strong&gt; — an atomic fact attached to an entity (one fact per observation).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is why the memory server can answer questions like &amp;ldquo;what tech stack do I prefer?&amp;rdquo; — the facts live on the &lt;code&gt;John_Doe&lt;/code&gt; entity, and the relations tell Copilot how that entity connects to your projects and tools.&lt;/p&gt;
&lt;div class=&#34;mermaid&#34;&gt;%%{init: {&#39;theme&#39;: &#39;base&#39;}}%%
graph LR
    A[&#34;Session 1&lt;br/&gt;You share facts&#34;] --&gt;|&#34;create_entities&lt;br/&gt;create_relations&#34;| B[&#34;memory.jsonl&lt;br/&gt;entities + relations&#34;]
    B --&gt;|&#34;read_graph&lt;br/&gt;search_nodes&lt;br/&gt;open_nodes&#34;| C[&#34;Session 2&lt;br/&gt;New chat&#34;]
    C --&gt; D[&#34;Contextual answer&lt;br/&gt;without repeating facts&#34;]
  classDef session fill:#dbeafe,stroke:#2563eb,stroke-width:3px,color:#1e3a8a
  classDef storage fill:#fce7f3,stroke:#db2777,stroke-width:3px,color:#5e163d
  classDef answer fill:#dcfce7,stroke:#16a34a,stroke-width:3px,color:#14532d
  class A session
  class C session
    class B storage
    class D answer&lt;/div&gt;
&lt;h3 id=&#34;storage-a-file-not-a-database&#34;&gt;Storage: A File, Not a Database
&lt;/h3&gt;&lt;p&gt;The most common question is: does the memory server use a database? &lt;strong&gt;No.&lt;/strong&gt; There is no database server, no connection string, and no schema migration. You cannot plug in PostgreSQL, SQLite, or MongoDB — the official server is deliberately file-based. Storage is a single plain-text &lt;strong&gt;JSONL&lt;/strong&gt; file — one JSON object per line. By default the server writes &lt;code&gt;memory.jsonl&lt;/code&gt; next to its own package files, which is why you must set &lt;code&gt;MEMORY_FILE_PATH&lt;/code&gt; to point at a stable location inside your project.&lt;/p&gt;
&lt;p&gt;The file has two advantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Portable&lt;/strong&gt; — copy the file and the memory moves with it. You can commit it to your repository or back it up like any text file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Human-readable&lt;/strong&gt; — you can open it in any editor and see exactly what the model knows about you.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Every time Copilot calls a tool, the server reads the file, applies the change in memory, and writes the whole file back. The file &lt;strong&gt;is&lt;/strong&gt; the database.&lt;/p&gt;
&lt;h3 id=&#34;alternatives-and-complementary-tools&#34;&gt;Alternatives and Complementary Tools
&lt;/h3&gt;&lt;p&gt;The official MCP Memory Server is intentionally small and explicit. Other tools focus on automatic session capture, semantic memory, or reducing the amount of data sent to the model:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/mksglu/context-mode&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Context Mode&lt;/a&gt;&lt;/strong&gt; — A local context-management and session-continuity tool for coding agents. It indexes project content and session events in SQLite with FTS5, restores relevant context after compaction, and reduces large tool outputs before they reach the context window. It specifically documents VSCode Copilot support.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/thedotmack/claude-mem&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Claude-Mem&lt;/a&gt;&lt;/strong&gt; — Captures coding-session observations, prompts, tool activity, and summaries, then stores them in SQLite and makes relevant history searchable. It is strongest in Claude Code, so verify the current adapter before relying on automatic capture in VSCode Copilot.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/mem0ai/mem0&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Mem0&lt;/a&gt;&lt;/strong&gt; — A memory layer for AI applications and agents. It extracts user, session, and agent memories and supports semantic, keyword, and entity-based retrieval. It is a better fit for building a production memory backend than for simple Copilot configuration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/supermemoryai/supermemory&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Supermemory&lt;/a&gt;&lt;/strong&gt; — An automatic memory and context engine that builds user profiles, tracks project context, and provides semantic search through MCP. It supports VSCode and can run through its hosted service or local self-hosted mode.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Choose the official server for transparent, file-based facts; Context Mode or Claude-Mem for coding-session history; Mem0 for building an application memory layer; and Supermemory for automatic long-term user and project profiles.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The official MCP Memory Server keeps storage simple: it uses a plain JSONL file, not a database.&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;h3 id=&#34;why-memory-survives-across-sessions&#34;&gt;Why Memory Survives Across Sessions
&lt;/h3&gt;&lt;p&gt;A chat session is ephemeral — it is a window into a conversation and disappears when you close it. The memory file is not. This is the key to the whole system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;All sessions share one file.&lt;/strong&gt; Every Copilot chat starts the server with the same &lt;code&gt;MEMORY_FILE_PATH&lt;/code&gt;, so every session reads and writes the same &lt;code&gt;memory.jsonl&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The file outlives the chat.&lt;/strong&gt; When you close Session 1, the chat history is gone, but the file stays on disk with everything the model saved.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Nothing is lost between sessions.&lt;/strong&gt; Each tool call performs a read-modify-write: the server reads the whole file, applies your change, and writes the file back. Facts added in Session 1 are still there when Session 3 or Session 10 starts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Retrieval is on demand.&lt;/strong&gt; In a new session the model does not automatically know the old facts. It pulls them back with &lt;code&gt;read_graph&lt;/code&gt;, &lt;code&gt;search_nodes&lt;/code&gt;, or &lt;code&gt;open_nodes&lt;/code&gt; — that is how a new session &amp;ldquo;remembers&amp;rdquo; what an old session learned.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So the model is still stateless — but the &lt;em&gt;memory&lt;/em&gt; is not. The file is the bridge between sessions, and the tools are how Copilot crosses it.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;VSCode with the GitHub Copilot extension.&lt;/li&gt;
&lt;li&gt;Node.js installed so &lt;code&gt;npx&lt;/code&gt; works.&lt;/li&gt;
&lt;li&gt;The MCP Memory Server package: &lt;code&gt;@modelcontextprotocol/server-memory&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;step-1-configure-the-memory-server-in-vscode&#34;&gt;Step 1: Configure the Memory Server in VSCode
&lt;/h2&gt;&lt;p&gt;Open the Command Palette with &lt;code&gt;Ctrl + Shift + P&lt;/code&gt; and run &lt;code&gt;MCP: Open User Configuration&lt;/code&gt; (or add a &lt;code&gt;.vscode/mcp.json&lt;/code&gt; file to your project). Add the memory server — the same config works on Windows, macOS, and Linux, because &lt;code&gt;npx&lt;/code&gt; runs the server directly on every OS with no &lt;code&gt;cmd /c&lt;/code&gt; wrapper:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;
&lt;table style=&#34;border-spacing:0;padding:0;margin:0;border:0;&#34;&gt;&lt;tr&gt;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 1
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 2
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 3
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 4
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 5
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 6
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 7
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 8
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 9
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;10
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;11
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;12
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;13
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;14
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;;width:100%&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;servers&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;memory&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;command&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;npx&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;args&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;-y&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;@modelcontextprotocol/server-memory&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ],
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;env&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;MEMORY_FILE_PATH&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;/home/yourname/projects/my-project/memory.jsonl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Here is what each part of the configuration means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;command&lt;/code&gt; and &lt;code&gt;args&lt;/code&gt; — how VSCode launches the server process. &lt;code&gt;npx&lt;/code&gt; runs the npm package directly on any OS, so one config works everywhere.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;env.MEMORY_FILE_PATH&lt;/code&gt; — the absolute path of the &lt;code&gt;memory.jsonl&lt;/code&gt; file where all memory is stored. This is the most important line in the whole file.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Most important detail #1&lt;/strong&gt;: Always set &lt;code&gt;MEMORY_FILE_PATH&lt;/code&gt; to a stable, absolute path. If you skip this, the server writes &lt;code&gt;memory.jsonl&lt;/code&gt; next to the package cache and your memory can disappear on the next &lt;code&gt;npx&lt;/code&gt; install.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;After saving, open the Copilot Chat side panel. You should see the &lt;code&gt;memory&lt;/code&gt; server listed as an available tool. If it is missing, reload VSCode with &lt;code&gt;Developer: Reload Window&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;mermaid&#34;&gt;flowchart LR
  A[.vscode/mcp.json] --&gt; B[Memory server]
  B --&gt; C[Copilot Chat]
  C --&gt; D[Memory tools available]
  classDef config fill:#dbeafe,stroke:#2563eb,stroke-width:2px,color:#1e3a8a
  classDef server fill:#fce7f3,stroke:#db2777,stroke-width:2px,color:#5e163d
  classDef copilot fill:#dcfce7,stroke:#16a34a,stroke-width:2px,color:#14532d
  class A config
  class B server
  class C,D copilot&lt;/div&gt;
&lt;h2 id=&#34;step-2-seed-memory-in-session-1&#34;&gt;Step 2: Seed Memory in Session 1
&lt;/h2&gt;&lt;p&gt;Start a new Copilot Chat and tell it about your project. Be explicit so the model extracts the right entities.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Copilot Prompt&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;Remember these facts for later:
- My name is John Doe.
- I work on a .NET microservice project called MemorySample.
- MemorySample uses a Vertical Slice Architecture with feature folders.
- My preferred stack is .NET 10, EF Core with PostgreSQL, Minimal APIs, and WolverineFx for messaging.
- I prefer xunit.v3 for tests.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Copilot will call &lt;code&gt;create_entities&lt;/code&gt; and &lt;code&gt;create_relations&lt;/code&gt; on your behalf. The resulting knowledge graph looks like this:&lt;/p&gt;
&lt;div class=&#34;mermaid&#34;&gt;flowchart LR
  A[Your facts] --&gt; B[create_entities]
  A --&gt; C[create_relations]
  B --&gt; D[(memory.jsonl)]
  C --&gt; D
  D --&gt; E[Knowledge graph]
  classDef input fill:#dbeafe,stroke:#2563eb,stroke-width:2px,color:#1e3a8a
  classDef tool fill:#fce7f3,stroke:#db2777,stroke-width:2px,color:#5e163d
  classDef store fill:#dcfce7,stroke:#16a34a,stroke-width:2px,color:#14532d
  class A input
  class B,C tool
  class D,E store&lt;/div&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Entity&lt;/th&gt;
          &lt;th&gt;Type&lt;/th&gt;
          &lt;th&gt;Observations&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;John_Doe&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;person&lt;/td&gt;
          &lt;td&gt;Prefers vertical slice architecture; likes WolverineFx over MassTransit; uses PostgreSQL; favorite IDE is VSCode&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;MemorySample_Project&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;project&lt;/td&gt;
          &lt;td&gt;.NET 10 microservice; Vertical Slice Architecture with feature folders; tested with xunit.v3&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;DotNet_TechStack&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;technology_stack&lt;/td&gt;
          &lt;td&gt;.NET 10; EF Core + PostgreSQL; Minimal APIs; xunit.v3&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Relations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;John_Doe&lt;/code&gt; → &lt;code&gt;works_on&lt;/code&gt; → &lt;code&gt;MemorySample_Project&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;John_Doe&lt;/code&gt; → &lt;code&gt;prefers&lt;/code&gt; → &lt;code&gt;DotNet_TechStack&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Under the hood, Copilot sends a &lt;code&gt;tools/call&lt;/code&gt; request to the memory server. This is the real request and response from &lt;code&gt;memory-server&lt;/code&gt; v0.6.3:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;
&lt;table style=&#34;border-spacing:0;padding:0;margin:0;border:0;&#34;&gt;&lt;tr&gt;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 1
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 2
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 3
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 4
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 5
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 6
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 7
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 8
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 9
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;10
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;11
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;12
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;13
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;14
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;15
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;16
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;17
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;18
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;19
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;20
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;21
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;22
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;23
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;24
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;;width:100%&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;create_entities&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;arguments&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;entities&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      { &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;John_Doe&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;entityType&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;person&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;observations&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Prefers vertical slice architecture in .NET&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Likes WolverineFx over MassTransit for transactional messaging&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Uses PostgreSQL as default database&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Favorite IDE is VSCode with Copilot&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ]},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      { &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;MemorySample_Project&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;entityType&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;project&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;observations&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Is a .NET 10 microservice&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Uses Vertical Slice Architecture with feature folders&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Is tested with xunit.v3&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ]},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      { &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;DotNet_TechStack&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;entityType&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;technology_stack&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;observations&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Primary framework is .NET 10&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Uses Entity Framework Core with PostgreSQL&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Prefers Minimal APIs over controllers&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Uses xunit.v3 for testing&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ]}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;After the chat, close the panel. The data is already on disk.&lt;/p&gt;
&lt;h2 id=&#34;step-3-inspect-the-memory-file&#34;&gt;Step 3: Inspect the Memory File
&lt;/h2&gt;&lt;p&gt;Open the file at &lt;code&gt;MEMORY_FILE_PATH&lt;/code&gt;. Each line is a JSON object. Entities are stored with a &lt;code&gt;type&lt;/code&gt; field of &lt;code&gt;entity&lt;/code&gt;, relations with &lt;code&gt;type&lt;/code&gt; of &lt;code&gt;relation&lt;/code&gt; — this is the JSONL format used by the current version of the server:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;
&lt;table style=&#34;border-spacing:0;padding:0;margin:0;border:0;&#34;&gt;&lt;tr&gt;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;1
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;2
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;3
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;4
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;;width:100%&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;type&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;entity&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;John_Doe&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;entityType&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;person&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;observations&amp;#34;&lt;/span&gt;:[&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Prefers vertical slice architecture in .NET&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Likes WolverineFx over MassTransit for transactional messaging&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Uses PostgreSQL as default database&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Favorite IDE is VSCode with Copilot&amp;#34;&lt;/span&gt;]}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;type&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;entity&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;MemorySample_Project&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;entityType&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;project&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;observations&amp;#34;&lt;/span&gt;:[&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Is a .NET 10 microservice&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Uses Vertical Slice Architecture with feature folders&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Is tested with xunit.v3&amp;#34;&lt;/span&gt;]}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;type&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;entity&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;DotNet_TechStack&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;entityType&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;technology_stack&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;observations&amp;#34;&lt;/span&gt;:[&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Primary framework is .NET 10&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Uses Entity Framework Core with PostgreSQL&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Prefers Minimal APIs over controllers&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Uses xunit.v3 for testing&amp;#34;&lt;/span&gt;]}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;type&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;relation&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;from&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;John_Doe&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;to&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;MemorySample_Project&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;relationType&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;works_on&amp;#34;&lt;/span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;type&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;relation&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;from&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;John_Doe&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;to&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;DotNet_TechStack&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;relationType&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;prefers&amp;#34;&lt;/span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This file is the entire secret. It is plain text, local, and portable. You can back it up, version it, or move it to another machine — the memory comes with it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Most important detail #2&lt;/strong&gt;: Memory is only as good as the file path. Treat &lt;code&gt;memory.jsonl&lt;/code&gt; like a small database. Back it up.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;step-4-use-memory-in-session-2&#34;&gt;Step 4: Use Memory in Session 2
&lt;/h2&gt;&lt;p&gt;Open a &lt;strong&gt;new Copilot Chat&lt;/strong&gt;. Do not repeat the project facts. Ask something that depends on them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Copilot Prompt&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;I want to add a new feature to MemorySample. Suggest the architecture and tech stack.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Copilot starts by calling &lt;code&gt;read_graph&lt;/code&gt; or &lt;code&gt;search_nodes&lt;/code&gt;. Here is the real &lt;code&gt;search_nodes&lt;/code&gt; call and response when we searched for &lt;code&gt;WolverineFx&lt;/code&gt; — notice how the server returns the matching entity together with its relations:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;
&lt;table style=&#34;border-spacing:0;padding:0;margin:0;border:0;&#34;&gt;&lt;tr&gt;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;1
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;2
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;3
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;;width:100%&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;search_nodes&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;arguments&amp;#34;&lt;/span&gt;: { &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;query&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;WolverineFx&amp;#34;&lt;/span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;
&lt;table style=&#34;border-spacing:0;padding:0;margin:0;border:0;&#34;&gt;&lt;tr&gt;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 1
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 2
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 3
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 4
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 5
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 6
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 7
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 8
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 9
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;10
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;11
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;12
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;13
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;14
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;15
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;16
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;17
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;18
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;;width:100%&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;entities&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;John_Doe&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;entityType&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;person&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;observations&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Prefers vertical slice architecture in .NET&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Likes WolverineFx over MassTransit for transactional messaging&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Uses PostgreSQL as default database&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Favorite IDE is VSCode with Copilot&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ],
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;relations&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    { &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;from&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;John_Doe&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;to&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;MemorySample_Project&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;relationType&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;works_on&amp;#34;&lt;/span&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    { &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;from&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;John_Doe&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;to&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;DotNet_TechStack&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;relationType&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;prefers&amp;#34;&lt;/span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;It finds &lt;code&gt;John_Doe&lt;/code&gt;, &lt;code&gt;MemorySample_Project&lt;/code&gt;, and &lt;code&gt;DotNet_TechStack&lt;/code&gt;. The answer is now contextual instead of generic.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Copilot (example response):&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Copilot Response&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;For the new feature in MemorySample, I would suggest:
- .NET 10 Minimal API as the host.
- Vertical Slice Architecture with feature folders.
- EF Core 10 with PostgreSQL for persistence.
- WolverineFx for messaging if the feature needs durable handlers or outbox.
- xunit.v3 with TestContainers for integration tests.
&lt;p&gt;This matches your existing DotNet_TechStack and the style you already use in MemorySample_Project.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Notice that the model did not ask &amp;ldquo;What is your stack?&amp;rdquo; It answered directly because the memory server bridged the two sessions.&lt;/p&gt;
&lt;div class=&#34;mermaid&#34;&gt;flowchart LR
  A[New Copilot chat] --&gt; B[search_nodes]
  B --&gt; C[Matching entities and relations]
  C --&gt; D[Contextual answer]
  classDef chat fill:#dbeafe,stroke:#2563eb,stroke-width:2px,color:#1e3a8a
  classDef tool fill:#fce7f3,stroke:#db2777,stroke-width:2px,color:#5e163d
  classDef result fill:#dcfce7,stroke:#16a34a,stroke-width:2px,color:#14532d
  class A,D chat
  class B tool
  class C result&lt;/div&gt;
&lt;h2 id=&#34;step-5-add-more-facts-across-sessions&#34;&gt;Step 5: Add More Facts Across Sessions
&lt;/h2&gt;&lt;p&gt;Memory gets more useful over time. In a third session, you add a new observation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Copilot Prompt&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;Also remember: I am currently learning about agent memory systems and writing documentation about the MCP Memory Server.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Copilot calls &lt;code&gt;add_observations&lt;/code&gt; on &lt;code&gt;John_Doe&lt;/code&gt;. Again, the real request and response:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;
&lt;table style=&#34;border-spacing:0;padding:0;margin:0;border:0;&#34;&gt;&lt;tr&gt;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 1
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 2
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 3
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 4
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 5
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 6
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 7
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 8
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt; 9
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;10
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;11
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;12
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;13
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;14
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;;width:100%&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;add_observations&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;arguments&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;observations&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;entityName&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;John_Doe&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;contents&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Currently learning about MCP memory systems&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Writing documentation about the MCP Memory Server&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        ]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;
&lt;table style=&#34;border-spacing:0;padding:0;margin:0;border:0;&#34;&gt;&lt;tr&gt;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;1
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;2
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;3
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;4
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;5
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;6
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;7
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;8
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c&#34;&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;;width:100%&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;entityName&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;John_Doe&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#cba6f7&#34;&gt;&amp;#34;addedObservations&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Currently learning about MCP memory systems&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#a6e3a1&#34;&gt;&amp;#34;Writing documentation about the MCP Memory Server&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;In a fourth session, you can ask:&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Copilot Prompt&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;What am I currently learning about?&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Copilot searches the graph, finds the observation, and answers without you repeating the topic.&lt;/p&gt;
&lt;h2 id=&#34;what-makes-memory-work-well&#34;&gt;What Makes Memory Work Well
&lt;/h2&gt;&lt;p&gt;The memory server is simple, but a few patterns decide whether it helps or gets in the way. These are the most important parts of using memory.&lt;/p&gt;
&lt;h3 id=&#34;1-atomic-observations&#34;&gt;1. Atomic Observations
&lt;/h3&gt;&lt;p&gt;One fact per observation. Good:&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Memory Example&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;&#34;Uses PostgreSQL as default database&#34;
&#34;Prefers Minimal APIs over controllers&#34;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Bad:&lt;/p&gt;
&lt;div class=&#34;copilot-prompt context-mode-tool&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;Avoid This Pattern&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;&#34;Uses PostgreSQL and Minimal APIs and likes WolverineFx&#34;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Atomic facts make search precise and deletions safe.&lt;/p&gt;
&lt;h3 id=&#34;2-stable-unique-entity-names&#34;&gt;2. Stable, Unique Entity Names
&lt;/h3&gt;&lt;p&gt;Use &lt;code&gt;John_Doe&lt;/code&gt; instead of &lt;code&gt;John&lt;/code&gt;. If a second John appears, the graph still works.&lt;/p&gt;
&lt;h3 id=&#34;3-active-voice-relations&#34;&gt;3. Active Voice Relations
&lt;/h3&gt;&lt;p&gt;Relations are directed. Use &lt;code&gt;works_on&lt;/code&gt;, &lt;code&gt;prefers&lt;/code&gt;, &lt;code&gt;subscribed_to&lt;/code&gt;. Avoid passive forms like &lt;code&gt;is_used_by&lt;/code&gt; where the direction is unclear.&lt;/p&gt;
&lt;h3 id=&#34;4-a-system-prompt-that-triggers-memory&#34;&gt;4. A System Prompt That Triggers Memory
&lt;/h3&gt;&lt;p&gt;Without guidance, the model may not call &lt;code&gt;read_graph&lt;/code&gt; at the start of a chat. Add custom instructions in VSCode:&lt;/p&gt;
&lt;div class=&#34;copilot-prompt&#34;&gt;
&lt;div class=&#34;copilot-prompt__header&#34;&gt;System Instruction&lt;/div&gt;
&lt;div class=&#34;copilot-prompt__body&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre&gt;&lt;code data-lang=&#34;text&#34;&gt;Before answering, retrieve relevant facts from the memory knowledge graph.
When you learn new facts about the user, their projects, or their preferences,
create entities and relations, and store atomic observations.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Most important detail #3&lt;/strong&gt;: Memory does nothing unless the model is reminded to use it. A system prompt or custom instruction is required.&lt;/p&gt;&lt;/blockquote&gt;
&lt;div class=&#34;mermaid&#34;&gt;flowchart LR
  A[Custom instruction] --&gt; B[Retrieve relevant memory]
  B --&gt; C[Copilot uses memory tools]
  C --&gt; D[More contextual answers]
  classDef instruction fill:#dbeafe,stroke:#2563eb,stroke-width:2px,color:#1e3a8a
  classDef tool fill:#fce7f3,stroke:#db2777,stroke-width:2px,color:#5e163d
  classDef result fill:#dcfce7,stroke:#16a34a,stroke-width:2px,color:#14532d
  class A instruction
  class B,C tool
  class D result&lt;/div&gt;
&lt;h2 id=&#34;common-pitfalls&#34;&gt;Common Pitfalls
&lt;/h2&gt;&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Problem&lt;/th&gt;
          &lt;th&gt;Cause&lt;/th&gt;
          &lt;th&gt;Fix&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Memory is lost after restart&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;MEMORY_FILE_PATH&lt;/code&gt; not set or points to a temp directory&lt;/td&gt;
          &lt;td&gt;Use an absolute path in &lt;code&gt;mcp.json&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Copilot ignores memory&lt;/td&gt;
          &lt;td&gt;No custom instruction triggers retrieval&lt;/td&gt;
          &lt;td&gt;Add a system prompt&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Graph grows with noise&lt;/td&gt;
          &lt;td&gt;Observations are too long or duplicated&lt;/td&gt;
          &lt;td&gt;Keep facts atomic, one per line&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Search returns wrong nodes&lt;/td&gt;
          &lt;td&gt;Entity names are too generic or change between sessions&lt;/td&gt;
          &lt;td&gt;Use stable, unique names&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;The MCP Memory Server turns Copilot from a stateless chat into an assistant that remembers your project across days. The workflow is simple: configure the server with a stable &lt;code&gt;MEMORY_FILE_PATH&lt;/code&gt;, seed facts in one session, and let &lt;code&gt;read_graph&lt;/code&gt;, &lt;code&gt;search_nodes&lt;/code&gt;, and &lt;code&gt;open_nodes&lt;/code&gt; bring that context into every new session.&lt;/p&gt;
&lt;p&gt;The three most important details to remember:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;The file path is everything&lt;/strong&gt; — point &lt;code&gt;MEMORY_FILE_PATH&lt;/code&gt; at a stable absolute location and back it up like a database.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Atomic, well-named data&lt;/strong&gt; — one fact per observation, stable entity names, active-voice relations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A prompt that triggers memory&lt;/strong&gt; — the model only uses the tools if you tell it to.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;reference&#34;&gt;Reference
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/modelcontextprotocol/servers/tree/main/src/memory&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;MCP Memory Server source code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/modelcontextprotocol/servers&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;MCP servers repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        
    </channel>
</rss>
