Feature request: Pre-trade risk governance layer
With 380+ tools including swap, lending, and bridge execution, agents can autonomously move funds without position sizing limits or exposure caps. A pre-execution risk check would make agenti safer for autonomous operation.
Thank you, @likidodefi — this is a worthwhile safety enhancement. Keeping it open. A strong implementation should define enforceable per-tool/per-wallet limits (amount, slippage, exposure, chain/token allowlists), fail closed before signing, provide an auditable denial reason, and include tests proving execution tools cannot bypass the policy layer.
This looks like a good fit for a narrow pre-sign authorization hook rather than a second wallet policy engine.
There is a concrete seam in packages/sdk/src/pay.ts: after Agenti has parsed and selected the exact x402 requirement, but before signEVMPayment() creates the authorization. An optional callback at that boundary could receive the selected amount, asset, network, payee, resource and caller context. Only ALLOW would continue; refusal, approval-required, timeout, malformed output or receipt mismatch would create no signature.
We have a live non-custodial implementation of that pattern in Varyntiq. It returns ALLOW, BLOCK or REQUIRE_APPROVAL plus an expiring receipt bound to the exact request. It never receives wallet keys and does not sign or settle payments.
Public integration contract and independent evaluator: https://mercadosclaro-eng.github.io/ai-payment-control-plane/integration.html https://github.com/mercadosclaro-eng/ai-payment-control-plane/tree/main/integrations/evaluation
If this direction is useful, I can prepare a small opt-in PR limited to the x402 pay() path, preserving current behavior when disabled, with tests for ALLOW, BLOCK, REQUIRE_APPROVAL, network failure, timeout, expiry and receipt mismatch. No adoption or endorsement is assumed.
Thanks for keeping this open. We have verified a no-funds compatibility flow for Varyntiq at the packages/sdk/src/pay.ts boundary. It receives the selected amount, asset, network, payee and resource; only ALLOW continues, while BLOCK, REQUIRE_APPROVAL, timeout, malformed output or receipt mismatch fail closed before signEVMPayment. No keys, funds or production credentials are required. Would you be willing to run this against a test fixture and confirm whether the hook contract is usable? We can provide a minimal adapter and a short result note.
Interesting discussion. I’m building SAVER Verifier, an x402 v2 API for source-backed factual claim verification.
I agree that enforceable limits, allowlists, and fail-closed authorization should remain separate from external verification.
One complementary use case could be an optional evidence check when an agent’s proposed action depends on a factual claim obtained from external content or another agent.
For example:
- An agent receives a factual claim relevant to a planned action.
- It requests independent verification through SAVER.
- SAVER returns a structured result with supporting sources.
- The agent uses that evidence as one input to its decision.
SAVER does not currently provide token risk scoring, transaction simulation, or wallet authorization policies.
Would an optional external evidence-verification step be useful alongside Agenti’s proposed pre-sign controls, or would that belong at a higher level in the agent workflow?
Repository: https://github.com/SAVER-SI/saver-verifier