๐Ÿค– API Patterns & Practices: APIs for Agents & LLMs
Home Chapters Examples Diagrams Bibliography GitHub โ†—
Home / Test and automate
Part 5 4 chapters

Test and automate

Prove the contract holds: manifest conformance, agent-behaviour evals, scripted non-interactive runs, and async and human-in-the-loop test flows.

Chapter 27

Contract and Manifest Conformance

A scripts-only harness checks that a running service still matches its published contract and tool manifest, not merely that it starts.

20 minutesRead โ†’
Chapter 28

Agent-Behaviour Eval with Deterministic Replay

A deterministic evaluator scores a recorded transcript of an agent's behaviour to PASS or FAIL, naming the first assertion it violates, never judging the model's own prose.

20 minutesRead โ†’
Chapter 29

Scripted Non-Interactive Consumption

A committed collection drives the same tool contract a human would exercise by hand, scripted and repeatable, and the run is judged by the runner's structured report, never by its exit code.

20 minutesRead โ†’
Chapter 30

Testing Async Flows and the Human-in-the-Loop Gate

An async, human-gated action is tested the way any contract is tested, by observing the durable effect under a bounded poll, never by reading the trigger's exit code.

25 minutesRead โ†’
โ† Previous part Consume Next part โ†’ Ship

API Patterns & Practices: APIs for Agents & LLMs

A pattern catalog for building APIs that AI agents and LLMs consume: REST and GraphQL as MCP tools, event-driven agent wakeups on Kafka, and the identity, traffic and observability guardrails a production agent-facing surface needs. Built on Quarkus, Apache Camel and Kafka; every pattern states a stack-neutral contract that transfers to Python/FastAPI and Strawberry GraphQL.

References

  • Model Context Protocol โ†—
  • Quarkus โ†—
  • Apache Camel โ†—
  • Apache Kafka โ†—
  • Quarkus LangChain4j โ†—

Project

  • View on GitHub โ†—
  • Issues โ†—
  • patterncatalyst โ†—
Open source ยท Apache 2.0 (code), CC BY 4.0 (prose) Last built 2026-11-21