Lesson 13.07 · Phase 13 · Production Agents

Versioning prompts and tools

A prompt is code that ships without a compiler. Give it a version, pin it in a release, and don't promote it until yesterday's real traffic and your eval suite both say it still works.

Learning objectives

  • Store prompts and tool schemas by content hash, and compute a tool's version (major, minor, patch) from a diff of its schema.
  • Define an agent release: a manifest pinning the model, prompt and tool versions, recorded on every run.
  • Gate promotion on two checks: recorded production tool calls must still validate, and the eval suite must not regress.
  • Roll back by moving one pointer.

On Tuesday someone tidies the refunds prompt: "Be concise" replaces "Always cite the policy clause you rely on". On Wednesday someone changes the refund tool to take integer cents instead of euros. On Thursday support asks why refunds stopped citing policy, and why a few in-flight runs crashed with "missing argument". Nobody can say which prompt and which tool schema a given run used, because neither had a version. The prompt lived in a Python string, and the schema in a decorator.

Loading the full lesson…