Instructions Are Data: Systems, Security, and the Boundaries of Code

Rez Khan, PhD · Advance Review Edition · doctorkhan.github.io/instructions-are-data · LinkedIn · GitHub

What it is

A technical book in progress, of about 100,000 words, on securing AI agent systems. These are language models that read email, tickets, web pages, and code, and then act: they send messages, change records, push code, and move money.

The problem it addresses

A language model cannot reliably tell an instruction from a piece of data. Anyone who can put text in front of an agent can try to direct it. Organisations are connecting agents to payment systems, source repositories, and each other faster than the security practice around them is settling.

What the book does

Skills it demonstrates

Area Evidence in the book
AI and agent security architecture Threat model and hardening of a five-agent platform; delegation, isolation, approval, and egress design
Threat modeling An original method, with a worksheet and review checklist (Appendices A and B)
Offensive testing Attack walk-throughs and labs for prompt injection, tool abuse, memory poisoning, agent-to-agent attacks, supply chain, and exfiltration
Formal methods A formal model with machine-checked proofs in Lean 4
Technical communication A book for working engineers, with each claim labelled as proved, measured, documented, or judged

Status

All seventeen chapters and three appendices are drafted. The labs for Part II exist, and the labs for Part III are in progress. Measured results are marked as pending until the experiments run. The fact-checking pass is under way.