Guides

Build an agent

Give your agent the ability to discover, authorize, run, and publish adaptors. Pick the surface that fits your agent — all are keyless (tools return unsigned transactions; the user signs).

#1 · Point it at the docs index (zero integration)

Any agent that can fetch a URL can follow /llms.txt. It's a short, machine-readable index that links the API shape (/llms/api.md) and the publish flow (/llms/publish.md). Nothing to install — the agent reads it and knows how to call the endpoints.

#2 · MCP server (Claude Code / Codex / Cursor / any MCP client)

claude mcp add sup-marketplace -- bun /path/to/sup-marketplace/src/mcp.ts
#   env it reads: SUP_URL (the host), SUP_NETWORK (testnet|mainnet)

It exposes four tools:

toolinputreturns
search_adaptorsthe live catalog
introspect_adaptor{ packageId }witnesses + ops + each arg's classified role
infer_call_spec{ packageId, entry }mined object ids + scalars (singleton vs candidates)
draft_listing{ packageId, name, summary, category?, upload? }manifest + hash + unsigned register

A typical "publish this for me" flow: the agent calls draft_listing, shows you the drafted name/summary/serviceType/executableOps, you confirm, and it hands you the unsigned register to sign.

#3 · CLI (any shell agent)

export SUP_URL=$SUP SUP_NETWORK=testnet
sup-adaptor catalog
sup-adaptor introspect 0xPKG
sup-adaptor infer 0xPKG swap_a_to_b
sup-adaptor draft 0xPKG --name MySwap --summary "…" --category Swap --upload

draft prints a ready sui client ptb … registry::register … line — the agent runs it to sign with the user's local sui keypair.

#4 · SDK (if your agent runs code)

import { createSupMarketplace, buildRegisterTxFromDraft } from "@workspace/sup-marketplace";

const sup = createSupMarketplace({ baseUrl: SUP_URL, network: "testnet" });
const draft = await sup.draft({ packageId, name, summary, category: "Swap", upload: true });

// the agent presents the draft, the user approves, then signs:
const tx = buildRegisterTxFromDraft(draft);   // unsigned @mysten/sui Transaction
await wallet.signAndExecuteTransaction({ transaction: tx });

#Signing in a non-browser agent

Because tools return unsigned transactions, a shell agent (Claude Code, Codex) signs with the user's local sui keypair:

  • run the sui client ptb … the CLI prints, or
  • build the tx with the SDK, serialize it, and sign with sui keytool sign.

A browser agent signs through the dApp's connected wallet. Either way the key never leaves the user's environment.

#Discover → authorize → run (full flow)

To actually use a community adaptor (not just publish), the agent:

  1. finds it (search_adaptors),
  2. drafts an authorize transaction — grant_service_coin<Witness, Coin> (see the SDK's buildAuthorizeTx) — the user signs it,
  3. resolves the op's call spec and drafts the run transaction (resolveOpCall + buildAdaptorOpTx) — the user signs it.

#Skill

skills/sup-marketplace/SKILL.md is a drop-in playbook (discover / authorize / run / publish) referencing the MCP, CLI, HTTP, and sui signing — for any agent that loads skills.

Keyless, always. An adaptor can only ever move funds the owner authorized (grant_service_coin), bounded by the on-chain allowance — even one your agent found in the open registry. Review unfamiliar listings (see Protocol → what to check).

Full surface: SDK / CLI / MCP.