Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions tools/sardis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Sardis Payment Tools for Google ADK

Policy-controlled payments for AI agents built with [Google Agent Development Kit](https://google.github.io/adk-docs/).

## Installation

```bash
pip install sardis-adk
```

## Setup

Set your environment variables:

```bash
export SARDIS_API_KEY="sk_..."
export SARDIS_WALLET_ID="wal_..."
```

## Usage

```python
from google.adk.agents import Agent
from tools.sardis import sardis_pay, sardis_check_balance, sardis_check_policy

agent = Agent(
model="gemini-2.0-flash",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The model name gemini-2.0-flash appears to be incorrect. The latest available model in this family is gemini-1.5-flash. Using an incorrect model name will cause an error when users run the example code. Please update it to a valid model name.

Suggested change
model="gemini-2.0-flash",
model="gemini-1.5-flash",

name="payment_agent",
description="An agent that can make policy-controlled payments",
tools=[sardis_pay, sardis_check_balance, sardis_check_policy],
)
```

## Available Tools

| Tool | Description |
|------|-------------|
| `sardis_pay` | Execute a payment with policy guardrails |
| `sardis_check_balance` | Check wallet balance and spending limits |
| `sardis_check_policy` | Pre-check if a payment would be allowed |

## Features

- **Policy guardrails** — spending limits, merchant restrictions, category rules
- **Non-custodial** — MPC wallets, no private keys stored
- **Multi-chain** — Base, Polygon, Ethereum, Arbitrum, Optimism
- **Stablecoin native** — USDC, USDT, EURC, PYUSD
- **Full audit trail** — append-only ledger for compliance

## Links

- [Sardis Documentation](https://sardis.sh/docs)
- [sardis-adk on PyPI](https://pypi.org/project/sardis-adk/)
- [GitHub](https://github.com/EfeDurmaz16/sardis)
15 changes: 15 additions & 0 deletions tools/sardis/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""Sardis payment tools for Google ADK agents."""

from sardis_adk.tools import (
sardis_pay,
sardis_check_balance,
sardis_check_policy,
SARDIS_TOOLS,
)

__all__ = [
"sardis_pay",
"sardis_check_balance",
"sardis_check_policy",
"SARDIS_TOOLS",
]
32 changes: 32 additions & 0 deletions tools/sardis/sardis_tool.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""Sardis payment tool for Google Agent Development Kit.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This file appears to be redundant as its content is nearly identical to tools/sardis/__init__.py. Both files export the same tools from sardis_adk.tools. This duplication increases maintenance overhead. It is recommended to consolidate the logic and docstring into tools/sardis/__init__.py and remove this file to maintain a single source of truth.


This tool enables ADK agents to make policy-controlled payments through
Sardis non-custodial MPC wallets.

Installation:
pip install sardis-adk

Usage:
from tools.sardis import sardis_pay, sardis_check_balance

# Use in an ADK agent
agent = Agent(
model="gemini-2.0-flash",
name="payment_agent",
tools=[sardis_pay, sardis_check_balance],
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The usage example in the docstring has a couple of issues:

  1. It's inconsistent with the exported tools and the README.md as it omits sardis_check_policy.
  2. The model name gemini-2.0-flash appears to be incorrect. It should likely be gemini-1.5-flash.

To avoid confusion and ensure the example is runnable, please update it.

Suggested change
from tools.sardis import sardis_pay, sardis_check_balance
# Use in an ADK agent
agent = Agent(
model="gemini-2.0-flash",
name="payment_agent",
tools=[sardis_pay, sardis_check_balance],
)
from tools.sardis import sardis_pay, sardis_check_balance, sardis_check_policy
# Use in an ADK agent
agent = Agent(
model="gemini-1.5-flash",
name="payment_agent",
tools=[sardis_pay, sardis_check_balance, sardis_check_policy],
)

"""

from sardis_adk.tools import (
sardis_pay,
sardis_check_balance,
sardis_check_policy,
SARDIS_TOOLS,
)

__all__ = [
"sardis_pay",
"sardis_check_balance",
"sardis_check_policy",
"SARDIS_TOOLS",
]