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 optionalproof_bundle/proof_error
- Returns a dict with
create_evaluator(policy=None)- Returns a policy-bound evaluator with
evaluate(input_dict), which returnsdecisionandreason_code
- Returns a policy-bound evaluator with
Reference docs
See the root repository docs for full protocol details:
spec/icd.mdspec/schemas/proof.jsonverify/
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
533907d12aea26a34e10e24f8049b44596095717843faaea3373b2aa774d6591
|
|
| MD5 |
d3192b42ae3692c6a145fe15d8ee3546
|
|
| BLAKE2b-256 |
3a917f2eb1f39201d9d7510f8593b12bfe70f16ef3017cfcca5bc5366614b201
|
Provenance
The following attestation bundles were made for vella_sdk-1.0.2.tar.gz:
Publisher:
publish.yml on vellacognitive/vella-substrate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vella_sdk-1.0.2.tar.gz -
Subject digest:
533907d12aea26a34e10e24f8049b44596095717843faaea3373b2aa774d6591 - Sigstore transparency entry: 2139777363
- Sigstore integration time:
-
Permalink:
vellacognitive/vella-substrate@a43f71aed4b478f0101ef5d35a8667cf0312b9a6 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/vellacognitive
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a43f71aed4b478f0101ef5d35a8667cf0312b9a6 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dfa611a33ee90862a660310e78736cd25829099ee620026a0c6a4fb019be57f
|
|
| MD5 |
050a05dac03b08c28a2d938fb5ef09a5
|
|
| BLAKE2b-256 |
68711db5d59646c0f1302e0a4be52342be5fc83ac3367e5bd6e9647019e46b11
|
Provenance
The following attestation bundles were made for vella_sdk-1.0.2-py3-none-any.whl:
Publisher:
publish.yml on vellacognitive/vella-substrate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vella_sdk-1.0.2-py3-none-any.whl -
Subject digest:
8dfa611a33ee90862a660310e78736cd25829099ee620026a0c6a4fb019be57f - Sigstore transparency entry: 2139777388
- Sigstore integration time:
-
Permalink:
vellacognitive/vella-substrate@a43f71aed4b478f0101ef5d35a8667cf0312b9a6 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/vellacognitive
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a43f71aed4b478f0101ef5d35a8667cf0312b9a6 -
Trigger Event:
release
-
Statement type: