Skip to main content

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


Download files

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

Source Distribution

sardis_autogpt-1.1.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

sardis_autogpt-1.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file sardis_autogpt-1.1.0.tar.gz.

File metadata

  • Download URL: sardis_autogpt-1.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sardis_autogpt-1.1.0.tar.gz
Algorithm Hash digest
SHA256 43a6e4ad570551ebce79f9c5ad2ad367a7a25c940c3fa0202e4900e90bd66a3d
MD5 5958fd3bb589bfabe8abc85ed0a98a77
BLAKE2b-256 039624b9e77155fe4ef8f7d2a7b58f89e500b2c1acf585c2a7e106d79875c4ae

See more details on using hashes here.

File details

Details for the file sardis_autogpt-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: sardis_autogpt-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sardis_autogpt-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 37e06b9a91a0344ee78ad3f630dd9a79af2296a50d24e12814dd055a73205c9a
MD5 7af15fd9baa1af28473cec90448e09ac
BLAKE2b-256 a9fe649f92ac9586b45d67c889111e00775354398d5febf44f8d78b1ebfd4f0d

See more details on using hashes here.

Supported by

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