sardis-adk
Google Agent Development Kit (ADK) integration for Sardis -- the Payment OS for the Agent Economy.
Give your Google ADK agents the ability to make real payments, check balances, enforce spending policies, and review transaction history through Sardis.
Installation
pip install sardis-adk
Quick Start
Option 1: Pre-configured Agent
The fastest way to get a payment-capable agent:
from sardis_adk import create_sardis_agent
agent = create_sardis_agent(
api_key="sk_test_...",
wallet_id="wallet_abc123",
model="gemini-2.0-flash",
)
# Use with ADK runner
from google.adk.runners import InMemoryRunner
runner = InMemoryRunner(agent=agent)
Option 2: Toolkit (Bring Your Own Agent)
Add Sardis tools to any existing ADK agent:
from google.adk import Agent
from sardis_adk import SardisToolkit
toolkit = SardisToolkit(api_key="sk_test_...", wallet_id="wallet_abc123")
agent = Agent(
name="my_agent",
model="gemini-2.0-flash",
tools=toolkit.get_tools(),
instruction="You are a helpful assistant that can make payments.",
)
Option 3: Individual Tools
Use specific tools without the toolkit:
from sardis_adk.tools import sardis_pay, sardis_check_balance, configure
from sardis import SardisClient
client = SardisClient(api_key="sk_test_...")
wallet = client.wallets.create(name="my-agent", chain="base", policy="Max $100/day")
configure(client, wallet.id)
# Now use tools directly
result = sardis_pay(to="openai.com", amount="25.00", purpose="API credits")
print(result["success"]) # True
Available Tools
| Tool | Description |
|---|---|
sardis_pay |
Execute a payment with automatic policy enforcement |
sardis_check_balance |
Check wallet balance and spending limits |
sardis_check_policy |
Validate whether a payment would be allowed (dry-run) |
sardis_set_policy |
Set or update spending policy using natural language |
sardis_list_transactions |
View recent transaction history |
Tool Details
sardis_pay
sardis_pay(
to="openai.com", # Recipient address or merchant
amount="25.00", # Payment amount
token="USDC", # Token type (USDC, USDT, PYUSD, EURC)
purpose="API credits", # Reason for payment
)
# Returns: {"success": True, "tx_id": "tx_...", "balance_after": 975.0, ...}
sardis_check_balance
sardis_check_balance(token="USDC", chain="base")
# Returns: {"balance": 1000.0, "remaining": 900.0, "limit_per_tx": 100.0, ...}
sardis_check_policy
sardis_check_policy(to="openai.com", amount="25.00", token="USDC")
# Returns: {"allowed": True, "reason": "All policy checks passed", ...}
sardis_set_policy
sardis_set_policy(policy_text="Max $50 per transaction, daily limit $500")
# Returns: {"success": True, "limit_per_tx": 50.0, "limit_total": 500.0, ...}
sardis_list_transactions
sardis_list_transactions(limit=10)
# Returns: {"count": 3, "transactions": [{"tx_id": "tx_...", ...}, ...]}
Simulation Mode
By default, Sardis runs in simulation mode -- no real money moves and no API key is required. This is ideal for development and testing:
from sardis_adk import SardisToolkit
# Simulation mode (no real transactions)
toolkit = SardisToolkit(api_key="sk_test_demo", wallet_id="wallet_abc")
tools = toolkit.get_tools()
When you are ready for production, use a real API key and Sardis will execute on-chain transactions through non-custodial MPC wallets.
Combining with Other Tools
Sardis tools work alongside any other ADK tools:
from google.adk import Agent
from google.adk.tools import google_search
from sardis_adk import SardisToolkit
toolkit = SardisToolkit(api_key="sk_test_...", wallet_id="wallet_abc")
agent = Agent(
name="research_and_pay",
model="gemini-2.0-flash",
tools=[google_search, *toolkit.get_tools()],
instruction="Research products and make purchases when instructed.",
)
Requirements
- Python 3.11+
sardis >= 0.3google-adk >= 0.3
Links
Metadata
Release files for sardis-adk 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sardis_adk-1.0.0.tar.gz | 11.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sardis_adk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.2 kB
Release files / sardis_adk-1.0.0.tar.gz
| Download URL | sardis_adk-1.0.0.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5387988753b16a29e1f0cfe29c3ae3834d83360c9c4037d9beebc0a2e649c65d
|
|
BLAKE2b-256 checksum How to use checksums |
4b312b0292fc7ccf4bf20ba76b759100153ff67cf00a6b7e0d223292f49ec97f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / sardis_adk-1.0.0-py3-none-any.whl
| Download URL | sardis_adk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d6c0db528098ca744a95e0bf762322e13d83ea3833ad7c42900bd188996705a
|
|
BLAKE2b-256 checksum How to use checksums |
37f215b64f3bf1d8fb52e60c1ecd172de8ea32276187aea6823524b48d76fb69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|