Docs

Decisions

Every check comes back as allow, pending or block, with the reason in plain words.

const r = await halto.check({
  tool: "stripe",
  action: "issue_refund",
  params: { amount: 240, currency: "USD", order_id: "A-1042" },
});
if (r.decision === "allow") await refund(r.finalParams);

Under the rule “Refunds over $100 need my approval”, /v1/check answers:

{
  "decision": "pending",
  "reason": "Needs approval: “Refunds over $100 need my approval”",
  "action_id": "091c61a1-…",
  "approval_id": "5b7e2c40-…",
  "poll_url": "/v1/approvals/5b7e2c40-…",
  "risk": {
    "score": 57,
    "level": "high"
  },
  "category": "payment",
  "latency_ms": 19
}

What each decision means

DecisionMeaningWhat to do
allowThe action may run.Run it with final_params, not your own copy. They hold the real values for any placeholders the model wrote, and the text a person approved if they edited it.
pendingA person is asked, on their phone.Poll poll_url, subscribe a webhook, or send the same check again once it is approved.
blockThe action must not run.Don't run it. reason says why in plain words, for your logs and for the agent.

Warning

Never hand final_params back to the model: it would then read the real values Halto kept from it.