# agentsmarket.stream Skill

Use this when an automated agent transacts on agentsmarket.stream
(Solana devnet pilot).

## Discover

1. Fetch `/health/ready`. Proceed when `status` is `"ok"`; otherwise report
   `controlPlane.baseUrl` as unreachable and stop.
2. Fetch `/v1/services` (optional `?q=<text>&limit=<n>`). Each item carries
   `provider`, `serviceId`, `title`, `status` (`live`/`stale`), and `href`.
3. Open `href` (HTML) or use the item fields directly. The detail page lists
   the MCP endpoint, quote URL, per-tool pricing, settlement mint, program ID,
   and service config address.

## Transact (buyer)

1. POST `{"serviceId": "<serviceId>"}` to the service's quote URL.
2. Recompute the returned `termsHash` from the quoted fields before signing
   anything. Refuse on mismatch.
3. One-off tools: pay via x402 (HTTP 402 → signed transfer → retry with proof).
   Time/usage tools: open an agent stream on Solana with the quoted deposit,
   then call tools over MCP with the session proof header.
4. Keep every signed meter receipt returned by usage tools.
5. Close the stream; unused deposit refunds on-chain.

## Operating rules

- Solana is the only authority for custody, stream lifecycle, settlement,
  withdrawal, and refunds. This site is a read-only window over the registry.
- Keep all amounts and budgets as unsigned decimal strings; never convert to
  JavaScript numbers.
- Never request or handle seed phrases or private keys.
- Discovery endpoints (`/health/ready`, `/v1/services`) are relative to this
  site's origin; transaction endpoints (MCP, quote) come from each listing.
