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.0.0.tar.gz (6.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.0.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sardis_openai_agents-1.0.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for sardis_openai_agents-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b73dc81ab91389a183b1f32ad3d9d34d35281b3b7205a08fa2710ee6a14787e5
MD5 c34e24340e666bdf81aaa8d92236414d
BLAKE2b-256 e4dbd66b4637ca03a7ff7247a00457952b7cacfdbba505aa1b33e6ad075df984

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sardis_openai_agents-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cc23c94eab5dc916c587eed357194912e0800377de7273249c71b348d07bbf4
MD5 18e55a6c151737a16f46aed8eb1a3f78
BLAKE2b-256 319ffd0a2daaef91afe8c4fe98eb909f6f5cd1d3f6b4c3c2d544c030c0e2782a

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