It ships a wallet (an MPL Core agent treasury PDA), a capped spend allowance (SPL token delegate to your executive wallet), a policy gate (RulesV1), and a chained receipt feed (ReceiptV1) — all settled through real x402 HTTP payments in SPL stables (USDC, USDT, USDG) on Solana, via any compatible facilitator. Drop it in front of any agent and it can buy, get paid, and prove every transfer happened.

The three surfaces

SurfaceLives atWhat it’s for
SDK@leash/*npm + this repoTypeScript-first kits for buyers, sellers, agents, runner, schemas, and testing.
API — REST + OpenAPIapi.leash.marketPolyglot HTTP surface. Prepare/submit Solana txs, ingest receipts, monetise APIs.
Explorer — protocol UIexplorer.leash.marketSolscan-style search across agents, transactions, receipts, and events. Dual-network.
Pick whichever fits the layer you’re building. They all read and write the same on-chain state, the same receipt schema, and the same event model.

Open-source SDK

  • Packages@leash/schemas, @leash/core, @leash/registry-utils, @leash/seller-kit, @leash/buyer-kit, @leash/runner, @leash/testing
  • Appsweb (playground), docs (this site), seller-demo, buyer-demo, merged-demo, agent-token-demo
  • Scriptsfund-devnet, upload-registration (fetch + validate RegistrationV1 from a URL), e2e-demo, gen-schema-docs
The hosted API and Explorer are operated by Leash and consume the same on-chain primitives these packages produce.

Where to start

  • Quickstart — local stack in 5 minutes (Quickstart).
  • API — drive the protocol from any language (Leash API).
  • Monetise an API you already host — pay-per-call in two HTTP calls (Monetise an existing API).
  • Build an agent end-to-end — the SDK walkthrough (Create an agent).
  • Explorer — what explorer.leash.market shows and how to deeplink (Leash Explorer).
See the repo README.md for the 5-minute demo and environment variables.

For LLMs and coding agents

These docs are designed to be slurped wholesale into your model’s context.
ResourceWhat it gives you
/llms.txtA curated, sidebar-grouped index. Every entry links to the Markdown rendering of the page. Auto-discovered via the Link: rel="llms-txt" HTTP header.
/llms-full.txtThe entire site concatenated into one Markdown file. Drop into a system prompt and you have the whole manual.
/<page>.mdAppend .md to any docs URL to fetch the raw Markdown for a single page (e.g. /api/overview.md).
api.leash.market/openapi.jsonLive OpenAPI 3.1 spec. Feed it to your client generator of choice.
In-page actionsThe header on every page has a “Copy page” / “View as Markdown” / “Open in ChatGPT, Claude, Perplexity” / “Connect to Cursor or VS Code (MCP)” menu.
Building on top of Leash from inside an agent (Cursor, Claude Code, Codex, Replit, Windsurf)? Install the Leash skill so your assistant always has the right primitives at hand:
git clone https://github.com/leash-market/leash ~/leash
mkdir -p .cursor/skills && ln -sf ~/leash/skills/leash .cursor/skills/leash
# (or: .claude/skills, .codex/skills, .windsurf/skills — see skills/leash/INSTALL.md)
The skill ships a curated SKILL.md (mental model + workflow), a REFERENCE.md (full surface map — every SDK package, every API route, every env var), and an EXAMPLES.md of copy-paste snippets for the most common flows. Source: leash/skills/leash.