Cell+Flow protocol as a pure Python library — persistent memory, earned trust (IF/Karma), discovery, and Agent collaboration. Zero MCP dependency; cellflow-mcp is the MCP skin on top.
Project description
cellflow
Cell+Flow protocol as a pure Python library. Zero MCP dependency — no
server to start, no MCP host required. cellflow-mcp is the MCP
transport skin on top of this library (SPEC §10: transport-agnostic —
protocol capability = library; MCP is just one skin).
pip install cellflow
from cellflow import CellFlow
cf = CellFlow(storage_path="./my_data") # local SQLite, no server
cell = cf.cell_register(schema_type="agent.v1", genome={"name": "my agent"})
cf.flow_capture(topic="test", content="hello")
print(cf.calculate_if(cell["cell_id"])) # IF: earned trust, 0-100
Layout (mirrors the protocol)
| Module | What lives there |
|---|---|
cellflow.core |
cell_register / cell_get / export / import / lifecycle |
cellflow.flow |
flow_capture / flow_recall / flow_list / flow_delete |
cellflow.history |
hash-chain verify_history |
cellflow.trust |
calculate_if / karma (three hard gates + four weights) |
cellflow.discover |
discover_agents (exploration quota) / dht_announce |
cellflow.divide |
divide_create / divide_parallel / backflow_experience |
cellflow.comms |
send_flow / pull_inbox (endpoint-direct + DHT relay) |
cellflow.identity |
Ed25519 identity_create / identity_verify |
cellflow.task_market |
publish_task / accept_task / deliver_task |
cellflow.audit .penalty .witness |
anti-cheat machinery |
cellflow.shadow |
shadow Cells (passive infection + claim) |
cellflow.email_bridge .protocol_bridge |
email / A2A / MCP / HTTP → Flow |
cellflow.storage |
SQLite backend (injectable — see below) |
Deeper internals stay importable at cellflow.modules.* (e.g.
cellflow.modules.karma) — same modules, one physical copy.
Injectable storage (P2)
Default is local SQLite. Pass any object implementing the Storage
duck-type (read / write / append / delete / search / upsert):
cf = CellFlow(storage=MyCustomStorage())
Or migrate existing SPEC-shaped data losslessly:
cf.cell_import({"cells": [...], "flows": [...]}) # SPEC §1/§2 field layout
Relationship to cellflow-mcp
cellflow-mcp depends on this package and only adds the 56 @mcp.tool()
pass-throughs, the CLI, and the HTTP facade. All protocol behaviour —
IF/Karma math, hash chains, discovery ranking, bridges — lives here and is
identical through every transport.
MIT License · Python 3.10+ · SPEC is the authoritative source.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cellflow-0.8.0.tar.gz.
File metadata
- Download URL: cellflow-0.8.0.tar.gz
- Upload date:
- Size: 122.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2feb0b5e92e0ffecde3447e27a224ae93195877f4df716bce34eb06e9348711a
|
|
| MD5 |
387aed0d704308ead18242cbb190b286
|
|
| BLAKE2b-256 |
0104191bd4b6d8dbc8b11dc13588fffaa60802eafefb909cbfd770bb54594016
|
File details
Details for the file cellflow-0.8.0-py3-none-any.whl.
File metadata
- Download URL: cellflow-0.8.0-py3-none-any.whl
- Upload date:
- Size: 149.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0a22d762a897e43ca11765e5a2e69239836068f44fe5bb20172d9577027be4a
|
|
| MD5 |
ffa41eafca95fe9afff0ea3fe38cb7e5
|
|
| BLAKE2b-256 |
5036be30c909eb41c4091019648238947c9202d0b3fe2e81b20500bb02e36f98
|