返回顶部
a

agent-fuel

Autonomous agent wallet management with MoonPay auto top-up, x402 payments, and OpenWallet Standard. Agents never run out of gas.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
81
下载量
0
收藏
概述
安装方式
版本历史

agent-fuel

# Agent Fuel — Autonomous Payment & Gas Management Keep your agent running by automatically managing wallet balances, topping up via MoonPay, and paying for x402-enabled APIs. ## Prerequisites 1. MoonPay CLI installed and authenticated: ```bash npm install -g @moonpay/cli mp login ``` 2. A funded wallet (can be created via `mp wallet create`) ## Quick Start ### Check Balance ```bash mp wallet balance ``` ### Auto Top-Up When Low When the agent detects low balance (configurable threshold), trigger: ```bash mp buy --amount 20 --currency USDC --chain base ``` ### Swap Tokens ```bash mp swap --from ETH --to USDC --amount 0.01 --chain base ``` ## x402 Payments For APIs that return HTTP 402, the agent should: 1. Parse the `PAYMENT-REQUIRED` header for amount and payment address 2. Sign the payment using the agent wallet 3. Retry the request with `PAYMENT-SIGNATURE` header 4. Log the transaction ## Balance Monitoring The agent should periodically check balance and act: ``` IF balance < minBalance: IF dailySpend < maxDailySpend: mp buy --amount {topUpAmount} --currency USDC notify human "⛽ Auto top-up: ${topUpAmount} USDC" ELSE: notify human "⚠️ Daily spend limit reached. Manual top-up needed." ``` ## Configuration Store in `~/clawd/.secrets/agent-fuel.json`: ```json { "chain": "base", "currency": "USDC", "minBalance": 5.0, "topUpAmount": 20.0, "maxDailySpend": 100.0, "alertThreshold": 2.0, "x402Enabled": true, "x402MaxPerRequest": 0.10 } ``` ## Safety Rules - NEVER exceed `maxDailySpend` without human approval - ALWAYS log transactions with reason - ALERT human when balance drops below `alertThreshold` - PAUSE spending if 3+ top-ups in 1 hour (possible loop) ## MoonPay CLI Reference | Command | Description | |---------|------------| | `mp wallet balance` | Check all wallet balances | | `mp wallet create` | Create new wallet | | `mp buy --amount N --currency TOKEN` | Buy crypto with fiat | | `mp swap --from X --to Y --amount N` | Swap tokens | | `mp send --to ADDR --amount N --currency TOKEN` | Send tokens | | `mp wallet history` | Transaction history | | `mp mcp` | Start MCP server for agent integration |

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 agent-fuel-1776098902 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 agent-fuel-1776098902 技能

通过命令行安装

skillhub install agent-fuel-1776098902

下载 Zip 包

⬇ 下载 agent-fuel v1.0.0

文件大小: 9.72 KB | 发布时间: 2026-4-14 14:42

v1.0.0 最新 2026-4-14 14:42
Initial release: MoonPay CLI auto top-up, x402 payments, OpenWallet Standard

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部