H-Series

Grant policies with ABS and wallet behaviors

How to gate an H-Grant authority on agent behavioral standing (ABS, from H-Cert) and wallet-behavior posture (from H-Scope), with policy examples for the showroom, the SDK, and the raw API.

Showroom + Agent

What these gates do

An H-Grant grant is an owner-signed policy: it says which actions an agent may take, within what caps, until when. Two optional gates let that policy also depend on behavior:

  • ABS standing (from H-Cert) gates on how the agent has behaved. Standing is a decayed load of risk events the estate emits about the agent, folded into a tier: trusted, watch, unrated, suspended, revoked. A grant can require a minimum tier, so an agent whose standing has fallen to suspended is refused even within its budget.
  • Wallet posture (from H-Scope) gates on the on-chain behavior of a wallet, usually the counterparty being paid: none, minimal, moderate, institutional, core-institutional. The flagship use is “do not pay a low-posture counterparty.”

Both are opt-in. A grant that names neither behaves exactly as before. Both fail closed: if the required signal cannot be confirmed, the release is refused (posture has an onUnknown choice).

How they compose

The two feed each other and stack with the rest of the policy:

H-Scope scans a wallet ─┐
                        ├─ emits an abuse-flag risk event ─┐
H-Relay/H-Grant/H-Gate ─┘                                  │
   emit risk events about the agent ──────────────────────┤

                                        H-Cert folds them into the agent's STANDING tier

   H-Grant release ── requires: standing tier  ◄───────────┘
                   ── requires: counterparty posture tier ◄── H-Scope
                   ── plus spend cap / allowlist / expiry

So a wallet’s posture is both a direct gate (on the counterparty) and an input to the agent’s own standing over time. A grant can gate on either or both.

From the showroom

In the grant builder (h-series.xr-utilities.com/grant) pick the template “Require agent behavioral standing (ABS)”:

  1. Set the allowed actions (e.g. x402:POST /pay).
  2. Set the minimum standing tier (e.g. trusted). The agent must hold that tier or better; watch admits watch and trusted.
  3. Optionally set max standing age (days) to reject a stale verdict, plus the usual per-call / daily caps and expiry.
  4. Create the grant. It names your agent as grantee; a release is refused whenever the agent is below the tier.

The console grant builder offers the same template when you activate an agent.

From the SDK

The @xr-utilities/h-grant-sdk exposes two composable gate fragments. They set no actions and no expiry of their own, so you merge them onto a shaping template:

import { mergePolicies, spendCap, requireStanding, requirePosture } from "@xr-utilities/h-grant-sdk";

// A $2/call spend cap, but only release when:
//  - the agent holds at least "trusted" H-Cert standing, resolved within 7 days, AND
//  - the target counterparty's H-Scope posture is at least "moderate".
const { policy } = mergePolicies([
  spendCap({ allowedActions: ["x402:POST /pay"], perCallUsdCents: 200, ttlDays: 30 }),
  requireStanding({ minTier: "trusted", maxStalenessDays: 7 }),
  requirePosture({ minTier: "moderate", subject: "target", onUnknown: "deny" }),
]);

requireStanding({ minTier, maxStalenessDays? }) gates on the grantee agent’s standing. requirePosture({ minTier, subject?, onUnknown? }) gates on a wallet’s posture, where subject is "target" (the counterparty, the default) or "grantee" (the agent), and onUnknown is "allow" or "deny" for an unscorable wallet.

From the raw API

Both gates ride the grant’s requiredAttestations and requirePosture fields. ABS standing uses the hcert: requirement grammar:

requiredAttestations: [
  "hcert:standing:trusted",   // grantee must be trusted (or better)
  "hcert:stale:604800"        // and the verdict must be < 7 days old
]

Other hcert: requirements: hcert:delegation:<owner> (grantee is delegated by that owner) and hcert:scope:<scope> (scope that delegation). Posture is a structured field: requirePosture: { subject: "target", minTier: "moderate", onUnknown: "deny" }.

H-Grant resolves the standing requirement live against H-Cert’s /resolve over the sister-key channel and fail-closes if H-Cert cannot confirm it.

Common patterns

  • High-value payments require trusted. Gate a payment action on requireStanding({ minTier: "trusted" }) so only an agent with an established clean track record can move real money.
  • Experimental tools accept watch. For a low-stakes or early-beta action, watch is enough; you still exclude suspended / revoked.
  • Never pay a low-posture counterparty. Add requirePosture({ minTier: "moderate", subject: "target", onUnknown: "deny" }) to any payment grant so a hijacked agent cannot pay a freshly funded drain wallet even within its cap.
  • Bound staleness for anything sensitive. maxStalenessDays: 7 refuses a standing verdict that has not been refreshed recently, so a good tier cannot go indefinitely unchecked.

Sanctions are separate and always on

Independently of any tier you set, a counterparty on the OFAC SDN list is refused. H-Agent hard-denies a pay/purchase to a sanctioned address before any funds move, and H-Cert marks a sanctioned subject sanctions.effectiveTier: "revoked" on its standing read and refuses it on /resolve. This floor is not a policy option; it applies to every agent. See H-Cert and H-Agent.

Where to go next

  • H-Grant - the full grant and custody guide.
  • H-Cert - how behavioral standing is computed and anchored.
  • H-Scope - wallet-behavior posture and the risk signals behind it.
  • Compose the ecosystem - how the pieces fit end to end.

Frequently asked

What is the difference between ABS standing and wallet posture? +

ABS standing (H-Cert) scores an AGENT from how it has behaved: risk events the estate emits about it, decayed over time, into a tier (trusted, watch, unrated, suspended, revoked). Wallet posture (H-Scope) scores an ADDRESS from its on-chain behavior into a tier (none, minimal, moderate, institutional, core-institutional). Standing is about the agent holding the grant; posture is usually about the counterparty it is paying.

What happens if the agent's standing drops mid-run? +

The gate is evaluated at each release, not once at grant time. If the agent's standing falls below the required tier (or its verdict goes staler than your maxStalenessDays), the next release is refused even though the grant still exists and the budget is unspent. Nothing is clawed back; the agent simply stops being released to.

Are these gates enforced, or advisory? +

The grant gate is enforced: H-Grant fail-closes a release when a required standing or posture is not met. The underlying scores are advisory inputs (H-Cert standing and H-Scope posture are both advisory signals), but once you write one into a policy, H-Grant treats it as a hard release condition.

Can I require standing AND posture AND a spend cap together? +

Yes. They compose. A spend cap shapes what the agent may do; requireStanding and requirePosture are gate fragments that add release conditions on top. All must be satisfied for a release.