ContextManager - AI Project Memory

Build a persistent project memory layer for Copilot. Curate knowledge cards, auto-capture project intelligence, search everything with BM25, run AI or template workflows, choose dedicated models for different features, and carry context across every session.

Get Started View on GitHub


The Problem

Every developer using AI assistants on real codebases hits the same wall:

You spend an hour exploring a large codebase with Copilot - mapping the authentication flow, tracing event propagation, discovering the undocumented service layer. You and the agent build up a rich, shared model of the project. Then the context window fills. Summarization kicks in. The agent forgets everything.

Next session, you explain the authentication flow again. And the session after that.

ContextManager was built specifically for this gap - persistent project memory that survives context window resets, session boundaries, and model switches.


Key Features

🧠 Knowledge Cards

Create, curate, and inject structured knowledge into every AI interaction. Architecture decisions, patterns, conventions - all searchable and auto-injected.

πŸ”¬ Project Intelligence

Automatically captures conventions, tool hints, and working notes from all chat interactions. Learns continuously as you work.

πŸ’¬ Language Model Tools

5 tools available to every Copilot agent β€” search memory, open cards, save cards, edit cards, and organize folders without leaving chat.

πŸ” BM25 Search

Fast, ranked search across your entire project memory using SQLite FTS4 via WebAssembly. No native binaries needed.

πŸ“¬ Card Queue

Automatic staging buffer that captures AI responses and synthesizes high-quality knowledge card proposals.

⚑ Custom Workflows

Define reusable workflows with template variables, event triggers, AI or direct-template output actions, and a dedicated workflow model selector.

πŸ“Š Dashboard

Centralized management with 5 tabs: Intelligence, Knowledge, Sessions, Context, and Settings, including model routing, import/export, and multi-project session binding.

πŸ”— Works Everywhere

Project memory is available across Copilot Chat, background agents, cloud agents, and Codex through tool-based access and auto-injected context.


How It Works

graph TD
    A[You work with Copilot normally] --> B[Auto-Capture and Intelligence Layer]
    B --> C[Knowledge Cards grow as you work]
    C --> D[Every new session starts informed]

    style A fill:#1f6feb,stroke:#388bfd,color:#fff
    style B fill:#1158c7,stroke:#388bfd,color:#fff
    style C fill:#1f6feb,stroke:#388bfd,color:#fff
    style D fill:#238636,stroke:#3fb950,color:#fff

The AI never starts from scratch again. Each session builds on everything that came before it.


Where ContextManager Fits

There are four layers of AI guidance in VS Code. Each solves a different problem:

Layer Tool Character
Global Behavior .github/copilot-instructions.md Static, global, human-authored
Task Workflows *.prompt.md files Static, task-scoped, human-authored
Agent Capabilities SKILL.md files Static, capability-scoped, human-authored
Project Knowledge ContextManager ← Dynamic, per-project, AI-generated + human-curated

Layers 1–3 are author-first: you write them at setup time. Layer 4 is discover-first: knowledge accumulates dynamically as you and the AI work on the project.


Quick Start

1. Install the extension from VS Code Marketplace

2. Click πŸ“– in the Activity Bar β†’ Create a project

3. Chat with Copilot normally β€” ContextManager runs silently in the background

4. Once a week: open the Dashboard β†’ Knowledge tab β†’ Card Queue section β†’ click Distill into Cards to review captured knowledge

5. Every new session starts informed automatically β€” no special commands needed

Installation β†’


System Requirements

  • VS Code 1.100.0 or higher
  • GitHub Copilot - required for AI features (language model API)
  • Any programming language - optimized for TypeScript/JavaScript, C/C++, Python, C#

What’s New in v2.10.0

  • Dedicated model selectors β€” choose separate model families for background extraction, AI workflows, and AI card synthesis
  • Workflow expansion β€” combine AI-backed and template-only actions, event triggers, target-aware card updates, and skip-pattern suppression
  • Folder-aware card flows β€” #saveCard can list folders, create folders, and save directly into a named folder
  • Dashboard resilience β€” in-progress edits in the dashboard are protected from background refresh disruptions

See the full changelog for complete version history.