Sardis payment blocks for AutoGPT - policy-controlled AI agent payments
Project description
sardis-autogpt
Sardis payment blocks for AutoGPT (180k+ stars). Gives AutoGPT agents policy-controlled access to real financial transactions via non-custodial MPC wallets.
Install
pip install sardis-autogpt
Quickstart
from sardis_autogpt import SardisPayBlock, SardisPayBlockInput
# Execute a payment (uses SARDIS_API_KEY + SARDIS_WALLET_ID env vars)
input_data = SardisPayBlockInput(
amount=25.0,
merchant="acme-software",
purpose="Monthly SaaS subscription",
token="USDC",
)
for result in SardisPayBlock.run(input_data):
print(result.status) # APPROVED or BLOCKED
print(result.tx_id) # on-chain transaction ID
print(result.message)
Blocks
SardisPayBlock
Execute a policy-controlled stablecoin payment from a Sardis wallet.
| Input | Type | Description |
|---|---|---|
amount |
float | Payment amount in USD |
merchant |
str | Merchant or recipient identifier |
purpose |
str | Reason for payment (default: "Payment") |
token |
str | Token to use (default: "USDC") |
api_key |
str | Sardis API key (or SARDIS_API_KEY env var) |
wallet_id |
str | Wallet ID (or SARDIS_WALLET_ID env var) |
| Output | Type | Description |
|---|---|---|
status |
str | APPROVED, BLOCKED, or ERROR |
tx_id |
str | On-chain transaction ID |
message |
str | Human-readable status |
amount |
float | Actual amount processed |
SardisBalanceBlock
Check wallet balance and remaining spending limits.
| Output | Type | Description |
|---|---|---|
balance |
float | Current token balance |
remaining |
float | Remaining spending limit for period |
token |
str | Token type checked |
SardisPolicyCheckBlock
Dry-run policy check before executing a payment. Use this to guard against blocked transactions.
| Output | Type | Description |
|---|---|---|
allowed |
bool | Whether the payment would be approved |
reason |
str | Explanation |
Environment Variables
SARDIS_API_KEY=sk_... # Your Sardis API key
SARDIS_WALLET_ID=wallet_... # Agent wallet ID
AutoGPT Integration
Register all blocks via the BLOCKS registry:
from sardis_autogpt import BLOCKS
# BLOCKS = [SardisPayBlock, SardisBalanceBlock, SardisPolicyCheckBlock]
for block_cls in BLOCKS:
autogpt_registry.register(block_cls)
Links
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
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 sardis_autogpt-1.0.0.tar.gz.
File metadata
- Download URL: sardis_autogpt-1.0.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
453afde74980daa445e95548191e999f7a29ef552a9b13c0a9a639f8e3d1a178
|
|
| MD5 |
3f508d24b4a45b79b68bed01c1f8535a
|
|
| BLAKE2b-256 |
f9b45607e3ca439a27460ff305dd3bad81e5498c580a9e6f2ba1bf0689afdaef
|
File details
Details for the file sardis_autogpt-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sardis_autogpt-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a96073470c5639c7e1d94ab114dc223f8895fc9903f0484ac02761452bfe4a99
|
|
| MD5 |
332dab62bcc98f1197241f098e4329d8
|
|
| BLAKE2b-256 |
b90bf7ea4c75b13b42bb9c77a71a0056d0f583f64afa1bd39b5ae26b919bbd35
|