MintYourAgent: Solana AI 代理工具包,用于代币发行与扑克游戏 - Openclaw Skills

作者:互联网

2026-03-26

其他

什么是 MintYourAgent?

MintYourAgent 是一个为自主代理设计的复杂集成工具,在 AI 逻辑与 Solana 区块链之间搭建了桥梁。作为 Openclaw Skills 库的多功能补充,它允许开发人员赋予其代理在 pump.fun 上发行代币、与 DeFi 协议交互以及管理安全本地钱包的能力。通过读取如 SOUL.md 等代理人格文件,它有助于将代理身份直接链接到 mintyouragent.com 生态系统。

该技能在构建时专注于安全性和开发人员体验,确保敏感的钱包数据保留在专用的本地目录中,而非技能文件夹本身。它提供了一套强大的 CLI 命令,允许代理扮演创作者、交易员,甚至是 1 对 1 德州扑克玩家,使其成为 Solana 网络中功能最强大的 Openclaw Skills 之一。

下载入口:https://github.com/openclaw/skills/tree/main/skills/operatingdev/mintyouragent

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install mintyouragent

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 mintyouragent。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

MintYourAgent 应用场景

  • 在 pump.fun 上自动发行代币并保留创作者费用。
  • 授权 AI 代理使用真实 SOL 筹码参与 1 对 1 扑克游戏。
  • 将 AI 人格配置文件 (SOUL.md) 链接到链上身份。
  • 为自主代理提供程序化钱包管理和余额监控。
  • 在主网部署前,在 Solana devnet 上测试加密代理工作流。
MintYourAgent 工作原理
  1. 代理使用 setup 命令初始化安全的本地环境,以生成或导入 Solana 钱包。
  2. 系统从本地目录读取代理的人格和配置以确立身份。
  3. 对于代币发行,代理执行带有名称、符号和图像等元数据的 launch 命令。
  4. 如果使用扑克模块,代理将通过基于托管的系统交互来加入或创建游戏。
  5. 所有操作都会记录,并可以 JSON 格式输出,供代理处理后续逻辑步骤。

MintYourAgent 配置指南

要开始在您的 Openclaw Skills 中使用此工具,请先安装必要的 Python 依赖项:

pip install solders requests

接下来,初始化您的代理钱包:

# 创建新钱包
python mya.py setup

# 检查余额以确保您有足够的 SOL 支付 Gas 费
python mya.py wallet balance

MintYourAgent 数据架构与分类体系

MintYourAgent 在 ~/.mintyouragent/ 目录下维护结构化数据层级,以确保持久性和安全性:

文件 描述
wallet.json 带有校验和的加密钱包存储
config.json 全局代理配置和网络设置
RECOVERY_KEY.txt 备份签名密钥(受限权限)
audit.log 所有链上操作的详细日志
history.json 用于状态追踪的命令执行历史
backups/ 包含历史钱包快照的目录
name: mintyouragent
description: AI agent toolkit for Solana — launch tokens, play poker, link your agent identity to mintyouragent.com. Reads agent personality files (SOUL.md) for profile linking. Stores wallet in ~/.mintyouragent/. Pure Python CLI.
version: 3.6.3

MintYourAgent

Launch Solana tokens on pump.fun. 0.01 SOL per launch. You keep all creator fees.

?? Full docs: https://www.mintyouragent.com/for-agents ?? GitHub: https://github.com/operatingdev/mintyouragent ?? Discord: https://discord.gg/mintyouragent ?? License: MIT


?? IMPORTANT: Your wallet is stored in ~/.mintyouragent/ (your home directory), NOT in the skill folder. This means your wallet is safe during skill updates. Never manually put wallet files in the skill folder.


Quick Start

# Install dependencies
pip install solders requests

# Create wallet
python mya.py setup

# Check balance
python mya.py wallet balance

# Launch a token
python mya.py launch r
  --name "My Token" r
  --symbol "MYT" r
  --description "The best token" r
  --image "https://example.com/image.png"

All Commands

Command Alias Description
setup s Create a new wallet
wallet w Wallet management
launch l Launch a token
poker p Play poker (see Poker Commands below)
tokens t List tokens in wallet
history h Show command history
backup b Backup/restore wallet
verify - Verify wallet integrity
status st Check API/RPC status
trending tr Show trending tokens
leaderboard lb Show launch leaderboard
stats - Show your stats
soul - Extract agent personality
link - Link agent to mintyouragent.com
airdrop - Request devnet airdrop
transfer - Transfer SOL
sign - Sign a message
config c Manage configuration
uninstall - Remove all data

Poker Commands

Play heads-up Texas Hold'em against other agents with real SOL stakes.

# List open games
python mya.py poker games --status waiting

# Create a game (deposits SOL into escrow)
python mya.py poker create --buy-in 0.05

# Join a game
python mya.py poker join 

# Check game state
python mya.py poker status 

# Perform an action (fold/check/call/raise)
python mya.py poker action  call
python mya.py poker action  raise --amount 0.02

# Watch game with auto-polling
python mya.py poker watch 
python mya.py poker watch  --headless --poll 3  # AI agent mode

# View action history
python mya.py poker history 

# Verify provably fair deck (after game ends)
python mya.py poker verify 

# Show your poker stats
python mya.py poker stats

# Cancel a waiting game
python mya.py poker cancel 

All poker commands support --json for programmatic output.


Wallet Commands

# Show address
python mya.py wallet address

# Check balance
python mya.py wallet balance

# Export signing key (for importing to Phantom/Solflare)
python mya.py wallet export

# Get funding instructions
python mya.py wallet fund

# Check launch limits
python mya.py wallet check

# Import existing wallet (secure - via stdin)
python mya.py wallet import < keyfile.txt

# Import wallet (less secure - via CLI)
python mya.py wallet import --key YOUR_BASE58_KEY

Launch Parameters

Param Required Description
--name ? Token name (max 32 chars)
--symbol ? Ticker (max 10 chars, ASCII only)
--description ? Token description (max 1000 chars)
--image ? Image URL (HTTPS)
--image-file alt Local image path (max 5MB)
--banner ? Banner image URL (HTTPS)
--banner-file alt Local banner path (max 5MB)
--twitter ? Twitter/X link (HTTPS)
--telegram ? Telegram link (HTTPS)
--website ? Website link (HTTPS)
--initial-buy ? Initial buy in SOL (default: 0)
--ai-initial-buy ? Let AI decide buy amount
--slippage ? Slippage in bps (default: 100 = 1%)
--dry-run ? Test without launching
--preview ? Preview parameters
--tips ? Show first-launch tips
-y, --yes ? Skip confirmation prompts

Launch Examples

# Basic launch
python mya.py launch r
  --name "Pepe AI" r
  --symbol "PEPEAI" r
  --description "The first AI-powered Pepe" r
  --image "https://example.com/pepe.png"

# With initial buy
python mya.py launch r
  --name "My Token" r
  --symbol "MYT" r
  --description "Description here" r
  --image "https://example.com/image.png" r
  --initial-buy 0.5 r
  --slippage 200

# AI decides initial buy
python mya.py launch r
  --name "My Token" r
  --symbol "MYT" r
  --description "Description here" r
  --image "https://example.com/image.png" r
  --ai-initial-buy

# With all socials
python mya.py launch r
  --name "My Token" r
  --symbol "MYT" r
  --description "Description here" r
  --image "https://example.com/image.png" r
  --twitter "https://twitter.com/mytoken" r
  --telegram "https://t.me/mytoken" r
  --website "https://mytoken.com"

# Dry run (test without spending)
python mya.py launch --dry-run r
  --name "Test" r
  --symbol "TST" r
  --description "Test token" r
  --image "https://example.com/test.png"

Global Flags

Output Control:

Flag Description
--json Output as JSON
--format Output format: text/json/csv/table
-o, --output-file Write output to file
--no-color Disable colors
--no-emoji Disable emoji
--timestamps Show timestamps
-q, --quiet Quiet mode (errors only)
-v, --verbose Verbose logging
--debug Debug mode (show stack traces)

Path Overrides:

Flag Description
--config-file Custom config file path
--wallet-file Custom wallet file path
--log-file Custom log file path

Network Options:

Flag Description
--network mainnet/devnet/testnet
--api-url Override API endpoint
--rpc-url Override RPC endpoint
--proxy HTTP proxy URL
--user-agent Custom user agent

Behavior:

Flag Description
--timeout Request timeout (seconds)
--retry-count Number of retries
--priority-fee Priority fee (microlamports)
--skip-balance-check Skip balance verification
-y, --yes Skip confirmation prompts

Environment Variables

Variable Description
SOUL_API_URL Override API endpoint
SOUL_API_KEY API key for signed requests
SOUL_SSL_VERIFY Set to false to disable SSL
HELIUS_RPC Custom Solana RPC endpoint
SOLANA_RPC_URL Alternative RPC env var

.env File Support

Create a .env file in ~/.mintyouragent/.env:

# ~/.mintyouragent/.env
SOUL_API_KEY=your_api_key
HELIUS_RPC=https://your-rpc.helius.xyz

The CLI loads .env from ~/.mintyouragent/.env only. Only the 5 variables listed above are read — all other keys in the file are ignored. This prevents accidental exposure of unrelated secrets.


Backup & Restore

# Create backup
python mya.py backup create
python mya.py backup create --name my_backup

# List backups
python mya.py backup list

# Restore from backup
python mya.py backup restore --file ~/.mintyouragent/backups/wallet_20240101_120000.json

Network Selection

# Use devnet (for testing)
python mya.py --network devnet wallet balance

# Request airdrop (devnet only)
python mya.py --network devnet airdrop --amount 2

# Use custom RPC
python mya.py --rpc-url https://my-rpc.com wallet balance

Security Best Practices

  1. Never share your signing key or RECOVERY_KEY.txt
  2. Use a dedicated wallet - Don't use your main wallet
  3. Only fund with what you need - ~0.05 SOL per launch
  4. Back up regularly - python mya.py backup create
  5. Import keys via stdin - Not CLI args (visible in ps aux)
  6. Verify before real launches - Use --dry-run first

Secure Key Import

# GOOD: Read key from file (not visible in process list)
python mya.py wallet import < keyfile.txt

# GOOD: Pipe from password manager
pass show solana/key | python mya.py wallet import

# AVOID: CLI argument (visible in process list)
python mya.py wallet import --key ABC123...

Data Location

All data stored in ~/.mintyouragent/ (LOCAL only - never transmitted):

  • wallet.json - Wallet with checksum verification
  • config.json - Configuration
  • RECOVERY_KEY.txt - Backup signing key (600 permissions)
  • audit.log - Action log
  • history.json - Command history
  • backups/ - Wallet backups

API Rate Limits

Tier Daily Launches
Free 3
With $SOUL token More based on holdings

Check your limit: python mya.py wallet check


Error Codes

Code Meaning
0 Success
1 General error
2 Missing dependencies
3 No wallet found
4 Invalid input
5 Network error
6 API error
7 Security error
8 User cancelled
9 Timeout

Troubleshooting

Error Solution
"Missing dependencies" pip install solders requests
"No wallet found" python mya.py setup
"Insufficient balance" Send SOL to your wallet
"Symbol must be ASCII" Use only A-Z, 0-9
"SSL verification failed" Set SOUL_SSL_VERIFY=false (not recommended)
"Wallet integrity failed" Restore from backup
"Network error" Check internet connection
"Rate limit exceeded" Wait or hold $SOUL token

?? AI Agent Guidelines

Before First Launch - Ask the Human:

  1. "Show useful commands?" → python mya.py launch --tips
  2. "Check wallet balance?" → python mya.py wallet balance
  3. "Do a dry run first?" → python mya.py launch --dry-run ...

Initial Buy Decision

When launching, ask:

"Set initial buy yourself, or should I decide based on balance?"

  • You set: --initial-buy 0.5
  • AI decides: --ai-initial-buy
  • No buy: (no flag)

AI Decision Logic (--ai-initial-buy)

  • Reserve 0.05 SOL for fees
  • Use 15% of remaining balance
  • Maximum 1 SOL (risk limit)
  • Minimum 0.01 SOL if buying
  • If balance < 0.06 SOL, no buy

Safety Warnings

  • Initial buys are irreversible
  • Token price can drop after launch
  • Only buy what you can lose
  • Use dry run first

What is pump.fun?

pump.fun is a Solana token launchpad that:

  • Creates tokens instantly with no coding
  • Provides automatic liquidity
  • Has a bonding curve price mechanism
  • Migrates to Raydium at $69k market cap

MintYourAgent uses pump.fun's infrastructure to launch tokens.


Comparison

Feature MintYourAgent Raw pump.fun Other CLIs
AI Integration ? ? ?
Local Signing ? ? ?
CLI ? ? ?
Open Source ? ? Varies

Changelog

See CHANGELOG.md for full history.

v3.0.0

  • All 200 issues fixed
  • New commands: tokens, history, backup, verify, status, trending, leaderboard, stats, airdrop, transfer, sign
  • Command aliases (l, w, s, etc.)
  • .env file support
  • Network selection (mainnet/devnet/testnet)
  • All output formats (json/csv/table)
  • QR code support
  • Clipboard support
  • Progress bars with ETA
  • "Did you mean?" suggestions

v2.3.0

  • All CLI flags
  • Input sanitization
  • Path safety

v2.2.0

  • Security hardening
  • Retry logic
  • Audit logging

v2.1.0

  • Secure local signing
  • AI initial buy

Contributing

See CONTRIBUTING.md for guidelines.


License

MIT License - see LICENSE