Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
integrations-claude-code: ${{ steps.filter.outputs.integrations-claude-code }}
integrations-cline: ${{ steps.filter.outputs.integrations-cline }}
integrations-codex: ${{ steps.filter.outputs.integrations-codex }}
integrations-github-copilot: ${{ steps.filter.outputs.integrations-github-copilot }}
integrations-continue: ${{ steps.filter.outputs.integrations-continue }}
integrations-cursor-cli: ${{ steps.filter.outputs.integrations-cursor-cli }}
integrations-crewai: ${{ steps.filter.outputs.integrations-crewai }}
Expand Down Expand Up @@ -142,6 +143,8 @@ jobs:
- 'hindsight-integrations/cline/**'
integrations-codex:
- 'hindsight-integrations/codex/**'
integrations-github-copilot:
- 'hindsight-integrations/github-copilot/**'
integrations-continue:
- 'hindsight-integrations/continue/**'
integrations-cursor-cli:
Expand Down Expand Up @@ -588,6 +591,45 @@ jobs:
working-directory: ./hindsight-integrations/cline
run: uv run pytest tests -v

test-github-copilot-integration:
needs: [detect-changes]
if: >-
(github.event_name == 'workflow_dispatch' ||
needs.detect-changes.outputs.integrations-github-copilot == 'true' ||
needs.detect-changes.outputs.ci == 'true')
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha || '' }}

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
prune-cache: false

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"

- name: Build github-copilot integration
working-directory: ./hindsight-integrations/github-copilot
run: uv build

- name: Install dependencies
working-directory: ./hindsight-integrations/github-copilot
run: uv sync --frozen

- name: Run tests
working-directory: ./hindsight-integrations/github-copilot
# PR CI runs only the deterministic bucket; the real-LLM E2E bucket
# (requires_real_llm) needs a live Hindsight server and runs separately.
run: uv run pytest tests -v -m "not requires_real_llm"

test-codex-integration:
needs: [detect-changes]
if: >-
Expand Down Expand Up @@ -4746,6 +4788,7 @@ jobs:
- test-claude-code-integration
- test-cursor-integration
- test-cline-integration
- test-github-copilot-integration
- test-codex-integration
- test-cursor-cli-integration
- build-ai-sdk-integration
Expand Down
1 change: 1 addition & 0 deletions hindsight-dev/hindsight_dev/generate_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class IntegrationMeta:
"claude-agent-sdk": IntegrationMeta("hindsight-claude-agent-sdk", "Claude Agent SDK"),
"llamaindex": IntegrationMeta("hindsight-llamaindex", "LlamaIndex"),
"codex": IntegrationMeta("hindsight-codex", "Codex"),
"github-copilot": IntegrationMeta("hindsight-copilot", "GitHub Copilot"),
"cline": IntegrationMeta("hindsight-cline", "Cline"),
"cursor-cli": IntegrationMeta("hindsight-cursor-cli", "Cursor CLI"),
"cursor": IntegrationMeta("hindsight-cursor", "Cursor"),
Expand Down
51 changes: 51 additions & 0 deletions hindsight-docs/docs-integrations/github-copilot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
sidebar_position: 39
title: "GitHub Copilot Persistent Memory with Hindsight | Integration"
description: "Add long-term memory to GitHub Copilot in VS Code with Hindsight via MCP. One command wires up the Hindsight MCP server plus a recall/retain rule."
---

# GitHub Copilot

Long-term memory for [GitHub Copilot](https://github.com/features/copilot) in VS Code, powered by [Hindsight](https://vectorize.io/hindsight). One command connects Copilot's agent mode to the Hindsight MCP server and adds a recall/retain rule — so Copilot recalls relevant memory at the start of a task and retains durable facts as it works.

## How It Works

VS Code Copilot supports two things this integration uses:

- **MCP servers** via `.vscode/mcp.json` (agent mode), including **HTTP servers** with headers — so the Hindsight MCP endpoint connects directly:

```json
{
"servers": {
"hindsight": {
"type": "http",
"url": "https://api.hindsight.vectorize.io/mcp/my-project/",
"headers": { "Authorization": "Bearer hsk_..." }
}
}
}
```

- **`.github/copilot-instructions.md`**, which Copilot applies to every chat in the workspace — that's where the recall/retain rule lives.

## Setup

```bash
pip install hindsight-copilot
cd your-project
hindsight-copilot init --api-token YOUR_HINDSIGHT_API_KEY --bank-id my-project
```

`init` merges the `servers` entry into `./.vscode/mcp.json` and writes the rule into `./.github/copilot-instructions.md`. Reload VS Code, open Copilot Chat in **agent mode**, and start the `hindsight` MCP server from the chat's tools menu.

Use a [Hindsight Cloud](https://hindsight.vectorize.io) key, or a self-hosted server with `--api-url http://localhost:8888` (no token needed for an open local server). If `mcp.json` has comments, `init` prints the snippet to paste instead — or run `hindsight-copilot init --print-only` anytime.

## Commands

| Command | Description |
| --- | --- |
| `hindsight-copilot init` | Add the MCP server + recall/retain rule |
| `hindsight-copilot status` | Show whether the server + rule are configured |
| `hindsight-copilot uninstall` | Remove the server + rule |

See the [package README](https://github.com/vectorize-io/hindsight/tree/main/hindsight-integrations/github-copilot) for full configuration options.
10 changes: 10 additions & 0 deletions hindsight-docs/src/data/integrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,16 @@
"link": "/sdks/integrations/codex",
"icon": "/img/icons/codex.svg"
},
{
"id": "github-copilot",
"name": "GitHub Copilot",
"description": "Long-term memory for GitHub Copilot in VS Code. One command wires the Hindsight MCP server into .vscode/mcp.json plus a recall/retain rule in .github/copilot-instructions.md.",
"type": "official",
"by": "hindsight",
"category": "tool",
"link": "/sdks/integrations/github-copilot",
"icon": "/img/icons/github-copilot.svg"
},
{
"id": "continue",
"name": "Continue",
Expand Down
1 change: 1 addition & 0 deletions hindsight-docs/static/img/icons/github-copilot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions hindsight-integrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Each integration lives in its own subdirectory with its own README, configuratio
| [**Codex CLI**](./codex) | Python hook scripts for OpenAI's Codex CLI. Auto-recall on `UserPromptSubmit`, auto-retain on `Stop`. | `curl -fsSL https://hindsight.vectorize.io/get-codex \| bash` |
| [**Cursor CLI**](./cursor-cli) | Python hook scripts for Cursor CLI. Auto-recall on `beforeSubmitPrompt`, auto-retain on `stop`, final flush on `sessionEnd`. | `./scripts/install.sh` |
| [**Continue.dev**](./continue) | HTTP context provider for precise `@hindsight` recall in chat, plus optional MCP-server + rules for automatic recall/retain in agent mode. | `pip install hindsight-continue` |
| [**GitHub Copilot**](./github-copilot) | MCP server config (`.vscode/mcp.json`) + a recall/retain rule for VS Code Copilot's agent mode. | `pip install hindsight-copilot` |
| [**Roo Code**](./roo-code) | Persistent memory for Roo Code VS Code extension. | See README |
| [**Hermes (OpenAI Agents SDK)**](./hermes) | Memory layer for OpenAI Agents SDK. | See README |
| [**Grok Build**](./grok-build) | Hooks for Grok Build (xAI). | See README |
Expand Down
76 changes: 76 additions & 0 deletions hindsight-integrations/github-copilot/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# hindsight-copilot

Long-term memory for **GitHub Copilot** in VS Code, powered by [Hindsight](https://github.com/vectorize-io/hindsight).

`hindsight-copilot init` wires the Hindsight **MCP server** into VS Code's
`.vscode/mcp.json` and adds a recall/retain rule to `.github/copilot-instructions.md`.
Copilot's agent mode then has `recall` / `retain` / `reflect` tools and — guided
by the rule — recalls relevant memory at the start of a task and retains durable
facts as it works.

## How it works

VS Code Copilot supports two things this integration uses:

- **MCP servers** in `.vscode/mcp.json` (agent mode), including **HTTP servers**
with headers — so the Hindsight MCP endpoint connects directly:

```json
{
"servers": {
"hindsight": {
"type": "http",
"url": "https://api.hindsight.vectorize.io/mcp/my-project/",
"headers": { "Authorization": "Bearer hsk_..." }
}
}
}
```

- **`.github/copilot-instructions.md`**, which Copilot applies to every chat in
the workspace — that's where the recall/retain rule lives.

## Install

```bash
pip install hindsight-copilot
cd your-project
hindsight-copilot init --api-token YOUR_HINDSIGHT_API_KEY --bank-id my-project
```

`init` merges the `servers` entry into `./.vscode/mcp.json` and writes the rule
into `./.github/copilot-instructions.md`. Reload VS Code, open Copilot Chat in
**agent mode**, and start the `hindsight` MCP server from the chat's tools menu.

Use a [Hindsight Cloud](https://hindsight.vectorize.io) key, or a self-hosted
server with `--api-url http://localhost:8888` (no token needed for an open local
server). If `mcp.json` has comments, `init` prints the snippet to paste instead
of touching the file — or run `hindsight-copilot init --print-only` anytime.

## Commands

| Command | Description |
| --- | --- |
| `hindsight-copilot init` | Add the MCP server + recall/retain rule |
| `hindsight-copilot status` | Show whether the server + rule are configured |
| `hindsight-copilot uninstall` | Remove the server + rule |

## Configuration

| Setting | Env var | Default |
| --- | --- | --- |
| API URL | `HINDSIGHT_API_URL` | `https://api.hindsight.vectorize.io` |
| API token | `HINDSIGHT_API_TOKEN` | _(none; required for Cloud)_ |
| Bank id | `HINDSIGHT_COPILOT_BANK_ID` | `copilot` |

## Development

```bash
uv sync
uv run pytest tests -v -m 'not requires_real_llm' # deterministic suite
uv run pytest tests -v -m requires_real_llm # gated MCP-endpoint check
```

## License

MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""Hindsight memory integration for GitHub Copilot (VS Code).

Wires the Hindsight MCP server into VS Code's ``.vscode/mcp.json`` and writes a
recall/retain rule into ``.github/copilot-instructions.md``, so Copilot's agent
mode has ``recall``/``retain``/``reflect`` tools and uses them automatically.

CLI::

hindsight-copilot init --api-token hsk_... --bank-id my-project
"""

__version__ = "0.1.0"
Loading
Loading