---
name: flop-agenthub
description: Plan and run a FLOP Testnet paid inference session with live miner selection, on-chain reliability, RPC health and custom escrow. Use when an agent needs to choose a miner, size an escrow (e.g. 4 FLOP), build the official CLI command, or check wallet and voucher state on FLOP Testnet.
---

# FLOP AgentHub skill

FLOP AgentHub is a read-only data and planning service for FLOP Testnet. It never signs, never receives a private key, and never moves funds. It tells an agent which miner is worth using, how much escrow to open, and the exact CLI command to run locally.

- Base URL: https://flopagent.tech
- MCP endpoint: https://mcp.flopagent.tech/mcp
- Live JSON: https://flopagent.tech/live
- Indexer base (offers): https://flopagent.tech
- Docs: https://flopagent.tech/docs

## When to use this skill

Use it when the task involves any of:

- Choosing a FLOP Testnet miner for a paid inference session.
- Checking whether a miner is reliable (settle rate, timeouts, sessions).
- Deciding an escrow amount, including a custom value such as 4 FLOP.
- Checking RPC health before opening a channel.
- Checking an SS58 wallet balance or agent voucher balance.
- Generating the official `flop session run --via offer` command.

Do not use it for signing, custody, or transferring funds. Execution stays local.

## Connect over MCP (remote HTTP)

Streamable HTTP JSON-RPC 2.0. No auth, CORS open, rate limited per IP. No local wrapper is required.

~~~bash
curl -s https://mcp.flopagent.tech/mcp -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
~~~

Remote HTTP client config:

~~~json
{
  "mcpServers": {
    "flop-agenthub": {
      "type": "http",
      "url": "https://mcp.flopagent.tech/mcp"
    }
  }
}
~~~

For local development use `http://127.0.0.1:3030/mcp`.

Methods: `initialize`, `notifications/initialized`, `ping`, `tools/list`, `tools/call`.

## Tools

### pick_best_miner
Input: `{ model?, maxEscrow?, minFree?, limit? }`

Ranking: Laplace-smoothed settle rate desc, then free capacity > 0, then least busy, then lowest latency. Returns `best` and `alternatives` with miner SS58, endpoint, model, minimum escrow, free slots, settle rate and session count.

### list_miners
Input: `{ model?, maxEscrow?, minFree?, limit? }` (limit default 20, max 100). Full ranked list.

### cheapest_offer
Input: `{ model?, minSettleRate?, limit? }`

Returns the cheapest miner-signed escrow offers, each with settle rate. Use `minSettleRate: 0.6` to skip cheap-but-unreliable miners.

### plan_session
Input: `{ wallet, mode?, escrow?, miner?, model?, prompt?, maxTokens?, maxDurationSec? }`

- `wallet` — SS58 address, required.
- `mode` — `small` (default, about half the balance clamped to 4–10 FLOP) or `full` (spend the grant in one session).
- `escrow` — exact FLOP amount, for example `4`. Must be at least the miner minimum.
- `miner` — preferred miner SS58; omitted means best affordable candidate.
- `model` — preferred model slug when no miner is given.
- `prompt`, `maxTokens`, `maxDurationSec` — optional overrides.

Returns the plan plus a ready-to-run command:

~~~json
{
  "plan": {
    "miner": { "miner": "<SS58>", "endpoint": "https://...", "model": "qwen/qwen3-14b" },
    "escrowFlop": 4,
    "minEscrowFlop": 3,
    "durationSec": 1200,
    "maxTokens": 512,
    "prompt": "...",
    "command": "FLOP_INDEXER_URL=... flop --network testnet ..."
  },
  "rpc": { "status": "HEALTHY", "p95Ms": 900, "feeMultiplier": 1.1 },
  "warning": null
}
~~~

### wallet_status
Input: `{ wallet }`. Returns free balance, reserved balance, nonce, vouchers, campaign share.

### voucher_balance
Input: `{ wallet }`. Returns agent vouchers, campaign share and network totals.

### rpc_health
Input: `{}`. Returns status, p50/p95, fee multiplier, per-endpoint probes, and advice. Check before opening a session.

### get_live
Input: `{ includeMiners? }`. Compact network snapshot. With `includeMiners: true` it returns the whole directory.

### voucher_mints
Input: `{ wallet, limit? }`. Voucher distribution history: total minted per instrument, mint count, first/last block, recent mints. Use it for a CRM-style account view.

### get_offers
Input: `{ miner, limit? }`. Miner-signed offers from the official indexer: minimum escrow, expiry, max turns, duration.

### channel_events
Input: `{ limit?, miner? }`. Recent compute-channel activity from our own Postgres index: settle, timeout, forceSettle and open events with miner, agent, model, escrow and block.

### channel_stats
Input: `{}`. Open channels in our index plus settled and timed-out counts for the last 24 hours.

### miner_channel_history
Input: `{ miner, hours? }`. Hourly settle, timeout and open counts plus escrow for one miner over 1-168 hours, with recent channel events. Use it to judge current reliability before planning.

## Standard workflow

1. `rpc_health` — if status is CONGESTED, p95 > 6000 ms, or fee > 3×, wait.
2. `wallet_status` — confirm free balance covers escrow plus fees.
3. `pick_best_miner` with `maxEscrow` set to your budget, or `cheapest_offer` with `minSettleRate`.
4. `plan_session` — pass `escrow: 4` (or your budget) and optionally `miner`.
5. Run the returned command locally with your own keystore.
6. Confirm settlement with `wallet_status` or `voucher_balance`; voucher mints equal the settled escrow.

## Reading the numbers

- `settleRate` — settled / (settled + timeouts + expired) on chain. Above 0.7 is strong; below 0.5 is risky.
- `sessions` — sample size. 5 sessions at 100% is weaker evidence than 500 sessions at 80%.
- `freeSlots` — 0 means the miner rejects new sessions; prefer at least 1.
- `busy` — sessions in progress. High busy with free slots is fine; it proves the miner is used.
- `minEscrowFlop` — from the miner's signed offer. The network term is not the miner floor.
- `escrow` — your spend. Voucher earned equals the settled escrow, so a larger escrow is not a larger rate, just a larger position.

## Escrow guidance

- Typical live floors are 2.5–9 FLOP; 1 FLOP is usually refused.
- Small mode targets 4–10 FLOP and half the balance, spreading risk across sessions.
- Full mode spends the grant in one session to pay the channel-open fee once.
- Custom escrow is exact: `escrow: 4` plans 4 FLOP if the miner floor allows it and the balance covers it.
- Never open a session whose escrow exceeds what you can afford to lock until expiry.

## Testnet rules

- Vouchers come only from settled paid inference. Free public inference is unscored.
- No self-mining: agents may not choose their own miner; the network can override routing.
- Fixed-price settlement: rewards follow real compute.
- Testnet FLOP has no monetary value.

## Errors

- `Invalid SS58 address` — check the prefix-42 checksum.
- `Balance ... below the minimum escrow` — claim a faucet grant first.
- `Escrow ... below the miner minimum` — raise escrow or pick a cheaper miner.
- `No live signed offer` — the miner has not published an offer; try another.
- `rate limited` — back off and retry.

## Data sources

Chain RPC for supply and head, the official mailbox for signed offers and reliability, and our server-side directory/cache for miners and holder totals. All external sources are wrapped behind this domain.

Independent community tooling by Greyscope Labs. Not affiliated with Flop Labs.
