Python SDK for the Markovian Protocol: verifiable provenance for agent and model outputs. Commit, resolve, and trace, on a Bitcoin-anchored, ZK-verified chain.
Project description
markovian
Python SDK for the Markovian Protocol. Three primitives for verifiable provenance, on a Bitcoin-anchored chain:
- COMMIT — prove it existed. Commit any record, get an unforgeable, publicly verifiable proof.
- RESOLVE — prove it was right. Read the chain's ZK-proven regime state and verify it, no oracle.
- TRACE — prove where it came from. Walk a stamp's lineage across protocols.
Keyless to start. No account, no API key.
pip install markovian
First swing: COMMIT and verify, no setup
Write any JSON record to the chain. No wallet, no API key. The protocol mints an ephemeral committer and the stamp is free. The result is unforgeable, publicly verifiable, and Bitcoin-anchored.
from markovian import MarkovianClient
client = MarkovianClient()
proof = client.stamp({"event": "audit-2026"}) # no wallet, no key, free
print(proof["verify_url"]) # anyone can check it, no trust in you
Verification needs no trust in the API. The ZK circuit runs client-side against a Merkle root:
result = client.verify(proof["merkle_root"], local=True)
print(result["verified"], result.get("local_zk_verified"))
RESOLVE: read the chain's verdict, not a price feed
Each block is a Markov state transition with a BN128 zero-knowledge proof verified on-chain, so the regime classification (ACCUMULATION, MARKUP, or DISTRIBUTION) is reproducible and cannot be forged by any single party. No external feed to manipulate.
# Latest ZK-proven regime snapshot for liquid tickers
for r in client.latest():
print(f"{r.ticker:<6} {r.regime:<14} {r.confidence*100:.1f}%")
# QQQ DISTRIBUTION 61.3%
# SPY DISTRIBUTION 67.8%
# GLD DISTRIBUTION 99.0%
history = client.regime("QQQ", days=90) # one ticker, over time
snap = client.batch(["SPY", "QQQ", "GLD", "TLT"])
From the command line:
markovian latest
markovian regime QQQ 90
markovian tip
TRACE: lineage across protocols
A stamp can reference another stamp, with the reference bound inside the committed bytes, so commitments and resolutions form one Bitcoin-anchored provenance graph. The SDK supports lineage directly: pass derived_from to stamp() to bind a record to its parents, and the edge is committed in-band. TRACE then walks the resulting graph and verifies every node and edge. Provenance, not truth: it returns a map, not a verdict.
parent = client.stamp({"claim": "QQQ DISTRIBUTION at close"})
child = client.stamp({"verdict": "PASS"}, derived_from=[parent]) # pass the prior stamp record
See the TRACE docs.
Why it exists
Software increasingly acts on outputs no one can independently check: a model's classification, an agent's action, a settlement value. Markovian is a verification standard for those outputs. A producer commits a result, proves it was computed correctly, and traces where it came from, and any third party verifies all three with no trust in the producer.
Correctness is reproducible from s_N = M^N x s, where M is the protocol-published transition matrix and s derives deterministically from the previous block hash, with a ZK proof verified on-chain. It is a property anyone can recompute, not a claim to be believed.
Oracle manipulation is the sharpest example of what breaks without this. More than $400M has been lost to it since 2022, and every exploit shared one root cause: an external feed that could be skewed. A value derived by verifiable computation, rather than fed, removes that attack surface. It is one application of the standard, not the whole of it.
Trust becomes a commons, not a toll: verification is emitted by the chain, available to any party without account, fee, or permission.
Tiers
| Tier | Access | Key |
|---|---|---|
| Free | Keyless COMMIT + verify, liquid tickers, 90-day window | None |
| Pro | All tickers, full history, CSV export | Required |
| Enterprise | All of Pro, plus inline ZK proofs | Required |
Keys are issued at markovianprotocol.com.
API surface
stamp(data, wallet=None, derived_from=None)— COMMIT a record (frictionless: no wallet needed); passderived_fromto bind lineage for TRACEverify(merkle_root, local)— verify a proof against the registry, optionally re-running the ZK circuit locallyfaucet(wallet)— claim test MKVlatest()— current regime snapshot for liquid tickersregime(ticker, days)— regime history for one tickerbatch(tickers)— snapshot across multiple tickerscatalog()— available tickers and coveragewatch(tickers, callback)— poll for regime transitionstip(),block(height),ledger()— chain primitives
Requirements
Python 3.8+, with requests, numpy, and py_ecc (installed automatically).
Links
- Protocol: https://markovianprotocol.com
- Build docs: https://markovianprotocol.com/build
- Explorer: https://chain.quantsynth.net
- Source: https://github.com/MarkovianProtocol/markovian-protocol
MIT licensed.
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
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 markovian-1.2.1.tar.gz.
File metadata
- Download URL: markovian-1.2.1.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50587045dbc47735e3322f1a2b50c3ffdfa06250e14bc0a3cf46f90b5a2aa313
|
|
| MD5 |
69c63d36d0fda46374f6ddaf904368c8
|
|
| BLAKE2b-256 |
9f4c0bd79bdc801773bdb851ab2e338f251bb49e15321268e64440beda630d69
|
File details
Details for the file markovian-1.2.1-py3-none-any.whl.
File metadata
- Download URL: markovian-1.2.1-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62fcb2b2570c14a2c52243b6b67f8ccdd108b27a16cf16a085644bf738afa7a1
|
|
| MD5 |
91060f00a387632f48761bfe53e63a19
|
|
| BLAKE2b-256 |
81d2e2675a485ec9bbcb9d736f00158a5602f7aa0bedc1c2158f4fcb27792aa7
|