View on GitHub
Browse the complete examples directory
Playground
Try Sardis in your browser
Quick Start Examples
Simple Payment
The simplest way to get started with Sardis - create a wallet and make a payment in 5 lines.examples/simple_payment.py
View Full Example
Framework Integrations
LangChain Payment Agent
AI agent that makes payments using Sardis + LangChain with spending policies. What it does:- Creates a Sardis wallet with spending policy
- Sets up LangChain tools (pay, check balance, check policy)
- Agent checks balance, validates policy, and executes payment
View Full Example
OpenAI Assistant with Wallet
OpenAI function calling agent with Sardis payment capabilities. Tools Available:sardis_pay- Execute USDC paymentsardis_check_balance- Check wallet balancesardis_check_policy- Validate spending policysardis_issue_card- Create virtual cardsardis_get_spending_summary- Spending analytics
View Full Example
Anthropic Claude Agent SDK
Claude agent with Sardis payment tools using the sardis-agent-sdk package. Three modes demonstrated:- Automated loop - Fully managed conversation with
run_agent_loop() - Manual loop - Full control over each turn
- Read-only observer - Auditor agent with balance checking only
View Full Example
CrewAI Procurement Team
Multi-agent procurement system with Sardis + CrewAI. Agents:- Vendor Researcher - Finds and compares vendors
- Procurement Agent - Executes purchases with Sardis wallet
- Spend Auditor - Reviews transactions for compliance
View Full Example
Gemini Shopping Agent
Google Gemini agent with Sardis payment capabilities using the ADK.View Full Example
Vercel AI SDK Chatbot
AI chatbot with Sardis payment tools using Vercel AI SDK.View Full Example
Advanced Use Cases
Agent-to-Agent Payments
Demonstrates how two AI agents can transact with each other using the Sardis payment protocol, with full policy enforcement. What it demonstrates:- Programmable wallets for AI agents
- Policy-enforced spending limits
- Agent-to-agent transactions
- Transaction logging and receipts
View Full Example
Budget Allocation System
Demonstrates all allocation strategies and key features of the budget allocation system. Strategies:- Fixed Allocation - Assign specific amounts to each agent
- Proportional Allocation - Distribute based on weights
- Performance-Based - Allocate based on ROI history
- Rollover - Carry over unused budget with bonus allocation
View Full Example
Alert Integration
Integrate Sardis transaction alerts with your monitoring system.View Full Example
Event Webhooks
Receive real-time notifications about wallet events, transactions, and policy violations.View Full Example
Gas Optimizer
Optimize transaction gas costs across multiple chains.View Full Example
More Examples
API Demo
Complete API usage examples
CrewAI Finance Team
Multi-agent financial operations
LangChain Agent
LangChain integration examples
OpenAI Agents
OpenAI agent payment workflows
Vercel AI Payment
TypeScript payment integration
Google ADK Agent
Google AI Development Kit integration
Running Examples Locally
Prerequisites
Set Environment Variables
Run Examples
Get Help
Discord Community
Ask questions and share your examples
GitHub Issues
Report bugs or request examples