The open authority layer + SDKs for AI-agent payments. Thin Python/TS clients, an MCP server, framework adapters (LangChain/CrewAI/Hermes/OpenClaw/…), and @sardis/reference — a pure policy simulator + AP2/TAP/x402 verifiers showing exactly how Sardis decides if an agent may spend. The hosted engine that moves money is private.
sardis is an early-stage TypeScript project in the AI payments / x402 ecosystem, focused on agent-payments, agentic-commerce, ai-agents, ap2. It currently has 7 GitHub stars and 0 forks, and sits alongside related tools like piprail, tdm-integration-kit, TDM-Agent-Integration-Kit, paysentry, blacktea, Sentinel.
The open-source financial authority layer for AI agents.
Mandates, deterministic policy, approvals, revocation, and audit evidence — enforced before any wallet, card, stablecoin, payment API, or x402 endpoint moves money.
Website · Docs · Playground · Discord
Sardis is the open-source financial authority layer for AI agents. It sits between an autonomous agent and any system that moves money — so every consequential financial action is checked against a signed mandate, deterministic policy, approval path, revocation state, and audit packet before it reaches a wallet, card, stablecoin, payment API, or x402 endpoint.
Sardis is not a card wrapper, a custodial wallet, or a rail-specific payment app. It is rail-agnostic governance: bring your own provider (Stripe, Lithic, Privy, Turnkey, Circle, your bank, x402 servers, your own custom adapter) and Sardis enforces the authority layer above them. The deeper thesis is that agents do not have a payments problem — they have a trust problem, and money is the sharpest version of it.
pip install sardis
from sardis import Sardis
client = Sardis(api_key="sk_live_...")
# Unified pay — auto-routes the cheapest chain
result = client.pay.execute(
to="0xabc...", # address, wallet ID, or merchant domain
amount="25.00",
currency="USDC",
)
print(result["tx_hash"])
npm install sardis
import { Sardis } from "sardis";
const sardis = new Sardis({ apiKey: process.env.SARDIS_API_KEY! });
const tx = await sardis.pay({
from: "wallet_abc",
to: "merchant_xyz",
amount: "25.00",
});
{
"mcpServers": {
"sardis": {
"command": "npx",
"args": ["-y", "@sardis/mcp-server"],
"env": { "SARDIS_API_KEY": "sk_live_..." }
}
}
}
Your agent now has a bounded financial surface — 50+ tools for wallets, holds, cards, approvals, policy checks, facility gates, and spending analytics — instead of unconstrained payment access.
| Mandates — Cryptographically signed authority records (AP2 Intent → Cart → Payment chain) verified before execution. | Policy firewall — Deterministic NL-to-policy compilation; per-tx, daily, monthly, vendor, and category limits enforced fail-closed. |
| Approvals & revocation — Step-up flows for high-risk actions; kill switch propagates within one decision cycle. | Provider-neutral adapters — One contract for cards, stablecoins, fiat APIs, x402, AP2, TAP, and simulator rails. Swap providers without rewriting policy. |
| Append-only audit ledger — Ed25519-signed attestation envelopes; every decision is reconstructable, every state transition is durable. | 15+ framework integrations — LangChain, CrewAI, OpenAI Agents, Claude Agent SDK, Google ADK, Mastra, Vercel AI SDK, LlamaIndex, A2A, MCP — same policy engine under all of them. |
Every financial action follows a single authority path. There is no alternative code path that bypasses policy checks.
AI AGENT (Claude / Cursor / LangChain / OpenAI / Mastra / ...)
│
│ MCP | Python SDK | TypeScript SDK
▼
┌────────────────────────────────────────────────┐
│ FinancialActionOrchestrator │ single entry point
└────────────────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────┐
│ PreExecutionPipeline │
│ • Mandate verification (AP2 / TAP) │
│ • Policy evaluation (deterministic) │
│ • Atomic spend tracking │
│ • Dedup / idempotency │
│ • Compliance gate (KYC / AML) │
│ • KYA trust scoring │
│ Fail-closed: any hook failure blocks the tx │
└────────────────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────┐
│ PROVIDER ADAPTER │
│ Cards / wallets / fiat / x402 / simulator │
└────────────────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────┐
│ APPEND-ONLY AUDIT LEDGER │
│ Ed25519-signed attestation envelopes │
└────────────────────────────────────────────────┘
Design principles: fail-closed by default · provider-neutral (no custodial lock-in) · audit everything (signed envelopes, not log lines).
Sardis v2 consolidates 30+ separate sardis-* packages into a small surface — one Python package, one TypeScript package, one MCP binary — with submodules and optional extras (the Stripe / OpenAI / Anthropic SDK pattern).
# Python — old
pip install sardis-core sardis-cli sardis-chain sardis-langchain ...
# Python — new
pip install sardis
pip install sardis[langchain,crewai,openai-agents]
# Old (legacy v1 — kept here only as a migration reference)
# from sardis_v2_core import Wallet
# from sardis_langchain import SardisToolkit
# New
from sardis import Sardis, AsyncSardis
from sardis.core import Wallet
from sardis.integrations.langchain import SardisToolkit
# TypeScript — codemod legacy imports
npx sardis-migrate
Legacy sardis-* packages on PyPI and npm remain published; pinned production deployments keep working. See packages/sardis/MIGRATION_NOTES.md for the full diff.
| Raw provider integration | Stripe / Coinbase / Lithic SDK | Sardis | |
|---|---|---|---|
| Mandate verification | DIY | None | Built-in (AP2 / TAP) |
| Deterministic policy firewall | DIY | None | Built-in, fail-closed |
| Approval / revocation flows | DIY | None | Built-in |
| Provider neutrality | One per integration | Locked to one provider | Rail-agnostic adapter contract |
| Append-only signed audit | DIY | Partial | Built-in, Ed25519 |
| Framework integrations | DIY | DIY | 15+ first-party |
| Custody | Up to you | Provider holds funds | Non-custodial; BYO provider |
| License | — | Proprietary | MIT (open core) |
Sardis does not replace your payment provider. It is the authority layer that sits above whichever providers you already use.
| Feature | Status |
|---|---|
| Spending policy engine | Implemented |
| AP2 mandate verification | Implemented |
| Provider adapter contract | Implemented |
| Policy attestation API (Ed25519) | Implemented |
| PreExecutionPipeline | Implemented |
| Hosted checkout | Pilot |
| ERC-8183 agentic job escrow | Pilot (1% fee cap, USDC-only) |
| x402 paid HTTP | Pilot |
| Card provider adapters | Pilot |
| Stablecoin provider adapters | Pilot |
| Multi-chain (Polygon, Arbitrum) | Experimental |
| UCP MCP transport | Experimental |
| FIDES trust graph | Experimental |
Implemented = code + tests in the public repo. Pilot = functional under conservative limits, active hardening. Experimental = code exists, not production-tested. See docs/packages.md for the package-level matrix.
Live roadmap: github.com/EfeDurmaz16/sardis/issues.
| Layer | Open source (this repo) | Hosted / commercial |
|---|---|---|
| Authority model | Mandates, policies, approvals, revocation, audit packets | Same semantics with managed org, RBAC, SSO, retention, support |
| Provider execution | Adapter interfaces, simulator, BYO credentials | Managed credential vault, webhook handling, alerts, routing |
| Developer surface | SDKs, MCP server, examples, protocol adapters | Hosted dashboard, approval inbox, compliance workflows, audit export |
Boundary detail: docs/oss/public-private-boundary.md.
Pull requests welcome. See .github/CONTRIBUTING.md. Quick path:
git clone https://github.com/EfeDurmaz16/sardis.git
cd sardis
pnpm run doctor && uv sync && pnpm install --frozen-lockfile
# Contributor gate
pnpm run check:contributor
# Start the reference API
uv run uvicorn --app-dir apps/api server.main:create_app --factory --port 8000
MIT. See docs/oss/public-private-boundary.md for the product boundary between this open-source repo and the hosted Sardis Cloud.
x402 (HTTP 402 Payment Required) SDK + MCP server: let any API charge for itself and any AI agent pay for itself, USDC & stablecoins across EVM, Solana & 8 more chain families, in a couple of lines. Backendless, no fee, self-custodial, paid straight to your wallet. TypeScript, MIT.
Developer integration tools for adding TDM payments to AI agents, apps, and workflows. CLI, MCP server, and copy-paste examples
Developer integration tools for adding TDM payments to AI agents, apps, and workflows. CLI, MCP server, and copy-paste examples
The missing control plane for AI agent payments. Observe, control, protect, and test agent spending across x402, ACP, AP2, and Visa TAP.
Spending controls for AI agents paying online. Policy-gated x402 payments with audit log.
Enterprise audit, compliance & budget enforcement layer for the x402 payment protocol
Lucid Agents Commerce SDK. Bootstrap AI agents in 60 seconds that can pay, sell, and participate in agentic commerce supply chains. Our protocol agnostic SDK provides CLI-generated templates and drop-in adapters for Hono, Express, Next.js, and TanStack, giving you instant access to crypto/fiat payment rails (AP2, A2A, x402, ERC8004).
Building blocks for Agentic payments (x402, MPP, AP2) for TypeScript, Rust, Go, Python, Ruby, PHP, Lua, Kotlin and Swift.
Building blocks for Agentic payments (x402, MPP, AP2) for TypeScript, Rust, Go, Python, Ruby, PHP, Lua, Kotlin and Swift.
Skills & plugins for agentic commerce : UCP, ACP, AP2, A2A, WebMCP, Magento 2, BigCommerce, WooCommerce
Trust infrastructure for million-agent economies on Solana - identity, reputation, and validation designed for continuous feedback at scale.
A chain-agnostic AI-native payment infrastructure, authz layer for x402