agentmint-cli
v0.6.0
Published
Stripe-Link CLI for provisioning and managing pay-as-you-go AI subagents on AgentMint
Downloads
601
Maintainers
Readme
agentmint
Stripe-Link CLI for AgentMint — pay-as-you-go AI subagents over USD via a caller-wide credit wallet. Bootstrap once with link-cli, then every subsequent agent.* call is Bearer-authenticated and debits from the shared balance.
Blockchain customers (USDC on Base / Solana / Tempo) pay per call directly to
https://api.agentmint.store/a2avia curl / agentcash / tempo — this CLI does not handle private keys or on-chain settlement.
Run
npx agentmint-cli --helpnpx downloads and caches the package on first use, then runs it directly.
Quick start
# 1. Bootstrap a credit wallet via link-cli (the Stripe-MPP client).
# `agentmint credits topup` prints the exact link-cli command sequence;
# minimum $10 (Stripe per-charge fees make smaller top-ups uneconomical).
npx agentmint-cli credits topup 10
# 2. Save the JWT returned in the credits.topup response.
npx agentmint-cli credits set-token <jwt>
# 3. Every agent.* call now Bearer-auths against the shared wallet —
# no per-call Stripe charge. The same wallet funds every subagent.
npx agentmint-cli agent create --name reviewer-myrepo # debits 0.10 USDC equivalent
npx agentmint-cli agent run --name reviewer-myrepo "..." # debits per call
npx agentmint-cli agent list # enumerate subagents
npx agentmint-cli credits balance # shared balanceAddressing — names, not IDs
Every subagent has a human-readable name set once at create time (e.g. reviewer-myrepo, support-acme, oncall-payments). The name is the only addressing key the CLI knows — agent_id never appears on the CLI surface. The server resolves names to internal IDs automatically.
- Format:
/^[a-z0-9][a-z0-9_-]{0,39}$/— 1-40 chars, lowercase alphanumeric / dash / underscore, can't start with a separator. - Globally unique across AgentMint; first mint wins.
- Names are immutable after
agent.create. Released onagent delete. --nameis optional when exactly one subagent is cached locally (~/.agentmint/agents.json). Override the default with theAGENTMINT_AGENT_NAMEenv var.
Commands
| Command | Cost | Purpose |
|---|---|---|
| agent create | 0.10 USDC | Provision a managed subagent (agentmint picks harness + model) |
| agent create-byok | 0.10 USDC | Provision a Bring-Your-Own-Key subagent |
| agent run | per call (smoothed 0.01–0.075 USDC all-inclusive; 0.02 USDC BYOK) | Send a prompt; receive reply |
| agent update | 0.01 USDC | Update model / init / skills / persona |
| agent get | 0.01 USDC | Read agent metadata |
| agent runs | 0.01 USDC | List recent run history |
| agent cancel | 0.01 USDC | Kill an in-flight (stuck) run |
| agent delete | 0.01 USDC | Destroy the subagent |
| agent list (alias agent ls) | 0.01 USDC | List every subagent the caller owns (table view; --limit N / --offset M) |
| credits topup <amount> | dynamic | Bootstrap or top up the caller-wide credit wallet — prints the link-cli command sequence |
| credits balance | free (Bearer) | Show shared wallet balance |
| credits history [--limit N] | free (Bearer) | Per-event ledger (every topup, debit, refund) |
| credits set-token <jwt> | local-only | Import a JWT from link-cli |
| credits revoke-token --jti <jti> | free (Bearer) | Revoke a specific jti |
| credits logout | local-only | Forget the cached wallet token |
Why no blockchain support?
This CLI is intentionally narrow: it does one rail (Stripe-Link credit wallet) and does it cleanly. Customers paying in USDC on Base / Solana / Tempo have multiple existing clients that handle the x402/MPP signing better than we could:
- agentcash —
npx agentcash fetch <url>handles x402 and MPP on Base, Solana, and Tempo with a managed wallet (no key handling). - tempo — Tempo's native CLI for MPP on the Tempo chain.
- Raw curl +
mppx/@x402/evmfor custom integrations.
The AgentMint server speaks all of those at https://api.agentmint.store/a2a — see the full spec at agentmint.store/SKILL.md.
Environment
| Variable | Purpose |
|---|---|
| AGENTMINT_ENDPOINT | Override service endpoint (default: https://api.agentmint.store/a2a) |
| AGENTMINT_AGENT_NAME | Default --name value when omitted on any command |
Develop locally
git clone https://github.com/mesutcelik/agentmint-cli-repository.git
cd agentmint-cli-repository
yarn install
yarn start --help # equivalent to: tsx cli.ts --helpPublishing
Tag a v* release to trigger the GitHub Actions publish workflow:
npm version patch # creates commit + tag like v0.6.1
git push --follow-tagsThe workflow runs yarn install --frozen-lockfile && yarn build && npm publish --access public and the package goes live.
License
MIT
