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

Consume

Consume what Part 1 to 3 built: calling an MCP server and its async side from Claude Code and from a langchain4j agent.

Chapter 22

Consuming an MCP Server from Claude Code

A human points Claude Code at a packaged MCP tool server, discovers its tool, resource and prompt surface, and drives it, the same surface a scripted client exercises deterministically.

20 minutesRead โ†’
Chapter 23

Building a Claude Code Skill

Packaging the knowledge and helper scripts an agent needs to operate an API as a distributable Claude Code Skill, shipped both as a project skill and as a packaged bundle.

20 minutesRead โ†’
Chapter 24

LangChain4j Agent as a Programmatic Consumer

An unattended langchain4j agent calls a remote MCP tool programmatically, and what gets recorded comes from the tool's own captured result, never from the model's retelling of it.

20 minutesRead โ†’
Chapter 25

Consuming the Async Side

A Kafka consumer wakes a composing agent the instant a shipment is delivered, and the structured record of what happened comes from the event, never from the agent's composed reply.

25 minutesRead โ†’
Chapter 26

The Prompt-plus-Contract Loop and Decision-Rule Review

An agent proposes an action under a contract, and a deterministic decision-rule reviewer, not the model, decides whether it takes effect.

20 minutesRead โ†’
โ† Previous part Build: asynchronous APIs Next part โ†’ Test and automate

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