beav3r-sdk
Python SDK for Beav3r action requests, relay approvals, signer registration, and approval submission.
Install
From PyPI
python3 -m pip install beav3r-sdk
From source
cd beav3r-sdk-py
python3 -m pip install -e .
For direct source execution without installing the package, use PYTHONPATH=src.
Environment endpoints:
- Staging:
https://staging.server.beav3r.ai - Production:
https://server.beav3r.ai
Quick example
from beav3r_sdk import Beav3r
client = Beav3r(
base_url="https://staging.server.beav3r.ai",
agent_id="agent_demo_1",
api_key="bvr_test_...",
default_expiry_seconds=180,
)
result = client.guard(
{
"actionType": "transfer",
"payload": {"asset": "USDT", "amount": 5, "destination": "0xlowdemo"},
"attributes": {"asset": "USDT", "amount": 5, "destination": "0xlowdemo"},
}
)
print(result)
Execution authorization helpers
The SDK includes execution-gating helpers for fail-closed executors:
guard_and_wait(..., audience="your-executor")to attach a signed execution authorization artifact on approved/executed outcomesmint_execution_authorization({"actionId": "...", "audience": "..."})to mint directlyverify_execution_authorization(...)andis_valid_execution_authorization(...)to validate signature, expiry, audience, andactionHash
Where to get verification keys:
- Preferred: configure the execution-authorization private key on the Beav3r server, then fetch public keys from:
GET /.well-known/execution-authorization-keys
- Optional fallback: if discovery is unavailable, provide a static map like:
{"keyId":"BASE64_PUBLIC_KEY"}- Example env override (same format):
BEAV3R_EXECUTION_PUBLIC_KEYS={"keyId":"BASE64_PUBLIC_KEY"}
from beav3r_sdk import Beav3r, verify_execution_authorization
public_keys = {
# Prefer loading from GET /.well-known/execution-authorization-keys
"kid_1": "<base64-ed25519-public-key>",
}
result = client.guard_and_wait(
{"actionType": "payments.send_usdt", "payload": {...}, "attributes": {...}},
audience="payments-executor",
)
artifact = result.get("executionAuthorizationArtifact")
if artifact:
verify_execution_authorization(
{
"artifact": artifact,
"action": {
"actionId": "...",
"agentId": "...",
"actionType": "payments.send_usdt",
"payload": {...},
"attributes": {...},
"timestamp": 1700000000,
"nonce": "...",
"expiry": 1700000300,
},
"audience": "payments-executor",
"publicKeys": public_keys,
}
)
Demo
python3 examples/agent_demo.py high
python3 examples/agent_demo.py watch act_high_123
The demo looks for BEAV3R_ENV_FILE first, then nearby .env files in the SDK repo or sibling beav3r-server and beav3r-demo folders. If you use the signing flows, install PyNaCl so device signing works.
Compatibility note
As of the 2026-04-03 security hardening pass:
reject_approval(...)must sendsignatureandexpiry- device-scoped reads use signed query parameters for:
get_action_status_with_optionsget_action_with_optionslist_pending_actionslist_recent_actions
/actions/requestnow requires an API key withactions:relay/actions/{actionId}/execution-authorizationrequires an API key withactions:execute/actions/{actionId}/execution-authorization/redeemrequires an API key withactions:execute
verify_execution_authorization(...) also accepts an optional usedArtifactIds set so an executor can fail closed on replayed artifacts. For production executors, back that check with durable shared storage instead of process-local memory.
Typical enforced executor flow:
- call
guard_and_wait(...) - receive
executionAuthorizationArtifact - verify the artifact locally
- call
redeem_execution_authorization(...) - only execute if redemption succeeds
If the Beav3r server changes auth or approval-signing behavior again, review the sibling integrations in the shared ~/beav3r workspace before release.
Metadata
Release files for beav3r-sdk 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| beav3r_sdk-2.0.0.tar.gz | 21.4 kB | Without provenance | Details for beav3r_sdk-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| beav3r_sdk-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for beav3r_sdk-2.0.0-py3-none-any.whl |
Total release size: 36.0 kB
Release files / beav3r_sdk-2.0.0.tar.gz
| Download URL | beav3r_sdk-2.0.0.tar.gz |
|---|---|
| Size | 21.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
847b35ceed0953f279ad498c6f382dbd8aa6cdad40eb3e2457c08d26944a5576
|
|
BLAKE2b-256 checksum How to use checksums |
4f9b25fd26e81bb5afdd6ba3395118223f65657bff0ca70095bee324f9ab9eec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / beav3r_sdk-2.0.0-py3-none-any.whl
| Download URL | beav3r_sdk-2.0.0-py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76dc600c4c8ca92526f0f5c3a69576129a503ebba883a88ddc6354698872590e
|
|
BLAKE2b-256 checksum How to use checksums |
52e3916311be987182c9a90257a0dbdd967305d8b6e428baeb1eff583324b4f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for beav3r-sdk 2.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.