skalor-sdk
Fiduciary Control Plane for AI Agents — Python SDK
SKALOR lets AI developers wrap every paid API call with a fiduciary authorization check. Before your agent spends money at OpenAI, X.com, or any vendor, the control plane validates spending limits, kill switches, and shadow mandates.
Install
pip install skalor-sdk
Or install from source:
cd sdk
pip install -e .
Quick Start
from skalor import Client, SkalorPaymentError
# Initialize with your API key (from dashboard → API Keys)
zc = Client(api_key="sk_live_abc123...")
# Before calling a paid API, authorize the spend
try:
approval = zc.authorize_spend(
amount=0.03, # USD
merchant="OpenAI", # Who you're paying
memo="GPT-4 call", # Optional audit trail
)
print(f"Approved! tx={approval.transaction_id}")
print(f"Remaining budget: ${approval.remaining_daily_limit}")
# Now safe to call OpenAI
# response = openai.chat.completions.create(...)
except SkalorPaymentError as e:
# Control plane said NO — don't make the call
print(f"Blocked: {e.reason}")
# e.reason is one of: AGENT_INACTIVE, EXCEEDS_DAILY_LIMIT, etc.
How It Works
Your Agent SKALOR Vendor API
│ │ │
├─ authorize_spend() ────►│ │
│ ├─ Check kill switch │
│ ├─ Check per-tx limit │
│ ├─ Check daily limit │
│ ├─ Settle on Solana │
│◄── ApprovalResult ──────┤ │
│ │ │
├─ (if approved) call ───────────────────────────────►│
│◄── response ────────────────────────────────────────┤
Exceptions
| Exception | Status | When |
|---|---|---|
SkalorPaymentError |
402/403 | Spend denied (over limit, inactive agent) |
SkalorAuthError |
401 | Invalid API key |
SkalorRateLimitError |
429 | Too many requests |
SkalorNetworkError |
— | API unreachable |
Denial Reasons
When SkalorPaymentError is raised, check e.reason:
AGENT_INACTIVE— Kill switch is offAGENT_PAUSED/AGENT_SUSPENDED/AGENT_REVOKEDEXCEEDS_PER_TX_LIMIT— Single transaction too largeEXCEEDS_DAILY_LIMIT— Daily budget exhaustedINSUFFICIENT_TREASURY— Not enough funds in treasuryMERCHANT_NOT_AUTHORIZED— Vendor not on allowlist
Configuration
# Custom endpoint (self-hosted or dev)
zc = Client(
api_key="sk_live_abc123...",
base_url="http://localhost:8081",
timeout=10.0,
)
# Context manager
with Client(api_key="sk_live_abc123...") as zc:
result = zc.authorize_spend(amount=1.00, merchant="Helius")
License
MIT
Metadata
Release files for skalor-sdk 0.7.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 | |
|---|---|---|---|
| skalor_sdk-0.7.0.tar.gz | 29.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| skalor_sdk-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 60.0 kB
Release files / skalor_sdk-0.7.0.tar.gz
| Download URL | skalor_sdk-0.7.0.tar.gz |
|---|---|
| Size | 29.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
479bb84d5d5fe739f6f5d402d861fa3dab504d258354ace0de616e3774810502
|
|
BLAKE2b-256 checksum How to use checksums |
bb9f8f8a06fcda6b82431666dcdc476f10e8889a751be40e0f0e87988097db3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / skalor_sdk-0.7.0-py3-none-any.whl
| Download URL | skalor_sdk-0.7.0-py3-none-any.whl |
|---|---|
| Size | 30.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eed54df9382ee8db8e6fe504ae3321cdbd41147a7b8da9ac7de4d1d7183453cb
|
|
BLAKE2b-256 checksum How to use checksums |
a0edbb6844d96db45f0456a18aa2f383b02b534158596da8f7050365980fddb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|