Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cellflow-0.6.0.tar.gz (112.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cellflow-0.6.0-py3-none-any.whl (137.5 kB view details)

Uploaded Python 3

File details

Details for the file cellflow-0.6.0.tar.gz.

File metadata

  • Download URL: cellflow-0.6.0.tar.gz
  • Upload date:
  • Size: 112.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for cellflow-0.6.0.tar.gz
Algorithm Hash digest
SHA256 9153cbc33f9a3566e0492f2e6eec7265c46b5ac3f4790b48e416b050902e7899
MD5 ef1010bc22a0300dd3c1781d32f4b082
BLAKE2b-256 02972e58809df7e52fd8b06b3c76053fb72d3ae3a322869c1affd4ebd0416cc6

See more details on using hashes here.

File details

Details for the file cellflow-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: cellflow-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 137.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for cellflow-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8fc36f237fe8e17f672bda41453b8c952bbdb2d66516c9be5748c138c999c67f
MD5 1c019483eb9893c9df76c4433afda267
BLAKE2b-256 bd292d332529919512df053139e302f44866da0348e340d32c32c3073ee216cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page