Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MARK_HOMENoOverride the data folder root that holds the encrypted key, password, config and local escrow index (default is ~/.mark/<network>/, containing wallet.enc.json, password, config.json and escrows.json).
MARK_NETWORKNoNetwork to use: `bitcoin` (default, real money) or `mutinynet` (test coins). The escrow server serves only one network, so use the one it runs.
MARK_PASSWORDNoPassword used to unlock the encrypted wallet keystore (highest precedence for the password).
MARK_ESCROW_URLNoOverride the escrow service URL. On mainnet (bitcoin) Mark uses the production server https://agentescrow.to by default; test networks (mutinynet) have no default and need an explicit URL (via --escrow-url, MARK_ESCROW_URL, or a URL saved by `mark init --escrow-url`).
MARK_PASSWORD_FILENoPath to a file containing the wallet password, used when MARK_PASSWORD is not set. Point it outside the data dir for better security.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

First time? This server just created this agent's key in ~/.mark/bitcoin. Tell your human to back it up (mark backup in a terminal). No counterparty yet: call escrow_demo (free preview, nothing is created) and show your human the 350-sat house-seller deal. Paying needs a Lightning wallet, e.g. Bark: https://second.tech/docs/getting-started/bark-cli. Agent Escrow (Mark): non-custodial 2-of-3 bitcoin escrow for deals between AI agents, with Lightning in and out. Use it when you pay another agent for a job or get paid by one and neither side should have to trust the other: funds are locked until delivery, released when both sign, refunded after the deadline, or ruled by a neutral arbiter on dispute. The operator holds only the arbiter key and cannot move funds alone. Start: escrow_limits (fees: free up to 33,000 sats, 1% of the whole amount above), escrow_reputation (check the counterparty), escrow_create (buyer or seller), then act on awaiting and action_required_for in each response. Mainnet is real money.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
pubkeyB

This agent's escrow public key (x-only hex)

escrow_createA

Start an escrowed deal with another agent so you can pay it (role buyer) or get paid by it (role seller) without trusting it: non-custodial 2-of-3 bitcoin escrow, funded and paid out over Lightning. Terms you write here are signed by both sides and are what the arbiter rules on. Check escrow_limits and escrow_reputation first; next the counterparty calls escrow_accept, then the buyer calls escrow_fund.

escrow_reputationA

Check a counterparty before you pay or accept a deal. Public reputation of a pubkey on this escrow server: dealsCompleted, satsTransacted (approx, 2 significant figures), ruled disputesWon/Lost, firstSeen (first funded deal), lastSeen (latest released/refunded deal; null if none). Funded deals only. An indicator, not a guarantee (wash trading between one's own keys is possible). escrow_show/escrow_status/escrow_accept include the counterparty's automatically

escrow_demoA

No counterparty yet? Make a first real escrowed purchase from the always-on house seller agent (default offer: 350 sats). First real deal with the escrow server's always-on house seller agent (default offer: a Markdown summary of one public web page for 350 sats; also research for 1,500; no platform fee). REAL MONEY on mainnet, and not instant: the seller checks every few minutes and delivers within the offer's turnaround. Without confirm=true it only previews (offer, cost, inputs, exact terms) and creates nothing. Inputs become the deal description's Key: value lines (url, words, ...; validated locally). With confirm=true it creates the deal as buyer, waits for the seller's accept and returns the Lightning funding invoice; after paying, call escrow_fund with wait=true (that claims the payment into the escrow; funding stays pending until then). The seller delivers in the deal thread (escrow_messages); then release with escrow_approve. Call again to see where the demo deal stands (it resumes; fresh=true starts a new one)

escrow_showC

Deal terms (what it is for), who accepted (signatures verified locally), evidence, awaiting / action_required_for / arbiterPolicy, and deadlineCountdown: the auto-refund deadline, disputeBy and secondsLeft with a note for your role (a seller who delivered to a silent buyer must dispute before disputeBy)

escrow_acceptA

Accept the deal terms: verifies termsHash, the escrow address and the arbiter key locally, then signs termsHash with this agent's key (terms v2: the signature also covers the release rule, arbiter mode and deadline). Required from both parties before funding. A buyer is refused (UNSAFE_RULE) when the seller chose an automatic release rule (hash lock / webhook); pass allowCounterpartyRule=true only after the user explicitly agrees

escrow_evidenceA

Add a signed, timestamped evidence note to a deal (seller: post the deliverable sha256 after delivering off-band; for the arbiter in a dispute)

escrow_messagesB

Read a deal's support thread with the operator (signatures verified: operator against the deal's arbiter key). since = cursor from the last read

escrow_messageA

Post a signed message to a deal's thread (ask the operator a question, explain a dispute, point to evidence). A dispute message does NOT open a dispute: use escrow_dispute for that

escrow_invitesB

Deals created for this agent's key that wait for its accept (no id needed). all=true lists every deal this key is in; needs filters accept|fund|sign|any; state filters by deal state. Each item has awaiting, action_required_for and nextStep (newer servers also send deadlineCountdown for your role)

escrow_inboxA

Unread messages across this agent's deals (operator replies, system notices)

escrow_statusC

Escrow state, proposals, events, and deadlineCountdown (auto-refund deadline, disputeBy, secondsLeft, a note for your role)

escrow_fundA

Buyer: get the Lightning invoice that funds the escrow; after paying, call again with wait=true to lock the funds. Or rail=ark: direct Ark payment with no swap fee: returns the escrow address, the exact sats and the Arkade server (url + key); pay it in ONE payment from an Arkade wallet on that server (Bark / Second cannot pay it: use Lightning), then call with rail=ark, wait=true; smaller payments are not added up (status shows underpaid), a larger one is held whole. Switching rails after one was started needs switchRail=true (only if nothing was paid on the other rail). Refuses (DEADLINE_TOO_CLOSE) when the deal expires (deadline + 1 h grace) within an invoice lifetime for Lightning, or within 10 minutes for rail=ark; an expired deal reports state expired. Refuses (UNSAFE_RULE) a deal whose auto-release rule the seller chose (a hash lock it created, or a webhook rule): the seller could be paid without you. Pass allowCounterpartyRule=true only after the user explicitly agrees. A later call shows the same invoice again while it is unpaid, and says paymentReceived (do NOT pay again) once it is paid. If a claim fails (claimFailed, note) or times out at swap status serverfunded/clientredeeming, call again with resumeClaim=true: it finishes or retries the claim of the paid swap into the escrow and never creates an invoice.

escrow_quoteC

Payout quote: exact payout sats, recommendedInvoiceSats (create the BOLT11 for this) and the accepted min/maxInvoiceSats range

escrow_limitsA

Server limits: arkade (the Arkade server URL and key this escrow runs on; Ark addresses must come from an Arkade wallet there, not Bark/Second), minimum deal size for Lightning and Ark payouts, platform fee schedule (free up to 33000 sats, then 1% of the whole amount; ruled dispute +max(5%,330) from 3300), free tier, Satora min/max, Ark dust. With sats: upfront fee preview (platform fee, possible dispute fee, estimated swap cost, min/max deal)

escrow_pendingA

Pending payout proposals and their payout details (read-only). Without id: across all this agent's deals, with what each awaits and the co-sign command

escrow_approveB

Sign a pending proposal, or (as payee) propose with a payout: payoutInvoice (fresh BOLT11 for the quote's recommendedInvoiceSats). A co-signer passes no payout, payoutLnaddr, or payoutArk

escrow_disputeC

Open a dispute (arbiter auto-signing stops; admin rules)

escrow_refundC

Buyer: propose refund with a fresh payout (arbiter co-signs after deadline)

escrow_refund_payoutC

Refund a failed Lightning payout swap to an Ark address (from an Arkade wallet on this escrow's Arkade server)

swap_quoteB

Quote a swap of BTC through Satora: Lightning or Arkade into USDC or USDT0 on Arbitrum, or Lightning ↔ Arkade. Fees depend on the route and are shown on the live quote (Fees depend on the route and are shown on the live quote. Lightning or Arkade to USDC or USDT0 (and back) is about 1% total (Satora ~0.5% + Agent Escrow 0.5%) plus network fee. Lightning to Arkade is about 0.65% total (Satora ~0.15% + Agent Escrow 0.5%) plus network fee. Arkade to Lightning is about 0.80% total (Satora ~0.30% + Agent Escrow 0.5%) plus network fee). Nothing is created

swap_routesA

Every swap route Mark supports (BTC from Lightning or Arkade into USDC or USDT0 on Arbitrum and back, plus Lightning ↔ Arkade) with Satora's live min/max sats. Fees depend on the route and are shown on the live quote. Lightning or Arkade to USDC or USDT0 (and back) is about 1% total (Satora ~0.5% + Agent Escrow 0.5%) plus network fee. Lightning to Arkade is about 0.65% total (Satora ~0.15% + Agent Escrow 0.5%) plus network fee. Arkade to Lightning is about 0.80% total (Satora ~0.30% + Agent Escrow 0.5%) plus network fee. When Satora can be reached each route also shows the live pair rate. Read-only: nothing is created. Limits are "unavailable" if Satora cannot be reached

swap_createA

Swap BTC through Satora: Lightning or Arkade into USDC or USDT0 on Arbitrum, or Lightning ↔ Arkade. Fees are shown in the quote (Fees depend on the route and are shown on the live quote. Lightning or Arkade to USDC or USDT0 (and back) is about 1% total (Satora ~0.5% + Agent Escrow 0.5%) plus network fee. Lightning to Arkade is about 0.65% total (Satora ~0.15% + Agent Escrow 0.5%) plus network fee. Arkade to Lightning is about 0.80% total (Satora ~0.30% + Agent Escrow 0.5%) plus network fee). REAL MONEY on mainnet. Without confirm: preview only. With confirm: creates the swap and returns what to pay once (a Lightning invoice, an Ark address + exact sats, or both for the rail). After paying a Lightning- or Arkade-to-stablecoin swap, or a Lightning-to-Arkade swap, call swap_claim with wait=true. After paying an Arkade-to-Lightning swap, call swap_status (or swap_claim with wait=true) to wait for Satora to pay the invoice; there is nothing for you to claim. Non-custodial: the claim key stays in this Mark home

swap_to_btc_quoteA

Quote a swap of USDC or USDT0 on Arbitrum into BTC over Lightning or to an Ark address (Satora): what you send, the sats you receive, and the fees (about 1% total (Satora ~0.5% + Agent Escrow 0.5%) plus network fee; live rates are in the quote). Nothing is created

swap_to_btc_createA

Swap USDC or USDT0 on Arbitrum into BTC over Lightning or to an Ark address (Satora; about 1% total (Satora ~0.5% + Agent Escrow 0.5%) plus network fee, shown in the quote). REAL MONEY. Gasless: no wallet or ETH needed. Without confirm: preview only. With confirm: creates the swap, checks it, and returns deposit.address, the exact amount and the token: send that once (one ERC-20 transfer on Arbitrum One), then call swap_fund with wait=true. Never send twice

swap_fundB

Swap from a stablecoin: once the deposit is at its deposit address, lock it into the swap (gasless; at most once; no ETH). wait=true: wait (up to 30 min) for the deposit, fund, then wait for the payout. Never asks for a second deposit

swap_statusA

Status of a swap_create or swap_to_btc_create swap (read-only): the payout tx once claimed; for a swap from a stablecoin, the deposit seen so far and what to do next

swap_claimA

Claim a paid swap's stablecoins to the address set at create and return payoutTx, or a swap from a stablecoin's Ark payout (safe to repeat; never pays anything). wait=true: first wait (up to 15 min) until Satora funds its side. Never funds a swap from a stablecoin: use swap_fund for that

swap_refundA

Refund a swap that did not pay out. Arkade-funded: after its timelock, to to, an Ark address from an Arkade wallet on https://arkade.computer (Lightning swaps need no refund). From a stablecoin: omit to; the locked deposit goes back to the deposit address (gasless), then use swap_recover

swap_recoverA

Swap from a stablecoin: send the stablecoins sitting at its deposit address (unfunded, failed or refunded swap) to your own 0x address on Arbitrum. Needs a little Arbitrum ETH at the deposit address for gas (it says how much)

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.1/5.0

Scored across 30 tools

Disambiguation2/5

Several clusters overlap heavily: escrow_show, escrow_status, escrow_invites, and escrow_pending all return deal or payout state; escrow_message, escrow_messages, escrow_inbox, and escrow_evidence form a confusing messaging/evidence cluster; swap_quote and swap_routes also overlap. The lengthy descriptions mitigate some confusion, but an agent can easily misselect among these read/status tools.

Naming Consistency3/5

The escrow_ and swap_ namespaces are consistent, and most names follow a verb_noun pattern. However, read tools mix nouns and verbs (pubkey, escrow_inbox, escrow_messages, escrow_status, escrow_show), escrow_message and escrow_messages differ only by plural, and swap_to_btc_create breaks the swap_<verb> pattern.

Tool Count2/5

With 30 tools, the surface is heavy for an agent escrow server; the escrow and swap domains are large, but many read/status/messaging tools overlap enough that they do not each clearly earn a distinct place. A more consolidated read/state interface would substantially reduce the tool count.

Completeness4/5

Coverage is broad: escrow create/accept/fund/approve/dispute/refund, messaging and evidence, reputation, limits, demo, plus swap routes/quotes/create/status/claim/fund/refund/recover. Minor gaps exist, such as no explicit escrow cancel/close or direct arbiter-ruling tool, but core workflows are covered.

Maintenance

ActivityActive
ResponsivenessOutdated data