Practical AI Engineering: A Developer's Handbook
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
- LLM Applications and Architecture
- Conversation State and Context
- Prompts and Instructions
- Streaming and Output Contracts
Building with Models
- Prompt Engineering Patterns
- Evaluation and Regression Testing
- Evaluation and Observability Tools
- Tool Use and Function Calling
Orchestration
- Workflows, Agents, and Decision-Making
- Workflow Patterns
- Agent Execution and Tool Results
- Streaming Tools and Built-in Capabilities
Production
- Safety, Permissions, and Prompt Injection
- Cost, Latency, and Reliability
- A Practical Delivery Checklist
Retrieval and Knowledge
Agent Systems
- The Agent Harness
- Agent Architecture and Execution
- Subagents and Multi-Agent Systems
- Production Agent Engineering
Model Context Protocol
LLM Foundations and Application Design
Model Engineering and Production
- LLMOps and the Model Lifecycle
- Fine-Tuning, Distillation, and Model Adaptation
- Multimodal AI and Real-Time Systems
Security, Reliability, and Experience
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.