byecontext

Persistent session memory for AI coding agents

github.com/byelogic/byecontext

The Problem

AI coding agents forget everything between sessions. You explain your architecture, debug a tricky issue, make a design decision — and the next session starts from zero. You end up re-explaining the same context over and over, burning tokens and patience.

How It Works

byecontext is an MCP (Model Context Protocol) server that gives your agent persistent memory. The agent stores chunks of knowledge — decisions, errors, solutions, architecture notes, file references — into PostgreSQL and Vespa. On the next session, it searches that memory — including vector similarity — to pull back relevant context.

The agent decides what to remember. You don't have to curate it. It stores the insight, not the raw output — why something worked, why it didn't, what the non-obvious constraint was.

Installation

# Clone and build
git clone https://github.com/byelogic/byecontext.git
cd byecontext
go build -o byecontext ./cmd/mcp/
cp byecontext /usr/local/bin/

# Start the infrastructure (PostgreSQL + Vespa + Ollama)
docker compose up -d

# Register with Claude Code
claude mcp add byecontext --scope user --transport stdio -- byecontext

MCP Tools

search

Search memory by keyword or project name. Call this at the start of every session to pull relevant context.

add_chunk

Store a piece of knowledge. Types: decision, error, solution, file_ref, architecture, blocker, next_step, summary.

add_failure

Record a failed approach so future sessions don't repeat the same mistake.

save_session / resume_session

Save a full session summary or resume a previous one. Structured handoff between sessions.

list_memories / read_memory / update_memory / delete_memory

CRUD operations for managing auto-memory files. Keep memory accurate — stale memory causes wrong decisions.

Architecture

Storage is PostgreSQL for structured data and Vespa for vector search — semantic similarity over your memory chunks. Both run locally. No network calls, no cloud accounts.

The MCP protocol means byecontext works with any agent that supports MCP — Claude Code today, whatever comes next tomorrow.