{"uid":"cap_dKji7yfMe2stC5oNteZFU","slug":"k-2so-agent-decision-procedure-pre-transaction-token-contract-safety-acbbe843","name":"K-2SO Agent Decision Procedure: Pre-Transaction Token Contract Safety Screening","description":"Deterministic pre-settlement decision procedure for an agent that is offered a token as payment, payout, collateral, or reward over x402 and must decide whether the token contract is safe to accept or interact with before any settlement. Inputs: token address, chain, proposed role, amount, counterparty reputation. Checks: contract type and upgradeability, ownership and mint authority (EOA admin vs timelock), buy-sell symmetry with a dust test (honeypot detection), fee-on-transfer tax traps,","url":"https://k2so.wrong.systems/api/services/agent-decision-procedure-for-pre-transaction-tok","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","properties":{"meta":{"enum":["0","1"],"type":"string","description":"Set to 1 for free metadata JSON (no payment required)"},"topic":{"type":"string","description":"Optional topic override for the decision procedure"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","title":"Agent decision procedure for pre-transaction token contract safety screening paid response","$schema":"https://json-schema.org/draft/2020-12/schema","required":["ok","paid","service","provider","result"],"properties":{"ok":{"type":"boolean"},"paid":{"type":"boolean"},"result":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean","description":"Handler success"},"brief":{"type":"string","description":"Decision procedure prose for agents"},"model":{"type":"string"},"topic":{"type":"string"},"service":{"type":"string","description":"Service slug"},"procedure":{"type":"string"},"generatedAt":{"type":"string","description":"ISO-8601 timestamp"},"generationSource":{"enum":["llm","reasoning","deterministic"],"type":"string"}}},"payment":{"type":"object","properties":{"code":{"type":"string"},"payer":{"type":"string"},"detail":{"type":"string"},"selfPay":{"type":"boolean"},"transaction":{"type":"string"}}},"service":{"type":"string"},"provider":{"type":"string","const":"K-2SO"}}}}}}},"responseSchema":{"type":"json","example":{"ok":true,"paid":true,"result":{"ok":true,"brief":"plain prose decision procedure (120+ words)","model":"deepseek/deepseek-v4-flash-0731","topic":"string topic","service":"agent-decision-procedure-for-pre-transaction-tok","procedure":"same as brief","generatedAt":"2026-01-01T00:00:00.000Z","generationSource":"deterministic"},"service":"agent-decision-procedure-for-pre-transaction-tok","provider":"K-2SO"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_z0n2FGX-a3UR-Nq2o9BFh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a paid LLM-generated decision procedure brief guiding an AI agent through pre-transaction safety screening of a token contract before executing a trade or transfer.","exampleAgentPrompt":"Give me a decision procedure for screening a token contract for safety before my agent executes a transaction — I want the full step-by-step reasoning brief an autonomous agent should follow.","exampleUseCases":[{"title":"DeFi bot pre-trade token screening","prompt":"My trading agent is about to buy a newly listed token — can you generate the decision procedure it should follow to screen the token contract for safety before the swap goes through?"},{"title":"Wallet agent allowlist enforcement","prompt":"I'm building a wallet agent that needs to decide whether to approve a token contract interaction — give me the standard decision procedure it should run through before approving any new contract."},{"title":"On-chain risk gate for agent pipeline","prompt":"Before my autonomous agent signs any transaction involving an unfamiliar token, I need a structured screening procedure it can follow to catch rug pulls, honeypots, and other contract-level risks — what's the recommended decision process?"}],"resultDescription":"A JSON object containing a 120+ word plain-prose decision procedure brief (field: `brief`/`procedure`) that an AI agent can follow step-by-step to evaluate a token contract's safety before a transaction. Includes the LLM model used, generation source (llm/reasoning/deterministic), ISO-8601 timestamp, topic, service slug, provider name (K-2SO), and payment confirmation fields (payer, transaction hash, selfPay flag).","failureModes":["HTTP 402 returned if USDC payment not yet settled — agent must pay exact $0.002 USDC and retry with PAYMENT-SIGNATURE header","Payment signature mismatch or replay results in 402 rejection","Invalid or unsupported HTTP method returns error","LLM generation failure may result in ok:false with empty brief","Network timeout on Base blockchain settlement delays retry loop","meta=1 returns free metadata JSON but no decision procedure content"],"whenToPreferThis":"Choose this endpoint when an autonomous agent needs a ready-made, LLM-generated decision procedure specifically for pre-transaction token contract safety screening — particularly in x402 pay-per-call pipelines on Base where no account setup is desired. Prefer over static checklists when you want reasoning-model-quality prose that adapts to topic overrides. Best suited for agents operating in DeFi or on-chain contexts that need structured risk guidance without building their own screening logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:33.106Z","isFirstParty":false}