> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memanto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# VS Code

> Search, question and save your agents' memory from a VS Code sidebar, and let Copilot recall it while it works.

# Memanto for Visual Studio Code

<img src="https://mintcdn.com/memanto/F02EFslpFOmpllmg/logo/integrations/vscode.svg?fit=max&auto=format&n=F02EFslpFOmpllmg&q=85&s=e83ed97e24af65f9f45f474a4c2cf25c" alt="Visual Studio Code" width="64" style={{marginBottom: "1.5rem"}} data-path="logo/integrations/vscode.svg" />

The [Memanto extension](https://marketplace.visualstudio.com/items?itemName=moorcheh.memanto) puts your agents' memory inside the editor. Look up what Claude Code, Cursor or Codex already decided without leaving your code, save a decision straight from a selection, and let GitHub Copilot check that memory on its own before it writes anything.

<CardGroup cols={2}>
  <Card title="Chat sidebar" icon="comments">
    **Recall** lists matching memories with type, confidence and provenance. **Answer** writes a reply grounded in them.
  </Card>

  <Card title="Copilot tools" icon="robot">
    Copilot's agent mode can recall and ask Memanto by itself, so the code it writes matches past decisions.
  </Card>

  <Card title="@memanto in chat" icon="at">
    Ask from the Copilot Chat panel with `@memanto`, plus `/recall`, `/recent` and `/remember`.
  </Card>

  <Card title="Zero configuration" icon="wand-magic-sparkles">
    Reads the key and agent the Memanto CLI already stored, and runs its own server. Nothing to set up if the CLI works.
  </Card>
</CardGroup>

## How It Works

```text theme={null}
VS Code window ──► private `memanto serve` on a free 127.0.0.1 port ──► Moorcheh (cloud)
                   started on first use, stopped when the window closes   or your on-prem backend
```

The extension talks only to a Memanto server on your own machine. The first time you use Memanto in a window it starts one with the `memanto` executable on your `PATH`, and stops it when the window closes. A `memanto serve` you run yourself is never used or stopped, and each window gets its own server.

## Prerequisites

* **VS Code 1.95+**
* The **Memanto CLI**, which needs Python **3.10+**
* A [Moorcheh API key](https://console.moorcheh.ai/api-keys) (free tier: 100K ops/month), or an [on-prem](/on-prem/overview) backend with no key
* **GitHub Copilot Chat** only if you want the `@memanto` participant and the Copilot tools. The sidebar works without it.

## Install

<Steps>
  <Step title="Set up the Memanto CLI">
    Skip this if `memanto status` already works.

    ```bash theme={null}
    pip install memanto
    memanto            # choose cloud or on-prem, and store your key
    ```
  </Step>

  <Step title="Install the extension">
    Search for **Memanto** in the Extensions view, or run:

    ```bash theme={null}
    code --install-extension moorcheh.memanto
    ```
  </Step>

  <Step title="Open the chat">
    Click the Memanto icon in the activity bar. The extension picks up your active agent and starts its server.
  </Step>
</Steps>

<Note>
  The extension never installs anything for you. If the CLI is missing, **Memanto: Setup steps** in the command palette shows each command with a copy button.
</Note>

## Chat sidebar

Pick an agent at the top, then choose a mode:

<Tabs>
  <Tab title="Recall">
    Lists the memories that match what you type, each with its type, confidence, provenance and date. The options row also offers the most recent memories, memories **as of** a date, and what **changed since** a date, plus a filter for the 13 [memory types](/reference/memory-types).
  </Tab>

  <Tab title="Answer">
    Writes one reply grounded in your stored memories, using the same pipeline as [`memanto answer`](/cli/ai/answer).
  </Tab>
</Tabs>

Any result can be copied, inserted into the file you're editing, or opened as a read-only tab.

The **Memories** view below the chat lists an agent's memories by type, loading each type when you expand it.

## Using Memanto with Copilot

### Ask with `@memanto`

In the Copilot Chat panel:

```text theme={null}
@memanto what did we decide about authentication?
@memanto /recall database
@memanto /recent
@memanto /remember we dropped session cookies
```

Each memory in a reply is a link that opens it as a tab.

### Let Copilot look things up itself

The extension registers three tools that Copilot's agent mode calls when it needs them:

| Tool               | Reference          | What it does                                           | Asks you first |
| ------------------ | ------------------ | ------------------------------------------------------ | -------------- |
| `memanto_recall`   | `#memanto`         | Returns the memories that match, as evidence           | No             |
| `memanto_answer`   | `#memantoAsk`      | Returns one written answer drawn from several memories | No             |
| `memanto_remember` | `#memantoRemember` | Saves one memory                                       | **Yes**        |

Ask Copilot to add a feature and it can check what your team already decided, then write code that matches. Use the `#` reference to point it at a tool explicitly.

`memanto_answer` runs a model over your memories, so it is slower and uses your Memanto quota; Copilot is told to prefer `memanto_recall` for single lookups.

<Warning>
  Saving always asks for confirmation. Memories are shared with every agent using that Memanto agent, so a model should not add to them on its own judgement.
</Warning>

## Save from the editor

Select code or text, right-click, and choose **Memanto: Remember selection**. Pick a [memory type](/reference/memory-types) and every agent sharing that Memanto agent can recall it.

**Memanto: Export memories to a folder** writes an agent's memories as Markdown with frontmatter, in the [Open Knowledge Format](/integrations/okf).

## Commands

| Command                                     | What it does                                   |
| ------------------------------------------- | ---------------------------------------------- |
| **Memanto: Open chat**                      | Opens the chat sidebar                         |
| **Memanto: Recall memories**                | Searches memories and lists the matches        |
| **Memanto: Ask a question**                 | Asks a question and opens the answer in a tab  |
| **Memanto: Remember selection**             | Saves the selected text as a memory            |
| **Memanto: Select agent**                   | Chooses which agent this window uses           |
| **Memanto: Export memories to a folder**    | Writes memories to a folder as Markdown        |
| **Memanto: Start server** / **Stop server** | Controls this window's private server          |
| **Memanto: Setup steps**                    | Shows the install steps with copyable commands |

## Settings

| Setting                          | Default         | What it does                                                   |
| -------------------------------- | --------------- | -------------------------------------------------------------- |
| `memanto.agentId`                | follows the CLI | Agent this window uses                                         |
| `memanto.server.mode`            | `private`       | Run a private server, or `attach` to one you run yourself      |
| `memanto.server.startOnStartup`  | `false`         | Start the server when the window opens instead of on first use |
| `memanto.server.address`         | follows the CLI | Address of your own server, in `attach` mode                   |
| `memanto.recallLimit`            | `10`            | How many memories a recall returns                             |
| `memanto.citeOnInsert`           | `true`          | Add a comment with type, provenance and date when inserting    |
| `memanto.export.memoriesPerType` | `200`           | How many memories of each type an export includes              |

## Sessions

Memanto keeps [one session per agent](/guides/session-management), and starting a new one signs out every other client using that agent, including the CLI and your coding agents. The extension reuses the agent's current session and only starts one when the agent has none, so your terminal and your coding agents stay signed in while you work.

## Privacy

* The extension connects only to a Memanto server on `127.0.0.1`.
* Your API key is read from `~/.memanto/.env`. It is never written to your workspace or settings, and never reaches the sidebar's webview.
* Nothing is sent to Memanto unless you ask: what you type into the chat, and text you choose to remember.

With the cloud backend your memories are stored by Moorcheh. With [on-prem](/on-prem/overview), nothing leaves your machine.

## Next Steps

* [Marketplace listing](https://marketplace.visualstudio.com/items?itemName=moorcheh.memanto)
* [Source on GitHub](https://github.com/moorcheh-ai/vscode-memanto)
* [GitHub Copilot integration](/integrations/github-copilot)
* [Memory Types Reference](/reference/memory-types)
