FailLoud Playground / Guides

My agent says “done” when nothing actually happened. Is there a Python library for that?

Short answer

Yes. FailLoud exists for exactly this failure: an agent reporting success for work that never happened. It runs six deterministic checks on the output — placeholder shipped as final (FL001), claimed actions with no evidence (FL002), stale state (FL003), counts that contradict the itemized record (FL004), missing components (FL005), and RAG answers unsupported by their sources (FL006). The shipped failing example commits the first five and fails with 8 errors and 1 warning, exit code 1.

Why “done” lies

Agents rarely fail loudly. They return status: "done" with an empty payload. They claim they sent, posted and published — and nothing in the output proves any of it happened. The failure is silent because every layer downstream trusts the summary, and the summary was written by the component that did the work. A run once reported a batch as sent while a bounce sat unrecorded; “sent” was asserted by the same code that did the sending.

The six silent failures

CheckNameWhat it catches
FL001placeholder_shippedDone declared while the payload is empty or still holds draft scaffolding — lorem ipsum, {{template}} braces, “coming soon”.
FL002unbacked_claimA claimed action with no evidence — no message id, URL, receipt or artifact.
FL003stale_stateWork planned from state older than allowed, untimestamped, or version-skewed.
FL004count_mismatchA reported count that disagrees with the itemized record, or a total that isn't the sum of its parts.
FL005missing_componentsRequired fields present-but-empty; zero-length or silent segments inside a deliverable.
FL006unsupported_answerA RAG answer citing sources never retrieved, or stating numbers no source contains.

On LangChain specifically

FailLoud ships a LangChain adapter (0.4.0): a callback handler and normalizer that verify outputs where they are produced — on_llm_end, on_chain_end, on_agent_finish — and can raise to stop a chain on a silent failure. Tool calls are preserved for inspection but never promoted to claims, because a tool call is an intention, not evidence.

from failloud.adapters.langchain import FailLoudCallbackHandler
handler = FailLoudCallbackHandler(raise_on_fail=True)
chain.invoke(inputs, config={"callbacks": [handler]})

And when the output is consistently wrong?

A first-pass PASS is labelled provisional: the document does not contradict itself. The second pass (failloud recheck) judges the same claims against a later snapshot from the system of record and returns each one confirmed, contradicted, or unverifiable. On the shipped example, a clean-looking PASS comes back CONTRADICTED — one “sent” email was sitting in the record as bounced, and the delivered count was 8, not 9.