Skip to content

feat: add Sardis payment action provider#992

Open
EfeDurmaz16 wants to merge 2 commits into
coinbase:mainfrom
EfeDurmaz16:feat/sardis-action-provider
Open

feat: add Sardis payment action provider#992
EfeDurmaz16 wants to merge 2 commits into
coinbase:mainfrom
EfeDurmaz16:feat/sardis-action-provider

Conversation

@EfeDurmaz16
Copy link
Copy Markdown

Summary

  • Adds a new Sardis action provider enabling AI agents to make policy-controlled financial transactions
  • 5 actions: sardis_pay, sardis_check_balance, sardis_check_policy, sardis_set_policy, sardis_list_transactions
  • Supports EVM chains: Base, Polygon, Ethereum, Arbitrum, Optimism
  • Stablecoins: USDC, USDT, PYUSD, EURC
  • Uses raw HTTP calls to Sardis API (no external package dependency beyond requests)
  • Follows env var pattern (SARDIS_API_KEY, SARDIS_WALLET_ID) consistent with Twitter/SSH providers

What is Sardis?

Sardis is the Payment OS for the Agent Economy — infrastructure enabling AI agents to make real financial transactions safely through non-custodial MPC wallets with natural language spending policies.

Key features:

  • Policy-controlled payments: Natural language spending rules (e.g. "Max $50/tx, daily limit $500")
  • Non-custodial: MPC wallets — Sardis never holds private keys
  • Multi-chain: Base, Polygon, Ethereum, Arbitrum, Optimism
  • Audit trail: Append-only ledger for all transactions

Files

File Purpose
action_providers/sardis/__init__.py Package exports
action_providers/sardis/sardis_action_provider.py Main provider with 5 @create_action methods
action_providers/sardis/schemas.py Pydantic input schemas
action_providers/sardis/constants.py API URL, supported chains/tokens
action_providers/sardis/README.md Documentation
tests/action_providers/sardis/ 21 tests (init, schemas, actions, network support)
changelog.d/add-sardis-action-provider.feature.md Changelog entry

Test plan

  • All 21 unit tests pass (pytest tests/action_providers/sardis/ -v)
  • Ruff linting clean
  • Provider registered in __init__.py exports
  • CI pipeline passes

🤖 Generated with Claude Code

Add policy-controlled AI agent payment capabilities via Sardis Payment OS.
Includes 5 actions: pay, check_balance, check_policy, set_policy,
list_transactions. Supports Base, Polygon, Ethereum, Arbitrum, Optimism
with USDC/USDT/PYUSD/EURC stablecoins.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@EfeDurmaz16 EfeDurmaz16 requested a review from murrlincoln as a code owner March 8, 2026 12:22
@cb-heimdall
Copy link
Copy Markdown

cb-heimdall commented Mar 8, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@github-actions github-actions Bot added documentation Improvements or additions to documentation action provider New action provider python labels Mar 8, 2026
@EfeDurmaz16
Copy link
Copy Markdown
Author

Small maintenance update while this PR was stale:

  • merged current origin/main into the branch and resolved the Python action provider export conflict
  • kept the Sardis provider exports intact against the current sorted __all__ layout
  • hardened the Sardis action schemas with bounded recipient/purpose/policy inputs and decimal amount validation
  • stopped returning raw non-JSON HTTP response bodies from Sardis API errors, so server response text cannot leak back into agent output
  • added regression coverage for invalid amounts, bounded free-form fields, list limit validation, and non-JSON HTTP error bodies

Local verification:

  • uv run pytest tests/action_providers/sardis -q -> 26 passed
  • uv run ruff check coinbase_agentkit/action_providers/sardis tests/action_providers/sardis
  • uv run ruff format --check coinbase_agentkit/action_providers/sardis tests/action_providers/sardis
  • git diff --check

The PR is mergeable again from GitHub’s mergeability check. Heimdall still shows additional review required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action provider New action provider documentation Improvements or additions to documentation python

Development

Successfully merging this pull request may close these issues.

3 participants