Skip to content
Claims

Every number the agent says has its origin in the turn itself, or is counted and flagged.

A price nobody quoted, a deadline three days off, a promise with no action behind it. The claim contract declares, for each agent, what it may state and the evidence every claim needs in the turn record: a value with a source and freshness, a call to the right tool, a passage that cites its source. The check runs in the agent’s process, by lexicon, role and anchor, with no extra model, at the last point before the customer or before a document is saved. What does not stand is annotated, counted or gives way to the category’s caveat, as your company’s contract says. A signed document is never rewritten: it is checked and counted, and goes to a person when it does not stand. Niadra only receives the verdicts and adds them up.

How it works

The answer, checked before it goes out

example
What the agent wrote

Hi, Marina. The $40 credit is already applied to your August bill, and I rebooked the visit for Sep 23 in the morning. As an apology, your next bill comes with a 15% discount.

Claims found
  • $40 amount · credit state read: bill 0823, credit field, ERP 1 min ago verdict: matched action: none
  • Sep 23 date · visit tool reschedule_visit, called in this turn verdict: matched action: none
  • 15% percentage · discount none: no tool and no read in the turn carries a discount verdict: no origin action: the sentence gives way to the contract’s caveat
What goes out to the customer

Hi, Marina. The $40 credit is already applied to your August bill, and I rebooked the visit for Sep 23 in the morning. About a discount, I will confirm with the team and get back to you.

Checked in the agent’s process, by lexicon, role and anchor: no extra model. The three verdicts go to the turn record; the text of your prompt never does.

  • Three natures of a number: quoted, computed and said by the model. Only what has no origin is handled as the contract says: annotate, count or give way to the caveat
  • The evidence is exactly one: a value with a source in the turn, a call to this tool, a call to any of these tools, or a text anchor at 0.90 or above
  • Freshness governs the claim: a stale value comes with its age and does not back a number
  • A rewrite only when it is unequivocal, in a mutable output, and never for a dose, a measurement, a size or an identifier
  • A versioned list of phrases of the trade that must never trigger, tested in your CI with niadra contract test
  • The text of your own prompt, registered by fingerprint, never reaches the customer: the passage gives way to the contract’s line, and the record keeps the verdict, never the text
  • The rate of what each agent states without consulting comes out in context use, per agent and per vendor
The check, at the last point before the customer
from niadra import Niadra, phone

def shown(product):
    fields = {"price_sale": product["price_sale"]}
    return [{"ref": f"product:store:{product['sku']}", "fields": fields}]

@Niadra.tool("check_price", provenance=shown)
def check_price(sku: str) -> dict:
    return CATALOG[sku]

niadra = Niadra(channel="whatsapp")
# fingerprints of your own prompt, computed here; the text never leaves
niadra.internal_text.register("prompts@v16", PROMPT)
customer = phone(customer_phone)

with niadra.conversation(
    thread_id, subject=customer, agent_id="store"
) as conversation:
    build = Niadra.build(prompts={"store": "v16"}, model="gpt-4.1-mini")
    with conversation.turn(build=build):
        check_price("PX-4471")  # recorded, with the price it showed
        # the contract's actions, at the last point before the customer
        guarded = conversation.claims.guard_text(draft)
        conversation.agent(guarded.text)
  • Python
  • TypeScript

From the SDK’s examples/claim_guard.py: the tool records what it showed, and the answer goes through the contract before it becomes what the agent says.

The next agent can already show up knowing.

Tell us what you are building. The people who reply are the people who write the code.