langchain-middleware-patterns

Installation
SKILL.md

LangChain Middleware Patterns (Python)

Overview

Tenant A sends a prompt: "Summarize this support ticket from alice@acme.com about her overdue invoice." The chain's caching middleware ran before the PII redaction middleware, so the raw prompt — email and all — became part of the cache key. Thirty seconds later Tenant B sends a semantically identical prompt (different tenant, different customer, same shape). Cache hits. Tenant B's user gets back a summary that names alice@acme.com and her overdue invoice. That is pain-catalog entry P24 in production, and it is a real class of incident — post-mortems read like "we added caching to cut cost, leaked a customer's PII to a different tenant within an hour."

The sibling failure modes:

Installs
1
GitHub Stars
2.8K
First Seen
13 days ago
langchain-middleware-patterns — jeremylongshore/tons-of-skills-marketplace