Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added new Sardis payment action provider for policy-controlled AI agent payments. The provider supports payment execution, balance checking, policy validation, policy management with natural language rules, and transaction history across Base, Polygon, Ethereum, Arbitrum, and Optimism networks.
2 changes: 2 additions & 0 deletions python/coinbase-agentkit/coinbase_agentkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
nillion_action_provider,
onramp_action_provider,
pyth_action_provider,
sardis_action_provider,
ssh_action_provider,
superfluid_action_provider,
twitter_action_provider,
Expand Down Expand Up @@ -69,6 +70,7 @@
"nillion_action_provider",
"onramp_action_provider",
"pyth_action_provider",
"sardis_action_provider",
"ssh_action_provider",
"superfluid_action_provider",
"twitter_action_provider",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from .nillion.nillion_action_provider import NillionActionProvider, nillion_action_provider
from .onramp.onramp_action_provider import OnrampActionProvider, onramp_action_provider
from .pyth.pyth_action_provider import PythActionProvider, pyth_action_provider
from .sardis.sardis_action_provider import SardisActionProvider, sardis_action_provider
from .ssh.ssh_action_provider import SshActionProvider, ssh_action_provider
from .superfluid.superfluid_action_provider import (
SuperfluidActionProvider,
Expand Down Expand Up @@ -69,6 +70,8 @@
"onramp_action_provider",
"PythActionProvider",
"pyth_action_provider",
"SardisActionProvider",
"sardis_action_provider",
"SshActionProvider",
"ssh_action_provider",
"SuperfluidActionProvider",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Sardis Action Provider

The Sardis action provider enables AI agents to make **policy-controlled financial transactions** through [Sardis](https://sardis.sh) — the Payment OS for the Agent Economy.

## Features

- **Policy-Controlled Payments**: Every payment enforces spending rules automatically
- **Natural Language Policies**: Set limits like "Max $50 per transaction, daily limit $500"
- **Multi-Chain Support**: Base, Polygon, Ethereum, Arbitrum, Optimism
- **Stablecoin Payments**: USDC, USDT, PYUSD, EURC
- **Non-Custodial**: MPC wallets — Sardis never holds private keys

## Setup

1. Get an API key at [sardis.sh/dashboard](https://sardis.sh/dashboard)
2. Create a wallet and note the wallet ID
3. Set environment variables:

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

## Usage

```python
from coinbase_agentkit import AgentKit, AgentKitConfig, sardis_action_provider

# Add Sardis payments to your agent
agent_kit = AgentKit(AgentKitConfig(
# ... wallet config ...
action_providers=[sardis_action_provider()]
))
```

## Actions

| Action | Description |
|--------|-------------|
| `sardis_pay` | Execute a policy-controlled payment |
| `sardis_check_balance` | Check wallet balance and spending limits |
| `sardis_check_policy` | Dry-run policy validation (does NOT execute) |
| `sardis_set_policy` | Set spending policy with natural language |
| `sardis_list_transactions` | View transaction history |

## Supported Chains & Tokens

| Chain | Tokens |
|-------|--------|
| Base | USDC, EURC |
| Polygon | USDC, USDT, EURC |
| Ethereum | USDC, USDT, PYUSD, EURC |
| Arbitrum | USDC, USDT |
| Optimism | USDC, USDT |

## Links

- [Sardis Documentation](https://sardis.sh/docs)
- [API Reference](https://sardis.sh/docs/api)
- [GitHub](https://github.com/sardis-labs/sardis)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""Sardis payment action provider for policy-controlled AI agent payments."""

from .sardis_action_provider import SardisActionProvider, sardis_action_provider

__all__ = [
"SardisActionProvider",
"sardis_action_provider",
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""Constants for Sardis action provider."""

SARDIS_API_BASE_URL = "https://api.sardis.sh/api/v2"

SUPPORTED_TOKENS = ["USDC", "USDT", "PYUSD", "EURC"]

SUPPORTED_CHAINS = {
"base": {"chain_id": "8453", "tokens": ["USDC", "EURC"]},
"polygon": {"chain_id": "137", "tokens": ["USDC", "USDT", "EURC"]},
"ethereum": {"chain_id": "1", "tokens": ["USDC", "USDT", "PYUSD", "EURC"]},
"arbitrum": {"chain_id": "42161", "tokens": ["USDC", "USDT"]},
"optimism": {"chain_id": "10", "tokens": ["USDC", "USDT"]},
}
Loading