{"uid":"cap_A8tdNyk7eB5ved4eeFtFV","slug":"agent402-uk-hex-encode-decode-35de6156","name":"Agent402 UK Hex Encode/Decode","description":"Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.","url":"https://agent402.co.uk/v1/utils/hex","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Text or hex string"},"action":{"type":"string","description":"encode | decode"}}},"responseSchema":{"type":"json","example":{"hex":"68656c6c6f","action":"encode"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_mXprdM8AJ5TLq_NqAKmCA","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Encodes UTF-8 text to hexadecimal or decodes hex strings back to UTF-8 text","exampleAgentPrompt":"Hex encode the text 'Hello, World!' for me so I can safely pass it through an agent pipeline.","exampleUseCases":[{"title":"Encoding message for agent transport","prompt":"Can you hex encode the string 'payment_ref:TX_9921AB' so I can include it safely in an agent-to-agent message payload?"},{"title":"Decoding an unknown hex value","prompt":"I received this hex string '48656c6c6f20576f726c64' and I need to know what it actually says — can you decode it back to plain text?"},{"title":"Preparing binary-safe config value","prompt":"I need to hex encode the UTF-8 text 'user:admin|role:superuser' so I can embed it as a binary-safe value in a config header without corruption."}],"resultDescription":"Returns a JSON object containing the resulting hex string (for encode) or decoded UTF-8 text (for decode), along with an echo of the action performed.","failureModes":["Invalid action value (not 'encode' or 'decode') may return an error or unexpected result","Malformed hex input (odd-length or non-hex characters) during decode may cause parsing failure","Missing 'text' or 'action' fields in request body likely returns a 400-style error","Non-UTF-8 byte sequences in hex may fail to decode cleanly"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, stateless hex encode/decode utility without spinning up a local library — especially useful in agent pipelines where binary-safe text transport is needed and base64 is not available or not preferred. Ideal for converting strings to hex for embedding in URLs, headers, or structured payloads, or for decoding hex values received from external systems.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:46:35.770Z","isFirstParty":false}