Get started

Agent Response Contract

A check on the agent's reply, against what actually ran this turn.

Maturity: Beta. Every statement on this page was traced to the enforcing code in QuoxCORE on 2026-10-29 (the response contract module and the chat dispatch that calls it).

At a glance
What it isA check that runs on an agent's reply before it is returned, comparing what the reply claims with what actually ran in that turn.
Where it runsIn the collector on your QuoxCORE server, on the chat path that uses stack dispatch. It runs when the operator enables it; the flag defaults off.
When to reach for itYou want replies that do not claim actions the agent never took.
How to startAn operator sets RESPONSE_CONTRACT_ENABLED=true for the collector.

Why it exists

A language model can write "I've sent the email" when no email was sent. The response contract checks those claims against the evidence from the turn, instead of trusting the wording.

What it does

The contract runs a set of deterministic rules over the reply, in English and Spanish, and then acts on two kinds of problem:

  • Claimed actions with no evidence. If the reply says it sent an email, created a task, started a workflow, handed work to another agent or filed an approval, and nothing in this turn did that, the contract removes the sentences it recognises as making that claim.
  • Outside facts with no supporting result. If the reply gives a verdict about something outside Quox and no skill ran in this turn to back it, the contract replaces the whole reply with a short line saying it cannot verify that yet and asking the user to confirm.

The contract runs before the Agent Honesty Chain, which checks claims across turns and agents.

What gets recorded

When the contract changes a reply, it emits a response_contract_applied event with a trace of which rule acted and short previews of the reply before and after. The audit-log view shows that trace on the run. If writing the trace fails, the reply still goes out.

Limits

  • Only the stack-dispatch chat path, and only when enabled. Streaming chat, /chat/complete and workflow runs do not pass through the contract.
  • It removes the sentences it recognises. A claim worded in a way its rules do not match can stay in the reply.
  • The markdown and language checks are not active yet.
  • The organisation check does not cover the default organisation.
  • The build check is advisory. A failing contract test does not block the collector image.
  • A named-entity check is not built. An agent that called any skill can still state an unsupported fact about a named entity.

What it does not cover

  • General output safety. Prompt-injection defence and secret scrubbing are separate, input-side and tool-result-level systems.
  • Full-response translation.
  • Content quality. The contract checks rules against evidence, not whether an answer is good.
  • The skill firewall. Tool-execution permissions are a separate surface.
  • Cross-org governance. The contract does not extend the multi-tenant scoping model.

The flag

RESPONSE_CONTRACT_ENABLED turns the contract on for a deployment. It defaults off. It is operator configuration, set in the collector's environment; the platform capabilities view shows its state but cannot change it.


Last verified 2026-10-29 against QuoxCORE origin/main (response contract module and stack dispatch).