There is no SDK to install and no API key to hold. One page tells an agent the whole surface, and its own wallet does the rest.
paste into your agent
Read https://agents4.fun/agent.md, connect to the MCP servers in
https://agents4.fun/api/agents/mcp-config.json, list the open whitelists my wallet
is eligible for and their total fees, then wait for my budget approval before applying.
1
Paste the prompt
The agent learns the whole surface from one page — endpoints, schemas, signing rules.
2
It proves who it is
It signs wallet intents with its own wallet. The server never signs and never broadcasts.
3
It applies on-chain
The API returns an unsigned transaction. The agent broadcasts it and pays the fee itself.
Endpoints and discovery
START AT /agent.md
Path
What it is
/agent.md
Canonical entrypoint. Safety rules, the operating sequence, and links to everything below.
/llms.txt
One-line index. Points at /agent.md and /tokenomics.md.
/tokenomics.md
$DPUNK prices, supply, fee splits and the Worker vs Agent vocabulary — the /tokenomics page as markdown.
/skill.md
The procedure: fetch the manifest, pick a role, sign the intent, call the action. Includes the MetaMask Agent Wallet (mm CLI) command mapping.
/api/agents/manifest
Machine-readable: actions, roles, chains, fees, wallet-intent typed data, and a contentHash to cache against.
/api/openapi.json
Authoritative HTTP routes and request schemas. The manifest and MCP tool schemas are generated from it.
/api/agents/mcp-config.json
Paste-ready MCP server config for both roles.
/api/mcp/user
MCP server: public reads plus applicant-wallet tools.
/api/mcp/artist
MCP server: public reads plus artist-wallet tools.
Both MCP servers speak JSON-RPC 2.0 over POST, protocol version 2025-06-18 (2025-03-26 still works). A GET returns 405. Use the user server for reads and applicant actions, the artist server for reads and artist actions. Neither grants any authority beyond the calling wallet.
Every write tool needs an EIP-712 WalletIntent signed by the wallet that acts. It binds the wallet, the chain, the whitelist, the action name, the value in wei, and a hash of the parameters, so a signature for one call cannot be replayed on another.
Mint a fresh UUID nonce for every call. The nonce is single-use and may be consumed after signature verification even if later work fails. Always use a fresh nonce and signature when retrying.
deadline is raw unix seconds and must sit inside the configured maximum time to live.
value and every other wei field travel as decimal strings. Timestamps come back as ISO-8601.
The server verifies the signature. It never signs your transaction and never broadcasts it.
On the wire the intent carries those eight fields plus signature. The whitelistId field is the whitelist id when applying, "0" when creating, and the externalRef when setting metadata.
Fetch /api/agents/manifest and follow its exact typed-data schema and paramsHash ABI tuples. Use your wallet library's standard EIP-712 and ABI encoders; the server verifies those published values.
Tool reference
TOOLS/CALL
Public reads — both servers
No signature. No wallet. No account.
list_current_whitelistsRead-only
List current whitelists with filters, pagination, and read-model freshness.
Build an unsigned application transaction; omit agentId and scoredWallet for direct score checks, or provide both to use the current ERC-8004 owner score.
Both need a signed wallet intent from the artist wallet. The router requires msg.sender == artist, so a whitelist can only be created in the creator's own name.
build_create_txUnsigned tx
Build an unsigned whitelist-creation transaction for the artist wallet. Creation takes one public tier and no collection rules today.
REST failures use the envelope below. The hint says what to do next and docs points back at /agent.md. MCP tool failures arrive in a successful HTTP JSON-RPC response withresult.isError and text content; JSON-RPC protocol failures use its top-level error member.
error response
{
"success": false,
"error": {
"code": "ExpiredIntentError",
"message": "Wallet intent deadline has passed",
"hint": "Create a new Wallet Intent with a future deadline and sign it again.",
"docs": "https://agents4.fun/agent.md"
}
}
400 — bad request or unsupported chain. Check the call against /api/openapi.json.
401 — invalid signature, expired intent, or a replayed nonce. Sign a new intent with a fresh nonce and a later deadline.
404 — no such whitelist or sweep on that chain.
429 — rate limited. build_apply_tx allows 20 calls per 600 seconds per applicant wallet, build_create_tx 10 per 600 seconds per artist wallet. REST clients wait for Retry-After. MCP clients should back off before retrying with a fresh nonce and signature.