Skip to main content

vella-sdk

Python SDK for deterministic pre-execution adjudication and signed proof-bundle generation.

Install

pip install vella-sdk

From source (development)

python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
pip install -e ".[dev]"
pytest
ruff check .
mypy --strict vella/

Basic usage

from vella import govern

result = govern(
    intent="EXECUTE_CHANGE",
    evidence_mask=1,
)

print(result["decision"])    # ALLOWED | DENIED
print(result["reason_code"]) # reason code string

With proof bundle

from vella import govern

signing_key = open("./proof-signing.pem", "r", encoding="utf-8").read()

result = govern(
    intent="EXECUTE_CHANGE",
    evidence_mask=1,
    proof_signing_key=signing_key,
)

print(result["proof_bundle"]["kind"])  # vella_proof_bundle_v1

Custom policy evaluators

Applications that need an application-supplied policy can create an isolated evaluator through the public package API:

from vella import create_evaluator

policy = {
    "policyVersion": "generation-v1",
    "defaultScope": "generation",
    "evidenceBits": {"AUTHN": 1},
    "scopes": {
        "generation": {
            "allowUnknownIntents": False,
            "defaultRequiredMask": 1,
            "intents": {"GENERATION_CONTEXT": 1},
        }
    },
}

evaluator = create_evaluator(policy)
result = evaluator.evaluate(
    {
        "intent_id": "GENERATION_CONTEXT",
        "evidence_mask": 1,
        "authority_scope_id": "generation",
        "policy_version": "generation-v1",
    }
)

print(result["decision"])    # ALLOWED | DENIED
print(result["reason_code"]) # reason code string

The policy uses the same policyVersion, defaultScope, evidenceBits, and scopes shape as DEFAULT_POLICY. Each scope declares allowUnknownIntents, defaultRequiredMask, and an intents mapping from normalized intent names to required evidence masks.

create_evaluator(...) returns a policy-bound evaluator whose evaluate(...) method returns decision and reason_code. Missing inputs, unknown intents or scopes, insufficient evidence, policy-version mismatches, and unexpected evaluator errors all return DENIED.

Use govern(...) for the built-in default policy and the high-level response fields latency_us, proof_bundle, and proof_error. Custom evaluators perform deterministic policy adjudication only; they do not sign or persist proof bundles.

When to use this SDK

This SDK runs VELLA in-process inside your Python application. It is the right choice for agent tool-call hooks, CI/CD gating, edge compute, research notebooks, batch processing, and any context where microsecond-latency adjudication is needed without a separate service.

For enterprise service mesh, polyglot environments (Go, Java, .NET), Kubernetes admission control, or multi-tenant deployments, a different VELLA component (the runtime service or sidecar adapter) is the better fit. See the full deployment scope in the repository root.

API

  • govern(intent, evidence_mask, authority_scope=None, policy_version=None, proof_signing_key=None)
    • Returns a dict with decision, reason_code, latency_us, and optional proof_bundle/proof_error
  • create_evaluator(policy=None)
    • Returns a policy-bound evaluator with evaluate(input_dict), which returns decision and reason_code

Reference docs

See the root repository docs for full protocol details:

  • spec/icd.md
  • spec/schemas/proof.json
  • verify/

Download files

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

Source Distribution

vella_sdk-1.0.2.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

vella_sdk-1.0.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file vella_sdk-1.0.2.tar.gz.

File metadata

  • Download URL: vella_sdk-1.0.2.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vella_sdk-1.0.2.tar.gz
Algorithm Hash digest
SHA256 533907d12aea26a34e10e24f8049b44596095717843faaea3373b2aa774d6591
MD5 d3192b42ae3692c6a145fe15d8ee3546
BLAKE2b-256 3a917f2eb1f39201d9d7510f8593b12bfe70f16ef3017cfcca5bc5366614b201

See more details on using hashes here.

Provenance

The following attestation bundles were made for vella_sdk-1.0.2.tar.gz:

Publisher: publish.yml on vellacognitive/vella-substrate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vella_sdk-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: vella_sdk-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vella_sdk-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8dfa611a33ee90862a660310e78736cd25829099ee620026a0c6a4fb019be57f
MD5 050a05dac03b08c28a2d938fb5ef09a5
BLAKE2b-256 68711db5d59646c0f1302e0a4be52342be5fc83ac3367e5bd6e9647019e46b11

See more details on using hashes here.

Provenance

The following attestation bundles were made for vella_sdk-1.0.2-py3-none-any.whl:

Publisher: publish.yml on vellacognitive/vella-substrate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 files

1.0.1

2 files

Supported by

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