KTP/
github ↗
created 24 August 2026 · last modified 2026-09-06
the protocol-level mvp · python sdk

KTP has running code.

The framework's first running code is kinetic-trust, a Python SDK by Robin Martherus. This page describes the private prototype from the April 26, 2026 source snapshot. The public specifications, reported implementation, independent verification, and deployment evidence have different statuses, shown below. The SDK adds context-aware authorization to existing identity systems such as JWTs, SAML, and OAuth.

version 0.1.0released 2026-04-19python 3.11+license Apache-2.0author Robin Martherusrepo private · release date unconfirmed

What you can verify

Specification

Public design

Continuously versioned RFCs

Read the RFCs and Blue Zone requirements to evaluate the proposed behavior.

Review specification

Prototype

Author-reported · private source

Source snapshot: April 26, 2026 · version 0.1.0

The examples below describe the private Python SDK. Installation requires repository access; the public release date is unconfirmed.

Review prototype

Independent conformance

No public verification report linked

Evidence inventory reviewed September 6, 2026

Level 1 describes the reported scope of this prototype. An independent test report with version, test conditions, and results is still needed.

Review independent conformance

Deployment

No production evidence linked

Evidence inventory reviewed September 6, 2026

This page does not document production governance, appeal, repair, or audit outcomes. Those are the requirements for an operational maturity claim.

Review deployment
positioning

KTP adds environment-aware, real-time trust evaluation on top of traditional identity. It doesn't replace JWTs, SAML, or OAuth — those remain essential for establishing who an agent or human is. KTP adds the next question: “given current environmental conditions, how much should we trust this identity right now?”

§01install

Install becomes available when the repo goes public. Code samples are illustrative until then.

from PyPI
bash
pip install kinetic-trust
from GitHub
bash
pip install git+https://github.com/martherus/kinetic-trust.git
from source (development)
bash
git clone https://github.com/martherus/kinetic-trust.git
cd kinetic-trust
uv venv .venv --python 3.11
source .venv/bin/activate
uv pip install -e ".[dev]"

§02the trust math

Two pieces govern every authorization the SDK makes. The Trust Equation computes effective trust right now from earned baseline and environmental risk. The Tier Ladder maps that number to an action surface. The Soul dimension sits beside both as a binary veto evaluated first; it is not a continuous variable and cannot be averaged away.

the equation, with a worked example
E_BASE75earned baseline×(1 − R)0.65R = 0.35 (Risk Factors)=E_TRUST48.75effective trust right nowenvironmental risk shrinks the earned baseline. E_trust is what the agent can actually do, right now.
trust tiers · what the SDK lets each agent do
TIER · MIN E_TRUSTMAX ACTION RISKgod modeE_trust ≥ 95100operatorE_trust ≥ 8585analystE_trust ≥ 7060observerE_trust < 7030
soul · binary veto, evaluated first

Soul is a binary veto evaluated before any continuous trust calculation. S = 0 means the action is structurally impossible; no E_trust value can override it. The dimension encodes Indigenous data sovereignty (TK Labels), OCAP and CARE principles, and community-controlled constraints. It is the place in the system where ethics is treated as physics.

S = 0 → silent veto, regardless of E_trust

The Zeroth Law is the comparison the SDK makes after the math: an action is permitted only when its risk A is at most the agent's E_trust.

§03what the sdk runs

Every authorize() call runs the same sequence. The diagram below is not a marketing pipeline — it is the actual order the engine evaluates: identity, Soul, Context Signals and Risk Factors, trust calculation, tier resolution, the Zeroth Law check, decision, audit.

authorization flow · what the SDK runs on every authorize() call
KTP authorization flowSequential authorization pipeline: agent identity and action request enter the Soul check; if S=1 the flow continues into Context Signals and Risk Factors; signals aggregate into a risk value R; E_trust is computed; the trust tier is resolved; the action risk is compared against E_trust; the decision is logged to the Flight Recorder.agent identity + action requestActionRisk + agent_idSoul checkbinary · S = 0 or S = 1S = 0silent vetoS = 1Context Signals → Risk Factors6 declared factors → aggregated risk Revidence densitytrust trendadversarial pressuremoment criticalityupdate resistanceattestation coverageTRUST CALCULATIONE_trust = E_base × (1 − R)tier resolutionhibernation · observer · analyst · operator · god modeA ≤ E_trustthe Zeroth Law checkalloweddeniedFlight Recorderhash-chained audit log

Underneath the flow are thirteen subsystems, grouped in four bands. Every band sits behind a stable interface; production-grade providers swap in without API churn.

Core
engine/

Core trust math. Pure functions, zero I/O.

models/

Pydantic v2 data models for risk factors, proofs, decisions.

interfaces/

Protocol/ABC contracts. Every subsystem is swappable through these.

Identity & Crypto
identity/

Vector Identity, trajectories, lineage, sponsorship.

crypto/

Ed25519/ECDSA signing, key management, Trust Proof JWT.

Runtime
sensors/

Context Signal collection and Risk Factor computation.

oracle/

Trust Oracle service, trust calculation.

enforce/

PEP, PDP, trust tiers, action risk, dormancy.

audit/

Flight Recorder with hash-chained integrity.

Distribution
transport/

REST server and client. gRPC and WebSocket via optional extras.

federation/

Cross-zone trust exchange, agreements, attestations.

contrib/

FastAPI / Starlette middleware. @ktp_authorize decorator.

testing/

Factories, mocks, pytest fixtures. Ships testing utilities.

§04rfc coverage

25/27
rfcs implemented
level 1

All 25 implementable RFCs land at Level 1 conformance — software crypto, in-memory storage. The remaining 2 (Threat-Model, Problems) are analysis documents whose mitigations are addressed across the other implementations. All interfaces are designed for Level 2 (HSM, threshold signatures, persistent flight recorder) via provider swapping. ConformanceChecker validates a deployment.

The full spec stack lives at /specs. The protocol's red lines that any implementation must hold are at /canon/limits.

§05integration patterns

Three ways the SDK lands in a Python codebase, in increasing order of how much existing structure it adopts.

01Direct API

Embed the SDK in any async Python codebase. Register sensors, register agents, authorize.

python
import asyncio
from kinetic_trust import KTP, ActionRisk, Lineage, Dimension, RiskDomain, StaticFeed

async def main():
    ktp = KTP()

    # Register environmental sensors
    for dim in [Dimension.MASS, Dimension.MOMENTUM, Dimension.HEAT,
                Dimension.TIME, Dimension.INERTIA, Dimension.OBSERVER]:
        ktp.sensors.register_feed(
            StaticFeed(feed_id=f"env-{dim.value}", dimension=dim,
                       value=0.2, risk_domain=RiskDomain.NODE)
        )

    # Register an agent
    ktp.oracle.register_agent(
        "agent:tethered::my-bot", Lineage.TETHERED, initial_e_base=75.0
    )

    # Authorize an action
    result = await ktp.authorize(
        agent_id="agent:tethered::my-bot",
        action=ActionRisk(action_type="read_public", base_risk=10),
    )
    print(f"Decision: {result.decision}")  # allowed
    print(f"E_trust: {result.e_trust}")

asyncio.run(main())

02FastAPI / Starlette middleware

Drop in as ASGI middleware. Authorize every request against the configured action and risk.

python
from kinetic_trust import KTP
from kinetic_trust.contrib.fastapi import KTPMiddleware

ktp = KTP()
# ... register sensors and agents ...

app.add_middleware(
    KTPMiddleware,
    ktp=ktp,
    action_type="read_public",
    base_risk=10,
    exclude_paths=["/health"],
)

03Decorator

Wrap any async function. The decorator authorizes before the body runs.

python
from kinetic_trust.contrib.decorators import ktp_authorize

@ktp_authorize(ktp, action_type="write_modify", base_risk=50)
async def update_record(agent_id: str, data: dict) -> dict:
    return {"updated": True}

§06cli

Three commands ship in the SDK for inspecting trust math without running the full engine.

Trust computation. E_trust = E_base × (1 − R).

bash
$ kinetic-trust compute --e-base 72 --risk 0.35
{"e_base": 72.0, "risk": 0.35, "e_trust": 46.8}

Action-risk lookup by canonical action type.

bash
$ kinetic-trust risk read_public
{"action_type": "read_public", "base_risk": 10}

Tier resolution from a given E_trust.

bash
$ kinetic-trust tier --e-trust 85
{"e_trust": 85.0, "tier": "operator"}

§07component swap · l1 → l2

Every subsystem sits behind an interface. Production-grade providers swap in without API churn. The example below trades software signing for AWS HSM and the in-memory recorder for Postgres.

python
from kinetic_trust import KTP
from my_infra import AwsHsmCryptoProvider, PostgresFlightRecorder

ktp = KTP(
    crypto=AwsHsmCryptoProvider(key_arn="arn:aws:kms:..."),
    audit=PostgresFlightRecorder(dsn="postgresql://..."),
)

§08honest scope

where it is

The April 26, 2026 source snapshot describes Level 1 conformance with software cryptography and in-memory storage. This is an author-reported prototype capability; this site does not provide an independent conformance report or production deployment evidence.

where it goes

Planned Level 2 work includes HSM signing, threshold signatures, a persistent Flight Recorder, and production federation. The provider interfaces are intended to support this work; completion is not established here.

the bar

A second independent implementation is still the bar for protocol-grade.

§09attribution

author

Robin Martherus @martherus

Tamed Autonomy is the application surface; kinetic-trust is the protocol-level SDK. Both are early; neither is the framework itself. The framework's claims about the SDK live at /canon/claims.

collaborators
  • Claude Code (Anthropic)Pair-programmed
  • CodexRFC compliance review
see alsoYou're implementing against the Constitution ↗; deployments live inside Blue Zones ↗. Full documentation: API Reference ↗ and the Developer Guide ↗.
How to cite
APA 7th ed.

Perkins, C. (2026, May 6). KTP has running code. Kinetic Trust Protocol. https://kinetic-trust-protocol.net/implement
Plain text

Chris Perkins, "KTP has running code," Kinetic Trust Protocol, https://kinetic-trust-protocol.net/implement.
full specification
docs/implement/index.md
Read the Implement overview →GitHub ↗