Practical AI Engineering: A Developer's Handbook

Reviewed Nov 2026

A reference for software engineers who build production systems with large language models. It covers the API, prompts, evaluation, retrieval, agents, the Model Context Protocol, security, reliability, and operations. Examples use Python and the Anthropic SDK. Model IDs and provider features change, so check the current documentation before you ship.

How to read this handbook

Start with the parts in order if you are new to AI engineering. Experienced engineers can use the reading paths below.

Path 1: building a first feature. Chapters 1–8, then 15 and 25.

Path 2: building retrieval. Chapters 2, 5, 6, 16, 17, and 25.

Path 3: building agents. Chapters 9–12 and 18–23.

Path 4: running in production. Chapters 13–15, 26, 27, and 30–32.

Contents

Foundations

  1. LLM Applications and Architecture
  2. Conversation State and Context
  3. Prompts and Instructions
  4. Streaming and Output Contracts

Building with Models

  1. Prompt Engineering Patterns
  2. Evaluation and Regression Testing
  3. Evaluation and Observability Tools
  4. Tool Use and Function Calling

Orchestration

  1. Workflows, Agents, and Decision-Making
  2. Workflow Patterns
  3. Agent Execution and Tool Results
  4. Streaming Tools and Built-in Capabilities

Production

  1. Safety, Permissions, and Prompt Injection
  2. Cost, Latency, and Reliability
  3. A Practical Delivery Checklist

Retrieval and Knowledge

  1. Retrieval-Augmented Generation (RAG)
  2. Advanced RAG: Retrieval, Evaluation, and Production

Agent Systems

  1. The Agent Harness
  2. Agent Architecture and Execution
  3. Subagents and Multi-Agent Systems
  4. Production Agent Engineering

Model Context Protocol

  1. MCP Fundamentals
  2. Advanced MCP: Authorization, Client Features, and Production

LLM Foundations and Application Design

  1. LLM Fundamentals and Model Behavior
  2. Data Contracts and Validation
  3. AI Application Architecture

Model Engineering and Production

  1. LLMOps and the Model Lifecycle
  2. Fine-Tuning, Distillation, and Model Adaptation
  3. Multimodal AI and Real-Time Systems

Security, Reliability, and Experience

  1. AI Security Beyond Agents
  2. Reliability Engineering for AI Systems
  3. AI UX and Performance Engineering

Appendices

Conventions

  • Code is Python 3.12 or later, typed, and written to be run. Snippets that need a provider or a service show the call shape and mark the placeholder.
  • Model IDs are placeholders until confirmed on the provider's model page for the date of use.
  • Figures that depend on prices, limits, or sample sizes are labeled as illustrative or require measurement.
  • Recruitment and personal-data examples use fictional data only.

Scope and limits

The handbook teaches engineering practices that outlast any one vendor, and it names specific provider features where they matter. It is not legal advice. Items that depend on law, including the EU AI Act, data protection in Argentina, messaging-platform rules, and data-use terms, must be confirmed with qualified counsel and the current official sources.