Google Agent Development Kit (ADK) integration for Sardis
Project description
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
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_adk-0.1.0.tar.gz.
File metadata
- Download URL: sardis_adk-0.1.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64e3e96b2714b376297fe9a87eadf921de41d77fe48a7adfb2cb8f2e1482dff1
|
|
| MD5 |
73eed1fdea9073c865043ca247e47f8a
|
|
| BLAKE2b-256 |
06babe0d89443aa282026e76c7042814bf73d5ff99c724b45dcb9414ba37c664
|
File details
Details for the file sardis_adk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sardis_adk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.2 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 |
fc677b36ab3628d923d34cc8e0b16ea757786ad29a5611e4a5625efd856df466
|
|
| MD5 |
104cf5eafe019d870d8407ef6b8223ad
|
|
| BLAKE2b-256 |
7ca0b9960b19bf6f1273b671daf9e6668ede40f6887324d9f13fbc3f66d9a0ce
|