Introducing COMB: Lossless, Hash-Chained Memory for AI Agents
Zero dependencies. Pure Python stdlib. Every conversation preserved with cryptographic integrity.
AI agents forget everything. Every restart, every new session — gone. The conversation history that shaped decisions, the context that drove actions, the reasoning chains that led to breakthroughs. All of it, wiped.
We built COMB to fix that.
COMB (Chain-Ordered Memory Base) is a zero-dependency Python library that gives AI agents lossless, tamper-evident conversation memory. No databases to configure. No cloud services to pay for. No dependencies to manage. Just pure Python stdlib — import comb and go.
The Problem
Most agent memory solutions fall into one of two traps:
Lossy compression — They summarize, embed, or vectorize conversations, throwing away the original data. When you need the exact words from three weeks ago, they’re gone.
Dependency hell — They require Redis, Postgres, Pinecone, or some cloud vector store. Your lightweight agent now needs a database cluster.
COMB takes a different approach: keep everything, depend on nothing.
How It Works
COMB uses a honeycomb-structured storage model with SHA-256 hash chains. Every conversation turn is stored as a “cell” in a “comb” — a hash-linked chain where each cell references the previous one.
This gives you three things for free:
Tamper evidence — If anyone modifies a historical message, the hash chain breaks. You’ll know.
Lossless storage — Every message is preserved exactly as it was. No summarization, no lossy compression.
Zero dependencies — The entire library uses only Python’s standard library.
hashlib,json,pathlib. That’s it.
Quick Start
pip install comb-dbThen in your code:
from comb import CombMemory
memory = CombMemory("./agent-memory")
memory.store("user", "What's the status of Project Alpha?")
memory.store("assistant", "Project Alpha is 73% complete...")
# Later, retrieve everything — losslessly
history = memory.retrieve()
for cell in history:
print(f"{cell.role}: {cell.content}")
print(f" Hash: {cell.hash}")
print(f" Previous: {cell.prev_hash}")Every cell knows its lineage. Every chain is verifiable. Every conversation is permanent.
Why Hash Chains?
We borrowed the idea from blockchain, but stripped away everything we didn’t need. No consensus mechanism. No mining. No tokens. Just the core insight: cryptographic hash chains make data tamper-evident.
For AI agents, this matters more than you’d think. When an agent makes a decision based on historical context, you want to know that context hasn’t been silently modified. When you’re auditing agent behavior, you want the actual conversation — not a summary of a summary.
What’s Next
COMB v0.1.0 is live on PyPI today. It’s the foundation — the storage layer that makes everything else possible.
We’re building toward:
Semantic search over hash-chained memory
Multi-agent memory sharing with chain verification
Automatic memory compaction (lossy views backed by lossless source)
Integration with popular agent frameworks
Get Started
Install:
pip install comb-dbGitHub: github.com/amuzetnoM/comb
PyPI: pypi.org/project/comb-db
COMB is open source under MIT. We’d love your feedback, contributions, and ideas.
Built by Artifact Virtual — we’re building the infrastructure for autonomous AI systems. Follow along as we ship.

