zircote/subcog

22 stars · Last commit 2026-04-20

Persistent memory system for AI coding assistants. Captures decisions, learnings, and context from coding sessions. Features hybrid search (semantic + BM25), MCP server integration, SQLite persistence with knowledge graph, and proactive memory surfacing. Written in Rust.

README preview

# Subcog

[![CI](https://github.com/zircote/subcog/actions/workflows/ci.yml/badge.svg)](https://github.com/zircote/subcog/actions/workflows/ci.yml)
[![GitHub Release](https://img.shields.io/github/v/release/zircote/subcog?logo=github&logoColor=white)](https://github.com/zircote/subcog/releases)
[![Crates.io](https://img.shields.io/crates/v/subcog?logo=rust&logoColor=white)](https://crates.io/crates/subcog)
[![Rust Version](https://img.shields.io/badge/rust-1.88%2B-dea584?logo=rust&logoColor=white)](https://www.rust-lang.org/)
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
[![Clippy](https://img.shields.io/badge/linting-clippy-orange?logo=rust&logoColor=white)](https://github.com/rust-lang/rust-clippy)
[![cargo-deny](https://img.shields.io/badge/security-cargo--deny-blue?logo=rust&logoColor=white)](https://github.com/EmbarkStudios/cargo-deny)

A persistent memory system for AI coding assistants. Subcog captures decisions, learnings, and context from coding sessions and surfaces them when relevant.

![Subcog Prompt Library Workflow](docs/_assets/subcog-inforgraphic.png)

## Overview

Subcog delivers:

- **Single-binary distribution** (<100MB, <10ms cold start)
- **Three-layer storage architecture**: SQLite persistence, FTS5 indexing, usearch HNSW vectors

View full repository on GitHub →