Introduction to ShieldX
ShieldX is the first non-custodial security middleware purpose-built for AI agents that handle cryptocurrency. It sits between your agent and the blockchain, enforcing spending rules, managing approvals, and maintaining a complete audit trail — all without ever touching your private keys.
How It Works
At a high level, ShieldX wraps your wallet in a smart contract that enforces rules before any transaction executes. Your agent communicates through the ShieldX API, and every action is validated against your rule set in real-time.
Key Principles
Non-Custodial
Your funds live in your own smart contract. ShieldX never holds or controls your money. Even if our servers go down, on-chain rules keep enforcing.
Agent-Native
Designed from the ground up for machines that spend money. Not a human wallet with API access — a purpose-built security layer for autonomous agents.
Composable Rules
Stack 12 permission layers to create precise guardrails. Per-transaction limits, daily budgets, address whitelists, chain restrictions, and time windows.
Full Audit Trail
Every transaction, approval, and rule trigger is logged immutably. Complete visibility into what your agents are doing and why.
Quick Start
Get ShieldX running in under 60 seconds. This guide walks you through creating your first agent, setting spending rules, and sending a test transaction.
Install the SDK
Install the ShieldX SDK for your preferred language.
# Python pip install shieldx # TypeScript npm install @shieldx/sdk # Go go get github.com/shieldx/go-sdk
Create an Agent
Register your AI agent and get an API key.
from shieldx import ShieldX
sx = ShieldX(api_key="sx_live_...")
agent = sx.agents.create(
name="TradingBot",
chain="solana",
description="Automated portfolio rebalancer"
)
print(f"Agent ID: {agent.id}")
print(f"Wallet: {agent.wallet_address}")Set Spending Rules
Define guardrails for your agent's transactions.
sx.rules.create(
agent_id=agent.id,
rules=[
{"type": "per_tx_limit", "value": 500},
{"type": "daily_budget", "value": 2000},
{"type": "whitelist", "addresses": [
"0x1234...5678",
"0xabcd...ef01"
]},
{"type": "time_window", "start": "09:00",
"end": "18:00", "timezone": "UTC"},
]
)Send a Transaction
Your agent can now send transactions through ShieldX.
result = sx.payments.create(
agent_id=agent.id,
amount="250.00",
token="USDC",
recipient="0x1234...5678",
reason="Portfolio rebalance — ETH allocation"
)
# result.status: "auto_approved" | "pending" | "denied"
# result.tx_hash: "0xabc...def"
print(f"Status: {result.status}")
print(f"TX: {result.tx_hash}")Architecture
A deep dive into how ShieldX processes transactions, enforces rules, and maintains security across the stack.
Layer Stack
ShieldX operates as middleware between your agent and the blockchain. Each layer adds a specific security capability.
Smart Wallets
Each agent gets a dedicated smart contract wallet with built-in rule enforcement. Non-custodial by design — your keys, your funds.
Session Keys
Temporary, scoped keys that limit what an agent can do. Expire automatically after a configurable period.
Address Whitelist
Restrict transfers to pre-approved addresses only. Any transaction to an unknown address is automatically blocked.
Spending Limits
Per-transaction and daily budget caps. The smart contract enforces these limits even if your API is unreachable.
Social Recovery
Designate guardian addresses that can help recover access. No single point of failure for wallet control.
Rules Engine
12 composable permission layers that define exactly what your agents can and cannot do. Rules are evaluated in order — all must pass for a transaction to execute.
Session Keys
Temporary, scoped cryptographic keys that give agents limited access without exposing the master key. Agents operate with just enough permission — nothing more.
session = sx.sessions.create(
agent_id=agent.id,
permissions=[
"transfer:usdc",
"transfer:sol",
],
limits={
"per_tx": 500,
"daily": 2000,
},
expires_in="24h", # auto-expire
allowed_chains=["solana"],
)
# Session key is scoped and temporary
print(f"Session: {session.key}")
print(f"Expires: {session.expires_at}")- Full access to wallet
- No expiration
- All chains, all tokens
- No spending limits
- If compromised → everything lost
- Scoped permissions only
- Auto-expires after period
- Chain and token locked
- Per-tx and daily limits
- If compromised → limited blast radius
Approval Flow
Transactions that exceed your auto-approve thresholds are held in a queue and routed to you for manual review via Telegram, email, or push notification.
Notification Channels
Telegram
Inline approve/deny buttons with full transaction context, countdown timer, and agent details.
Rich HTML notifications with one-click approve/deny links. Works with any email client.
Push
Native push notifications via the ShieldX mobile app. Actionable alerts with swipe-to-approve.
Webhook
HTTP POST callbacks for custom integrations. Build your own approval UI or automated workflows.
REST API
A simple, RESTful API to manage agents, rules, transactions, and approvals. All endpoints return JSON and use standard HTTP status codes.
https://api.shieldx.fun/v1
Authentication
All requests require a Bearer token in the Authorization header.
curl -X GET https://api.shieldx.fun/v1/agents \ -H "Authorization: Bearer sx_live_abc123..." \ -H "Content-Type: application/json"
MCP Server
Connect ShieldX to any MCP-compatible AI agent — Claude Desktop, Cursor, or custom implementations. One-line install with automatic tool discovery.
{
"mcpServers": {
"shieldx": {
"command": "npx",
"args": ["-y", "@shieldx/mcp-server"],
"env": {
"SHIELDX_API_KEY": "sx_live_..."
}
}
}
}Available Tools
send_paymentSend a crypto payment through ShieldX rules engineget_balanceCheck wallet balance across all connected agentslist_agentsList all registered agents and their current statusget_rulesRetrieve the active rule set for a specific agentapprove_txApprove a pending transaction from the approval queueget_audit_logRetrieve the transaction audit trail for an agentSDKs & Libraries
Official, type-safe SDKs for Python, TypeScript, and Go. Built-in retry logic, error handling, and webhook verification.
pip install shieldx
npm i @shieldx/sdk
go get github.com/shieldx/go-sdk
Webhooks
Receive real-time HTTP POST notifications for transactions, approvals, rule triggers, and security events.
Event Types
transaction.createdNew transaction initiated by an agenttransaction.approvedTransaction approved (auto or manual)transaction.deniedTransaction denied by rules or humantransaction.executedTransaction confirmed on-chainapproval.pendingTransaction queued for human reviewapproval.timeoutPending approval expired without actionrule.triggeredA specific rule blocked or flagged a txagent.createdNew agent registeredsession.expiredSession key reached expiration timesecurity.alertUnusual activity detected by monitoring{
"id": "evt_abc123",
"type": "transaction.approved",
"timestamp": "2026-03-04T12:00:00Z",
"data": {
"agent_id": "agt_xyz",
"amount": "250.00",
"token": "USDC",
"recipient": "0x1234...5678",
"status": "auto_approved",
"rule_results": [
{"rule": "per_tx_limit", "passed": true},
{"rule": "daily_budget", "passed": true},
{"rule": "whitelist", "passed": true}
]
}
}Security Model
ShieldX uses a defense-in-depth approach with multiple independent security layers. No single point of failure, no trust assumptions.
Threat Matrix
How ShieldX protects against common attack vectors compared to traditional approaches.
Recovery
Social recovery mechanisms ensure you never lose access to your funds. Designate guardians who can help restore wallet control.
API Endpoints
Complete reference for all available REST API endpoints.
/v1/agentsCreate a new agent/v1/agentsList all agents/v1/agents/:idGet agent details/v1/agents/:idDelete an agent/v1/agents/:id/rulesSet agent rules/v1/agents/:id/rulesGet agent rules/v1/paymentsCreate a payment/v1/payments/:idGet payment status/v1/paymentsList payments/v1/sessionsCreate session key/v1/sessions/:idRevoke session key/v1/approvals/:id/approveApprove pending tx/v1/approvals/:id/denyDeny pending tx/v1/auditGet audit log/v1/webhooksRegister webhookError Codes
Standard error responses with actionable messages.
bad_requestInvalid request parametersunauthorizedInvalid or missing API keyrule_violationTransaction blocked by rules enginenot_foundResource does not existduplicateIdempotency key already usedrate_limitedToo many requests, slow downinternal_errorSomething went wrong on our endchain_unavailableBlockchain RPC temporarily unreachableRate Limits
Rate limits are applied per API key. Headers indicate your current usage.
X-RateLimit-Limit: 600 X-RateLimit-Remaining: 594 X-RateLimit-Reset: 1709564400