sardis-crewai
CrewAI integration for Sardis -- the Payment OS for the Agent Economy.
Build multi-agent financial workflows where AI agents can make real payments, enforce spending policies, and maintain audit trails through the Sardis platform.
Installation
pip install sardis-crewai
Quick Start
Using Individual Tools
from sardis import SardisClient
from sardis_crewai import SardisPayTool, SardisCheckBalanceTool
client = SardisClient(api_key="sk_test_...")
wallet = client.wallets.create(name="my-agent", chain="base", policy="Max $100/day")
# Create tools
pay = SardisPayTool(client=client, wallet_id=wallet.wallet_id)
balance = SardisCheckBalanceTool(client=client, wallet_id=wallet.wallet_id)
# Use with any CrewAI agent
from crewai import Agent
agent = Agent(
role="Buyer",
goal="Purchase API credits",
backstory="You buy software for the team.",
tools=[pay, balance],
)
Using Pre-configured Agents
from sardis import SardisClient
from sardis_crewai import create_finance_agent, create_audit_agent
from sardis_crewai import create_payment_task, create_audit_task
from crewai import Crew
client = SardisClient(api_key="sk_test_...")
wallet = client.wallets.create(name="finance-bot", chain="base")
# Create agents with sensible defaults
finance = create_finance_agent(client=client, wallet_id=wallet.wallet_id)
auditor = create_audit_agent(client=client, wallet_id=wallet.wallet_id)
# Create tasks
pay_task = create_payment_task(
agent=finance,
recipient="openai.com",
amount="25.00",
purpose="Monthly API credits",
)
audit_task = create_audit_task(agent=auditor)
# Run the crew
crew = Crew(agents=[finance, auditor], tasks=[pay_task, audit_task])
result = crew.kickoff()
Multi-Agent Team with Group Budgets
from sardis import SardisClient
from sardis_crewai import (
create_procurement_agent,
create_audit_agent,
create_bulk_payment_task,
create_budget_review_task,
)
from crewai import Crew
client = SardisClient(api_key="sk_test_...")
# Create a shared group budget
group = client.groups.create(
name="engineering",
budget={"per_transaction": "200", "daily": "1000", "monthly": "30000"},
)
# Create wallets attached to the group
buyer_wallet = client.wallets.create(
name="buyer", chain="base", group_id=group.group_id,
)
auditor_wallet = client.wallets.create(
name="auditor", chain="base", group_id=group.group_id,
)
# Create agents
buyer = create_procurement_agent(
client=client, wallet_id=buyer_wallet.wallet_id, group_id=group.group_id,
)
auditor = create_audit_agent(
client=client, wallet_id=auditor_wallet.wallet_id, group_id=group.group_id,
)
# Define tasks
purchase_task = create_bulk_payment_task(
agent=buyer,
payments=[
{"to": "openai.com", "amount": "30.00", "purpose": "API credits"},
{"to": "anthropic.com", "amount": "25.00", "purpose": "API credits"},
{"to": "github.com", "amount": "19.00", "purpose": "Copilot subscription"},
],
)
review_task = create_budget_review_task(agent=auditor, group_id=group.group_id)
crew = Crew(agents=[buyer, auditor], tasks=[purchase_task, review_task])
result = crew.kickoff()
Available Tools
| Tool | Description |
|---|---|
SardisPayTool |
Execute payments with policy enforcement and audit logging |
SardisCheckBalanceTool |
Check wallet balance, limits, and remaining budget |
SardisCheckPolicyTool |
Validate payments against policy without executing |
SardisSetPolicyTool |
Set spending policy from natural language description |
SardisGroupBudgetTool |
Check shared group budget status across agents |
Tool Factory
Use create_sardis_tools() to generate a tool set in one call:
from sardis_crewai import create_sardis_tools
# All tools (read + write)
tools = create_sardis_tools(client, wallet_id=wallet.wallet_id)
# Read-only tools (for audit agents)
tools = create_sardis_tools(client, wallet_id=wallet.wallet_id, read_only=True)
# With group budget monitoring
tools = create_sardis_tools(client, wallet_id=wallet.wallet_id, group_id="group_abc")
Pre-configured Agents
| Agent Factory | Role | Capabilities |
|---|---|---|
create_finance_agent() |
Finance Manager | Full payment + policy + audit |
create_procurement_agent() |
Procurement Specialist | Vendor payments + budget checks |
create_audit_agent() |
Financial Auditor | Read-only balance + policy checks |
All agent factories accept **agent_kwargs to override any crewai.Agent parameter.
Task Templates
| Task Factory | Purpose |
|---|---|
create_payment_task() |
Single payment with pre-checks |
create_bulk_payment_task() |
Batch payment execution |
create_budget_review_task() |
Group budget status report |
create_audit_task() |
Compliance audit of recent transactions |
create_policy_setup_task() |
Configure policy from natural language |
Simulation Mode
By default, Sardis runs in simulation mode -- all payments execute locally without real blockchain transactions. This is ideal for developing and testing CrewAI workflows:
# No API key needed for simulation
client = SardisClient()
wallet = client.wallets.create(name="test-agent", chain="base", initial_balance=1000)
To use production mode, provide a real API key and install sardis-sdk:
pip install sardis-sdk
client = SardisClient(api_key="sk_live_...")
Links
Metadata
Release files for sardis-crewai 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sardis_crewai-1.1.0.tar.gz | 9.2 kB | Without provenance | Details for sardis_crewai-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sardis_crewai-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for sardis_crewai-1.1.0-py3-none-any.whl |
Total release size: 13.2 kB
Release files / sardis_crewai-1.1.0.tar.gz
| Download URL | sardis_crewai-1.1.0.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18f75063ee38fd407316b6d5f576f08e75d97cd3aa5f7b50d86790e90480d5d6
|
|
BLAKE2b-256 checksum How to use checksums |
27d6c15e70a7cff697452e5f4e8a7ba3b4ce67617ddd8a768c51ec3f60b660e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / sardis_crewai-1.1.0-py3-none-any.whl
| Download URL | sardis_crewai-1.1.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbcde5ee1837374d0b6454ca13fea9ea9861563a89a9cc2e5bd00ebf14462e04
|
|
BLAKE2b-256 checksum How to use checksums |
1497bfea3729a4b01c2854d6a33cb513bbc1da18ec66fedb81c52d31ce5deb7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for sardis-crewai 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.