Python SDK for the Bouclier AI Agent Trust Layer
Project description
bouclier-sdk (Python)
Python client for the Bouclier AI Agent Trust Layer.
Install
pip install bouclier-sdk
# or
uv add bouclier-sdk
Quick Start
from bouclier_sdk import BouclierClient, Addresses, GrantScopeParams
# Read-only client (no private key)
client = BouclierClient(
rpc_url = "https://sepolia.base.org",
addresses = Addresses(
agent_registry = "0x...",
revocation_registry = "0x...",
spend_tracker = "0x...",
audit_logger = "0x...",
permission_vault = "0x...",
),
)
agent_id = client.get_agent_id("0xAgentWallet")
record = client.resolve_agent(agent_id)
scope = client.get_active_scope(agent_id)
spend = client.get_rolling_spend(agent_id) # 18-decimal USD
events = client.get_audit_trail(agent_id, limit=20)
# Write operations (requires private key)
client_rw = BouclierClient(
rpc_url = "https://sepolia.base.org",
addresses = addresses,
private_key = "0x...",
)
tx_hash = client_rw.grant_permission(GrantScopeParams(
agent_id = agent_id,
daily_spend_cap_usd = 1000 * 10**18, # $1,000/day
per_tx_spend_cap_usd = 100 * 10**18, # $100/tx
valid_for_days = 30,
allow_any_protocol = True,
allow_any_token = True,
))
Development
cd python-sdk
pip install -e ".[dev]"
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bouclier_sdk-0.1.0.tar.gz
(7.7 kB
view details)
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 bouclier_sdk-0.1.0.tar.gz.
File metadata
- Download URL: bouclier_sdk-0.1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
963b0c518b1ea2b28bc1e40cf57f0b3e8062049d60aeb6b1775f996800b2e1f2
|
|
| MD5 |
bd02700e4b015a186dd4b9ca9bb09413
|
|
| BLAKE2b-256 |
f5a0f948c993390c43af5b3cce36cccbf7cfeb4a5ccbda348b416305094beab7
|
File details
Details for the file bouclier_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bouclier_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b71195b8f5999e407bf7318f9e4af11848cb9f630c207c5fec7aae245bd23748
|
|
| MD5 |
087abf4534789cacb237fc2f2824b699
|
|
| BLAKE2b-256 |
797d88c8288d7dcc50cdadea5f15491ece663ef1045c14c0266127c55f2ee69f
|