Composite study

This is a product-class write-up, not a named-client story and not a results press release. Counts below describe the pack we actually write (approach points, tools, layers) — not invented bug totals or conversion lifts.

4
Approach points
5
Tools in the pack
5
Layers covered
3
Challenges documented

Overview

A slightly different enum (“US” vs “USA”) 500’d the tool. The agent retried three times and charged the user for all four calls.

A second tool ran without approval because the planner issued it in parallel with a read.

Industry pattern this is grounded in

Broken tool calls are a top real-world agent failure. If the model “answers safely” but the tool still executes — or loops — you missed the actual defect.

Highlights

Typical launch bar: Wait until journeys and evals agree — do not ship on demo scores alone.

Challenges

01

Eval harnesses scored the final natural-language answer, which apologized while the refund still went out.

02

Staging tools were more permissive than production schemas.

03

n8n/LangChain glue swallowed errors into “ok.”

How we tested

01

Schema-strict fixtures: missing field, extra field, wrong type, enum drift.

02

Write tools require approval; parallel writes are in scope.

03

Cost/loop caps; provider errors must not infinite-retry.

04

Fallback UX when the tool fails: no blank thread, no silent success.

Starting point vs what we required

Starting point versus the controls we required
Starting pointWhat we required
Eval harnesses scored the final natural-language answer, which apologized while the refund still went out.Schema-strict fixtures: missing field, extra field, wrong type, enum drift.
Staging tools were more permissive than production schemas.Write tools require approval; parallel writes are in scope.
n8n/LangChain glue swallowed errors into “ok.”Cost/loop caps; provider errors must not infinite-retry.

What we delivered

01

LLM traces / evals

  • LangSmith — Tool traces, retries, cost
02

Adversarial evals

  • Promptfoo — Argument drift and injection into tool args
03

API / contract

  • Postman — Tool API contract
04

Journeys / UI

  • Playwright — Approval and fallback UX
05

Failure telemetry

  • Sentry — Swallowed 500s in glue

Outcomes

Success is defined on tool traces and side effects, not on the chat bubble. Loop/cost caps were tested by forcing provider 500s.

Approval was a product control, not a system-prompt suggestion. GitHub Actions re-ran the pack on schema changes.

Stack

Testing stack used on this product class
LayerToolWhat we validated
LLM traces / evalsLangSmithTool traces, retries, cost
Adversarial evalsPromptfooArgument drift and injection into tool args
API / contractPostmanTool API contract
Journeys / UIPlaywrightApproval and fallback UX
Failure telemetrySentrySwallowed 500s in glue

Same method as the rest of our work: severity-ranked findings, pass rules in writing, and a ship / wait / block call. See the evaluation method and tool comparison.