hummbl-clp
CLP: Cognitive Ledger Protocol — Shared memory and knowledge compilation engine for multi-agent coordination.
Overview
The Cognitive Ledger Protocol (CLP) provides cryptographically verifiable, queryable shared memory for AI agent fleets. Agents append structured observations, decisions, hypotheses, and learnings to an append-only JSONL ledger.
- Zero Runtime Dependencies: Core ledger, query engine, schema validation, and BM25 indexer are 100% Python standard library (
json,hashlib,math,dataclasses,pathlib). - Cryptographic Provenance: Every entry computes a deterministic SHA-256 content hash with optional HMAC signing for federation.
- Relational Memory Graphs: Native Zettelkasten-style relational links (
linksfield) connect observations, decisions, and outcomes. - Multi-Pool Search: BM25 inverted index ranking across memory pools.
- Optimistic Concurrency: Version-tracked shared state management with optimistic locking.
Installation
pip install hummbl-clp
For optional bus integration:
pip install "hummbl-clp[bus]"
Quick Start
1. Appending to the Ledger
from hummbl_clp.core.models import LedgerEntry, LedgerScope
from hummbl_clp.core.ledger_writer import post_entry
# Append a verified observation
entry = post_entry(
agent="my-agent",
scope=LedgerScope.SESSION,
title="Service Architecture Verification",
content="All 131 tests verified green in sealed virtual environment.",
tags=["audit", "verification", "milestone"],
path="my_ledger.jsonl",
allow_unsigned=True, # Set to False when CL_SIGNING_SECRET is configured
)
print(f"Recorded entry {entry.id}")
print(f"Content SHA-256: {entry.content_hash}")
2. Querying Entries
from hummbl_clp.core.query import query_entries
# Query entries by agent and tags
results = query_entries(
path="my_ledger.jsonl",
agent="my-agent",
tags=["verification"],
)
for item in results:
print(f"[{item.timestamp}] {item.title}: {item.content}")
Architecture & Modules
src/hummbl_clp/
├── core/
│ ├── models.py # LedgerEntry, SharedState, and type schemas
│ ├── ledger_writer.py # Append-only JSONL with SHA-256 hashing & flock locking
│ ├── query.py # Query engine (by agent, scope, tags, time range)
│ ├── indexer.py # BM25 inverted term index (stdlib-only)
│ ├── state_manager.py # Concurrency-controlled shared state
│ ├── schema_validator.py # Draft 2020-12 JSON Schema validation subset
│ └── working_memory.py # Ephemeral session-scoped working memory
└── extensions/
├── retriever.py # Multi-pool memory retrieval interface
└── memory_pools.py # Pluggable memory storage adapters
Running Tests
The test suite runs with standard pytest or Python stdlib unittest:
# Clone the repository
git clone https://github.com/hummbl-io/hummbl-clp.git
cd hummbl-clp
# Install test dependencies
pip install pytest
# Run tests
pytest tests/ -v
All 131 unit and security tests pass with 0 external dependencies on the core library.
License
This project is licensed under the MIT License.
Metadata
Release files for hummbl-clp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| hummbl_clp-0.1.1.tar.gz | 94.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hummbl_clp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 191.4 kB
Release files / hummbl_clp-0.1.1.tar.gz
| Download URL | hummbl_clp-0.1.1.tar.gz |
|---|---|
| Size | 94.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4232081839f74b9254c9305ad66103b2be8f96db562d311f79d0f7007cb245b5
|
|
BLAKE2b-256 checksum How to use checksums |
124d981ec4d78d318ffc2f44557925848ca3bccba6c37fe5c4f4cd1c5b357f76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logRelease files / hummbl_clp-0.1.1-py3-none-any.whl
| Download URL | hummbl_clp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 96.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9849810fd4e46a5fcd3ea1abf27dd495264baab2346eb77f39a36e0585b44ac9
|
|
BLAKE2b-256 checksum How to use checksums |
ce95394b64b1204ba9fe1a942e5e683608e9e5acaecba4feb41a1e08cb8ad4ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logSecurity for hummbl-clp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for hummbl_clp-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.