veriql-agentkit
v0.3.0
Published
Veriql for Coinbase AgentKit: check a recipient (OFAC, Drain Watch, Tether/Circle freeze) before an agent pays, check a USDT transfer goes through before it is sent, decode a signing request before it signs, and load a free denylist for wallet policies.
Maintainers
Readme
veriql-agentkit
Veriql checks for Coinbase AgentKit agents that move money.
| Action | When the agent should call it | Cost |
|---|---|---|
| check_payee | Before sending funds to any address. OFAC SDN sanctions, the Drain Watch list of known drainer and scam addresses, and whether Tether or Circle has frozen the address (read from the issuer's own contract). EVM, Solana, Bitcoin, Tron. | $0.01 |
| check_send | Before sending USDT on Tron or Ethereum. Pass from, to and optionally amount. Answers both questions in one call: will it go through (frozen sender, unactivated account, too little USDT, too little TRX or ETH for the fee, read off the chain with the exact fee), and should it go there (recipient against OFAC, Drain Watch and Tether's freeze list). Tether checks the sender, not the recipient, so USDT sent to a frozen address confirms and can never leave. Answers do_not_send, will_fail, may_fail, goes_through or incomplete. | $0.01 |
| check_signature | Before signing anything. Decodes approvals, Permit and Permit2, EIP-7702 delegations, transfers and revokes, and checks whoever gains the power. Answers block, warn or allow. An undecodable payload is block and is not charged. | $0.01 |
| check_denylist | A free, instant screen against OFAC SDN plus Drain Watch, cached for an hour. | free |
Veriql is read-only. It never asks for a key, never signs and never moves funds.
Install
npm install veriql-agentkitAgentKit 0.10 itself needs Node 22 or later.
import { AgentKit } from "@coinbase/agentkit";
import { veriqlActionProvider } from "veriql-agentkit";
const agentkit = await AgentKit.from({
walletProvider,
actionProviders: [veriqlActionProvider()],
});Paying for calls
There are two ways to pay. Pick one:
- x402, no account (the default). The agent pays each call itself in USDC on Base or Solana, from the wallet AgentKit already holds. A payment option priced above
maxPaymentUsdc(default0.05, envVERIQL_MAX_PAYMENT_USDC) is refused before anything is signed. - An API key. Pass
apiKeyor setVERIQL_API_KEY. Calls then spend prepaid credits and the agent never signs a payment. A free key with 250 credits is at https://veriql.app/api/checkout?pack=free.
veriqlActionProvider({ apiKey: process.env.VERIQL_API_KEY, maxPaymentUsdc: 0.05 });What the answers mean
no_known_riskorallowmeans nothing adverse was found when the check ran. It is not a guarantee.incompletemeans a check could not run. Treat the address as unverified, not as clean.goes_throughmeans every check on both ends answered and nothing blocks the transfer. It's not a guarantee about the recipient.will_failanddo_not_sendstand even when another check could not run.- Any error comes back as
{"error": true, ...}and tells the agent to treat the input as unverified. A failure is never reported as clean.
Tests
npm test # builds with tsc, then runs node --test on the compiled output (Node 22+)The tests run against dist/, not the TypeScript sources. AgentKit's @CreateAction decides whether an action receives the wallet by reading the parameter-type metadata that only tsc emits (emitDecoratorMetadata). A runner built on esbuild would silently register every action as walletless.
Contributing this upstream
src/veriql/ follows the layout of AgentKit's own typescript/agentkit/src/action-providers/<name>/ folders: schemas.ts, constants.ts, veriqlActionProvider.ts and index.ts. To move it into the AgentKit repo:
- Import
ActionProvider,CreateActionand the wallet providers relatively (../actionProvider,../actionDecorator,../../wallet-providers) instead of from@coinbase/agentkit. - Drop the
.jsimport suffixes. - Add
export * from "./veriql";toaction-providers/index.ts.
Licence
MIT
