AI Agent 的加密银行安全卫士
简介
专为AI Agent设计的多链加密钱包SDK,支持余额查询与受控交易,默认禁用模型自主调用以保护用户资产安全。
原始描述
Secure multi-chain crypto wallet management for AI agents with read-only access by default and explicit user consent required for transactions and wallet cre...
通过你的 Agent 添加
安装目录:agentsbank/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
AgentsBank SDK 是一款专为 AI 代理设计的加密货币银行操作工具包,采用 TypeScript 编写,支持 Ethereum、BSC、Solana、Bitcoin 四条主流公链。开发者通过 npm 安装 @agentsbankai/sdk 后,配置 AGENTSBANK_API_URL、AGENTSBANK_AGENT_USERNAME 和 AGENTSBANK_AGENT_PASSWORD 环境变量即可完成初始化。
SDK 将功能明确划分为安全只读操作与受限写操作两类。只读功能包括查询钱包余额、获取交易历史、估算 Gas 费用、签名验证消息等,这些操作无需额外授权即可随时调用。而涉及资金转移的 sendTransaction、创建新钱包、自主注册代理等写操作则被强制标记为 disableModelInvocation: true,必须由终端用户显式触发,从根本上杜绝 AI 模型幻觉导致的非预期资产损失。
SDK 提供完善的类型定义与错误处理机制,支持 SDKError 捕获具体错误码(如 INVALID_ADDRESS、INSUFFICIENT_BALANCE),并内置请求超时、指数退避重试、Guardrails 交易限额等防护层。
显著优点
安全架构设计领先:通过强制分离读写权限、禁止模型自主调用金融接口,解决了 AI Agent 操作真实资产的最大痛点——不可控性。多层凭证体系(密码 + API Key 双认证)与 HTTPS/TLS 1.2+ 通信加密,符合金融级安全标准。
多链兼容与轻量部署:单一 SDK 覆盖四大主流公链,包体仅 6.8KB,依赖按需加载,无冗余 node_modules 负担,适合边缘计算与 Serverless 环境。
企业级工程实践:包含完整的类型定义、单元测试友好的接口设计、分页查询支持、详细的日志级别控制,以及符合 GDPR/CCPA 的隐私合规实现,可直接投入生产环境。
潜在缺点与局限性
外部服务强依赖:所有功能完全依赖 AgentsBank 中心化 API(api.agentsbank.online),服务可用性直接影响业务连续性,目前未提供离线缓存或本地节点回退机制。
写操作体验受限:虽然安全设计严谨,但用户每次发起转账都需显式确认,高频交易场景下交互成本较高;且不支持智能合约部署、批量交易等高级功能。
生态成熟度待观察:作为相对新兴的 Agent 金融基础设施,相比 MetaMask SDK、WalletConnect 等成熟方案,社区案例、第三方审计报告与长期安全 track record 尚属早期。
适合的目标群体
- AI Agent 开发者:需要为对话机器人、自动化工作流赋予安全、受限的加密资产管理能力,同时严格控制资金风险。
- DeFi 协议运营团队:希望通过 AI 提供用户余额查询、收益计算、交易历史分析等客户服务,但禁止 AI 直接操作用户资金。
- 企业财务自动化:寻求在合规框架内,让 AI 辅助完成多链账户监控、对账、报告生成,人工审批后执行付款。
- 加密货币托管服务商:构建人机协同的资产管理界面,AI 负责信息展示与初步风险评估,人类操作员终审交易。
使用风险
凭证泄露风险:AGENTSBANK_AGENT_PASSWORD 拥有代理账户的完整操作权限,一旦通过代码泄露、日志暴露或环境变量配置失误被获取,攻击者可绕过 AI 层直接调用 API 转移资产。必须采用 HashiCorp Vault、AWS Secrets Manager 等密钥管理系统,并执行季度轮换。
交易不可逆风险:区块链转账一旦确认无法撤回,地址填写错误或遭遇钓鱼攻击将导致永久资金损失。建议始终启用 Guardrails 白名单功能,限制可收款地址,并先在小额测试网验证。
API 服务单点故障:若 AgentsBank 服务端遭受 DDoS、证书配置错误或业务中断,依赖该 SDK 的 Agent 将完全丧失金融操作能力。生产环境应实现健康检查与熔断降级策略。
合规与监管不确定性:全球加密资产监管政策持续演变,跨司法辖区使用需自行评估 KYC/AML 义务,SDK 本身不提供合规自动化功能。
依赖供应链风险:SDK 依赖 axios、ethers、@solana/web3.js 等底层库,需持续关注 CVE 漏洞公告,及时升级修复版本。
技能正文
AgentsBank SDK Skill Definition
Version: 1.0.6
Publisher: AgentsBank
Contact: info@agentsbank.online
Status: 🟢 Public Release - Production Ready
🎯 PURPOSE & CAPABILITY
This skill provides secure, scoped crypto banking operations for AI agents via the official AgentsBank SDK. It enables agents to manage wallets, check balances, and execute transactions with explicit user control.
✅ Capabilities (Read-Only & Safe)
- ✓ Fetch agent wallet balances across all supported chains (Ethereum, BSC, Solana, Bitcoin)
- ✓ Retrieve transaction history with filtering and pagination
- ✓ Query wallet details, metadata, and account information
- ✓ Sign messages for authentication and verification (no fund transfer)
- ✓ Estimate gas fees before transaction execution
- ✓ List all wallets with pagination support
⚠️ Capabilities (Write/Financial - Requires Explicit User Invocation)
- ⚠️ Send crypto transactions (only if
disableModelInvocation: false is explicitly overridden by user)
- ⚠️ Create new wallets (only if
disableModelInvocation: false is explicitly overridden by user)
- ⚠️ Self-register agents and humans autonomously
❌ NOT Included (Out of Scope)
- OAuth2 delegated access to external wallets
- Webhooks or event subscriptions
- Smart contract deployment
- Sandboxed testing (use testnet chains directly)
- Private key export or management
🔐 CREDENTIALS & ENVIRONMENT VARIABLES
Required Environment Variables
Variable
Type
Purpose
Example
AGENTSBANK_API_URL
string
API endpoint (primary)
https://api.agentsbank.online
AGENTSBANK_AGENT_USERNAME
string
Agent identifier
agent_123456_abc
AGENTSBANK_AGENT_PASSWORD
string
Agent credential (secret)
(user-specific)
- ⚠️ Send crypto transactions (only if
disableModelInvocation: falseis explicitly overridden by user) - ⚠️ Create new wallets (only if
disableModelInvocation: falseis explicitly overridden by user) - ⚠️ Self-register agents and humans autonomously
❌ NOT Included (Out of Scope)
- OAuth2 delegated access to external wallets
- Webhooks or event subscriptions
- Smart contract deployment
- Sandboxed testing (use testnet chains directly)
- Private key export or management
🔐 CREDENTIALS & ENVIRONMENT VARIABLES
Required Environment Variables
Variable
Type
Purpose
Example
AGENTSBANK_API_URL
string
API endpoint (primary)
https://api.agentsbank.online
AGENTSBANK_AGENT_USERNAME
string
Agent identifier
agent_123456_abc
AGENTSBANK_AGENT_PASSWORD
string
Agent credential (secret)
(user-specific)
Required Environment Variables
| Variable | Type | Purpose | Example |
|---|---|---|---|
AGENTSBANK_API_URL |
string | API endpoint (primary) | https://api.agentsbank.online |
AGENTSBANK_AGENT_USERNAME |
string | Agent identifier | agent_123456_abc |
AGENTSBANK_AGENT_PASSWORD |
string | Agent credential (secret) | (user-specific) |
⚠️ SECURITY NOTES:
AGENTSBANK_AGENT_PASSWORDmust never be committed to version control- Store in
.envfile (add to.gitignore) - Rotate credentials quarterly or if exposed
- Use a secret manager (e.g., HashiCorp Vault, AWS Secrets Manager) in production
Optional Environment Variables
Variable
Type
Purpose
Default
AGENTSBANK_API_KEY
string
Alternative to password-based auth
(not set)
AGENTSBANK_LOG_LEVEL
string
Logging verbosity
info
AGENTSBANK_TIMEOUT_MS
number
Request timeout
30000
🚀 INSTALL & SETUP
1. Install SDK
| Variable | Type | Purpose | Default |
|---|---|---|---|
AGENTSBANK_API_KEY |
string | Alternative to password-based auth | (not set) |
AGENTSBANK_LOG_LEVEL |
string | Logging verbosity | info |
AGENTSBANK_TIMEOUT_MS |
number | Request timeout | 30000 |
1. Install SDK
The published npm package is lightweight (~6.8 KB) with no node_modules included. Installation only fetches dependencies you need:
npm install @agentsbankai/sdk
# or
yarn add @agentsbankai/sdk
# or
pnpm add @agentsbankai/sdk
This will:
- ✅ Download the compiled SDK (CJS + ESM formats)
- ✅ Install required dependencies (axios, ethers, @solana/web3.js, etc.)
- ✅ No bloat: node_modules are excluded from the published package
2. Initialize Environment
Create .env file in your project root:
AGENTSBANK_API_URL=https://api.agentsbank.online
AGENTSBANK_AGENT_USERNAME=agent_123456_abc
AGENTSBANK_AGENT_PASSWORD=your_secure_password_here
3. Create Client Instance
import { AgentsBankSDK } from '@agentsbankai/sdk';
// Initialize SDK with API credentials
const bank = new AgentsBankSDK({
apiUrl: process.env.AGENTSBANK_API_URL || 'https://api.agentsbank.online',
timeout: parseInt(process.env.AGENTSBANK_TIMEOUT_MS || '30000')
});
// Authenticate using agent credentials
const { token, agent } = await bank.login({
agentUsername: process.env.AGENTSBANK_AGENT_USERNAME!,
agentPassword: process.env.AGENTSBANK_AGENT_PASSWORD!
});
console.log('✅ Authenticated as:', agent.agent_id);
4. Use Safe Operations (Always Allowed)
// Get wallet balance (safe, read-only)
const balance = await bank.getBalance(walletId);
console.log('Balance:', balance);
// Get transaction history (safe, read-only)
const history = await bank.getTransactionHistory(walletId, {
limit: 10,
offset: 0
});
console.log('Recent transactions:', history);
// Sign a message (safe, no fund transfer)
const signature = await bank.signMessage(walletId, 'verify-ownership');
console.log('Signature:', signature);
// Estimate gas fees before sending
const gasEstimate = await bank.estimateGas({
walletId,
toAddress: '0x...',
amount: '1.5',
chain: 'ethereum'
});
console.log('Estimated gas:', gasEstimate);
// List all wallets with pagination
const wallets = await bank.listWallets({ limit: 20, offset: 0 });
console.log('Agent wallets:', wallets);
⚠️ RESTRICTED OPERATIONS (Require Explicit User Approval)
import { AgentsBankSDK } from '@agentsbankai/sdk';
// Initialize SDK with API credentials
const bank = new AgentsBankSDK({
apiUrl: process.env.AGENTSBANK_API_URL || 'https://api.agentsbank.online',
timeout: parseInt(process.env.AGENTSBANK_TIMEOUT_MS || '30000')
});
// Authenticate using agent credentials
const { token, agent } = await bank.login({
agentUsername: process.env.AGENTSBANK_AGENT_USERNAME!,
agentPassword: process.env.AGENTSBANK_AGENT_PASSWORD!
});
console.log('✅ Authenticated as:', agent.agent_id);
// Get wallet balance (safe, read-only)
const balance = await bank.getBalance(walletId);
console.log('Balance:', balance);
// Get transaction history (safe, read-only)
const history = await bank.getTransactionHistory(walletId, {
limit: 10,
offset: 0
});
console.log('Recent transactions:', history);
// Sign a message (safe, no fund transfer)
const signature = await bank.signMessage(walletId, 'verify-ownership');
console.log('Signature:', signature);
// Estimate gas fees before sending
const gasEstimate = await bank.estimateGas({
walletId,
toAddress: '0x...',
amount: '1.5',
chain: 'ethereum'
});
console.log('Estimated gas:', gasEstimate);
// List all wallets with pagination
const wallets = await bank.listWallets({ limit: 20, offset: 0 });
console.log('Agent wallets:', wallets);
⚠️ RESTRICTED OPERATIONS (Require Explicit User Approval)
The following operations will not execute autonomously and require explicit user invocation:
// ❌ This requires user to explicitly call it
// (disableModelInvocation: true is set by default)
const tx = await bank.sendTransaction({
walletId,
toAddress: recipientAddress,
amount: '1.5',
chain: 'solana',
token: 'SOL'
});
Why restricted?
- Financial operations that move assets must never be autonomous
- Requires explicit user approval before execution
- Prevents unintended fund transfers due to model hallucination
- v1.0.6 adds comprehensive error handling for validation failures
Error Handling (v1.0.6)
The SDK provides typed errors for better debugging:
import { AgentsBankSDK, SDKError } from '@agentsbankai/sdk';
try {
const tx = await bank.sendTransaction({
walletId,
toAddress: '0xinvalid', // Invalid address
amount: '100',
chain: 'ethereum'
});
} catch (error) {
if (error instanceof SDKError) {
console.error('SDK Error:', error.code, error.message);
// Error codes: INVALID_ADDRESS, INSUFFICIENT_BALANCE, INVALID_CHAIN, etc.
}
}
📋 METADATA & CONFIGURATION
{
"name": "@agentsbankai/sdk",
"namespace": "agentsbank",
"version": "1.0.6",
"description": "Scoped crypto banking SDK for AI agents with explicit financial operation protection, comprehensive error handling, and multi-chain support",
"author": "AgentsBank",
"license": "MIT",
"homepage": "https://agentsbank.online",
"repository": "https://github.com/agentsbank/sdk",
"docs": "https://docs.agentsbank.online/sdk",
"primaryEnv": "AGENTSBANK_AGENT_PASSWORD",
"requiredEnvs": [
"AGENTSBANK_API_URL",
"AGENTSBANK_AGENT_USERNAME",
"AGENTSBANK_AGENT_PASSWORD"
],
"optionalEnvs": [
"AGENTSBANK_API_KEY",
"AGENTSBANK_LOG_LEVEL",
"AGENTSBANK_TIMEOUT_MS"
],
"disableModelInvocation": true,
"modelInvocationWarning": "Financial operations must be explicitly requested by users. Autonomous transaction execution is disabled.",
"enforcedScopes": [
"read:balance",
"read:history",
"read:wallet",
"read:estimate",
"sign:message"
],
"restrictedScopes": [
"write:transaction",
"write:wallet",
"write:register"
],
"features": {
"multiChain": ["ethereum", "bsc", "solana", "bitcoin"],
"errorHandling": "Typed errors with specific error codes",
"validation": "Client-side parameter validation",
"pagination": "Supported for wallet and transaction listing"
},
"installMechanism": "npm",
"codeFiles": ["src/client.ts", "src/types.ts", "src/errors.ts", "src/index.ts"],
"noExecutableScripts": true,
"noDiskPersistence": true,
"noModelAutonomy": true,
"changelog": "https://github.com/agentsbank/sdk/blob/main/CHANGELOG.md"
}
🛡️ SECURITY BOUNDARIES
What This Skill Can Do
{
"name": "@agentsbankai/sdk",
"namespace": "agentsbank",
"version": "1.0.6",
"description": "Scoped crypto banking SDK for AI agents with explicit financial operation protection, comprehensive error handling, and multi-chain support",
"author": "AgentsBank",
"license": "MIT",
"homepage": "https://agentsbank.online",
"repository": "https://github.com/agentsbank/sdk",
"docs": "https://docs.agentsbank.online/sdk",
"primaryEnv": "AGENTSBANK_AGENT_PASSWORD",
"requiredEnvs": [
"AGENTSBANK_API_URL",
"AGENTSBANK_AGENT_USERNAME",
"AGENTSBANK_AGENT_PASSWORD"
],
"optionalEnvs": [
"AGENTSBANK_API_KEY",
"AGENTSBANK_LOG_LEVEL",
"AGENTSBANK_TIMEOUT_MS"
],
"disableModelInvocation": true,
"modelInvocationWarning": "Financial operations must be explicitly requested by users. Autonomous transaction execution is disabled.",
"enforcedScopes": [
"read:balance",
"read:history",
"read:wallet",
"read:estimate",
"sign:message"
],
"restrictedScopes": [
"write:transaction",
"write:wallet",
"write:register"
],
"features": {
"multiChain": ["ethereum", "bsc", "solana", "bitcoin"],
"errorHandling": "Typed errors with specific error codes",
"validation": "Client-side parameter validation",
"pagination": "Supported for wallet and transaction listing"
},
"installMechanism": "npm",
"codeFiles": ["src/client.ts", "src/types.ts", "src/errors.ts", "src/index.ts"],
"noExecutableScripts": true,
"noDiskPersistence": true,
"noModelAutonomy": true,
"changelog": "https://github.com/agentsbank/sdk/blob/main/CHANGELOG.md"
}
What This Skill Can Do
✅ Read wallet balances and history
✅ Sign messages for authentication
✅ Create wallets (with explicit user request)
✅ Retrieve account metadata
What This Skill CANNOT Do
❌ Execute transactions autonomously
❌ Export private keys
❌ Access external service credentials
❌ Persist sensitive data to disk
❌ Make requests to unlisted endpoints
Authentication Scopes
- Read scopes:
read:balance, read:history, read:wallet, sign:message
- Write scopes:
write:transaction, write:wallet (user-invoked only)
- No delegation: Agent cannot request additional scopes
✅ VERIFICATION CHECKLIST
read:balance, read:history, read:wallet, sign:messagewrite:transaction, write:wallet (user-invoked only)Before using this skill, confirm:
- You have obtained valid
AGENTSBANK_AGENT_USERNAMEandAGENTSBANK_AGENT_PASSWORDfrom https://agentsbank.online - Credentials are stored securely in
.env(never committed) - You have reviewed the Security Architecture
- You understand that
disableModelInvocation: trueprevents autonomous transactions - You have tested read operations first before enabling write operations
- You monitor activity logs at admin.agentsbank.online
📖 DOCUMENTATION & SUPPORT
Resource
URL
Full SDK Docs
https://docs.agentsbank.online/sdk
API Reference
https://api.agentsbank.online/docs
Security Guide
https://docs.agentsbank.online/security
Troubleshooting
https://docs.agentsbank.online/faq
GitHub Issues
https://github.com/agentsbank/sdk/issues
Support Email
support@agentsbank.online
⚖️ DISCLAIMER
| Resource | URL |
|---|---|
| Full SDK Docs | https://docs.agentsbank.online/sdk |
| API Reference | https://api.agentsbank.online/docs |
| Security Guide | https://docs.agentsbank.online/security |
| Troubleshooting | https://docs.agentsbank.online/faq |
| GitHub Issues | https://github.com/agentsbank/sdk/issues |
| Support Email | support@agentsbank.online |
This skill integrates with real cryptocurrency networks (Ethereum, Solana, Bitcoin, BSC). Transactions are irreversible.
- AgentsBank is not responsible for fund loss due to incorrect addresses or user error
- Always test with small amounts first
- Use testnet chains for development
- Enable 2FA on your AgentsBank account
Last Updated: February 11, 2026 (v1.0.6 release)
Status: 🟢 Public Release - Production Ready ✅
npm Package: https://www.npmjs.com/package/@agentsbankai/sdk
GitHub: https://github.com/agentsbank/sdk
Changes in v1.0.6: Comprehensive error handling, enhanced type definitions, improved client implementation
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。