Skip to main content

Parmana

Every action stays within what your business allowed.

PyPI Python License

The official Python SDK for Parmana, the trust layer for every action.

Parmana checks every action, whether a person or a machine takes it, against the limits you set, then keeps proof of what happened, so you can verify it rather than trust it. An action routed through Parmana runs only when the policy bound to it, approved through policy governance, approves it, and a trusted person has signed an approval for that action (every action needs one, reads included; parmana.crypto.sign_approval), and each execution produces a signed Execution Trust Record that anyone with the public key can verify.

Why Parmana

Modern AI systems can:

  • Plan
  • Reason
  • Call tools
  • Invoke APIs
  • Execute business workflows

However, most AI systems cannot answer critical governance questions:

  • Who authorized this execution?
  • Which policy approved it?
  • Was the execution independently verified?
  • Has the record changed since it was written?
  • Is there cryptographic evidence of what occurred?

For actions routed through it, Parmana records the answers in signed evidence. An agent that calls a system with its own credentials, outside Parmana, is outside that record.

Installation

pip install parmana

Requirements

  • Python 3.10 or later
  • A running Parmana API server (for example http://localhost:3000) and an API key for it

Quick Start

from parmana import ParmanaClient

client = ParmanaClient(
    endpoint="http://localhost:3000",
    api_key="<your API key>",
)

print(client.version)  # the SDK version

Runtime Health

status = client.health()

print(status)

Execute a Business Transaction

from parmana import PolicyReference, create_business_transaction

transaction = create_business_transaction(
    principal_id="python-sdk",
    purpose="Quickstart demo",
    action="test:fixture-execute",
    target="vendor://payments",
    parameters={"amount": 1000, "currency": "USD"},
    policy=PolicyReference(
        name="payment-limit", version="1.0.0", schema_version="1.0.0"
    ),
    signals={
        "vendorVerified": True,
        "invoiceVerified": True,
        "paymentApproved": True,
        "sufficientFunds": True,
        "paymentAmount": 1000,
        "riskScore": 5,
        "vendorId": "vendor://payments",
    },
)

trust_record = client.execute(transaction)

print(trust_record.trust_record_id)

test:fixture-execute is a test only capability that works on a server started with NODE_ENV=test; see examples/quickstart/run.py for the full, tested example. A refused request raises an error instead of returning a record.

Verify an Execution

verification = client.verify(transaction.business_transaction_id)

print(verification.status)

Recheck a stored record

result = client.replay.replay(transaction.business_transaction_id)

print(result.verified)

Through the API, "replay" rechecks the stored Trust Record's hash and signature, the same kind of check as verify(). It does not execute anything again. See https://docs.parmanasystems.com/replay/overview.

Execution Lifecycle

Business Transaction
        |
        v
Policy decision (refused requests get a signed Refusal Record)
        |
        v
Signed authorization
        |
        v
Execution through the gateway
        |
        v
Execution Trust Record (signed)
        |
        v
Verification and Receipt

Python SDK

Method Description
health() Runtime health check
execute() Execute a Business Transaction
verify() Verify an execution
replay.replay() Recheck a stored Trust Record (hash and signature)
receipt.generate() Generate an execution receipt
latest_receipt() Read the latest receipt (1.3.0)
transaction() Retrieve a Business Transaction
trust_record() Retrieve an Execution Trust Record
validate_policy() Check a policy name and version can be loaded
refusal_record() Retrieve a Refusal Record
execution_intent() Retrieve an Execution Intent and its status
caller() Who the API key belongs to (1.3.0)
public_key() A signing public key, for offline checks (1.3.0)
propose_policy_change() Propose a policy change (1.3.0)
policy_changes() List policy changes for review (1.3.0)
approve_policy_change() Approve with a signed step up authorization (1.3.0)
reject_policy_change() Reject with a signed step up authorization (1.3.0)

parmana.crypto (install parmana[verify]) verifies Trust Records and Execution Intents with only the public key, and signs step up authorizations (sign_policy_change_step_up(), 1.3.0).

Each of these is also available under its own namespace (e.g. client.execution.execute(), client.verification.verify(), client.replay.replay()) for finer-grained access to that API's other operations, such as client.verification.get_latest() or client.transactions.list().

Documentation

License

Apache License 2.0. See LICENSE and NOTICE. This SDK is a client: it needs a Parmana server, which is licensed separately. Licensing inquiries: founder@parmanasystems.com


Parmana

Execution Trust Infrastructure for AI systems

Metadata

Release files for parmana 5.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parmana 5.0.0
File Size Uploaded Provenance Actions
parmana-5.0.0.tar.gz 105.7 kB Without provenance Details for parmana-5.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for parmana 5.0.0
File Interpreter ABI Platform Actions
parmana-5.0.0-py3-none-any.whl Python 3 none any Details for parmana-5.0.0-py3-none-any.whl

Total release size: 196.0 kB

Release files / parmana-5.0.0.tar.gz

Download URL parmana-5.0.0.tar.gz
Size 105.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9517cbc8cd64940543f806a4e6dc41f6bb0d244de15c249a5ee2185112d38e14
BLAKE2b-256 checksum
How to use checksums
8b885734b23365dd72ecf97c2abca18ba3f0fcd7b8435977e88641cbcecaf127
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / parmana-5.0.0-py3-none-any.whl

Download URL parmana-5.0.0-py3-none-any.whl
Size 90.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1fa8db1508a18331db46db405e62f7ad77a6275eb51d58364dc8b1bb692aea87
BLAKE2b-256 checksum
How to use checksums
fbcdb2d72c022cb93a60a2101a334ebc60446bbabe8f580099a1580d9c1c8db9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for parmana 5.0.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

5.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page