Skip to main content

Sardis payment tools for OpenAI Agents SDK

Project description

sardis-openai-agents

Sardis payment tools for the OpenAI Agents SDK. Gives your agents policy-controlled spending via non-custodial MPC wallets.

Install

# Core only (plain functions)
pip install sardis-openai-agents

# With OpenAI Agents SDK integration (@function_tool decorated)
pip install 'sardis-openai-agents[agents]'

Quickstart

from agents import Agent, Runner
from sardis_openai_agents import get_sardis_tools

agent = Agent(
    name="ProcurementAgent",
    instructions="You are a procurement agent. Check policy before paying.",
    tools=get_sardis_tools(),
)

Set env vars:

export SARDIS_API_KEY=sk_...
export SARDIS_WALLET_ID=wid_...

Or configure programmatically:

from sardis_openai_agents import configure
configure(api_key="sk_...", wallet_id="wid_...")

Tools

Tool Description
sardis_pay(amount, merchant, purpose) Execute a payment; blocked if policy denies
sardis_check_balance(token) Check wallet balance and remaining spend limit
sardis_check_policy(amount, merchant) Dry-run policy check without executing

Example

See examples/payment_agent.py for an interactive agent demo.

How It Works

Every payment is validated against the wallet's spending policy before execution. If a transaction would exceed daily limits or violate policy rules, it is blocked and the agent receives a clear explanation — no funds move.

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_openai_agents-1.1.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

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

sardis_openai_agents-1.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sardis_openai_agents-1.1.0.tar.gz
  • Upload date:
  • Size: 8.1 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_openai_agents-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c365317389482ed73f0fa06d38a65d4c23a741b6340192f000d20d8fc36b30b6
MD5 b7207ae3526ec460606f438d8e6c0e70
BLAKE2b-256 5c85659d3ebe2c7f30eb5b317e1d851c20e89f6b05e4109af14488dc35a0e328

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sardis_openai_agents-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 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_openai_agents-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae9960d51f212f35cc21f2604af728d914351d8f381990a632a5bd14ea7a037d
MD5 63d3b8b32629836449d3564703723d9a
BLAKE2b-256 311557046dd0bd14386fe4312aa67ba0f1f119ba2192ada1207fc86324a70420

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