M8 · Run, Monitor, and MaintainM8-0424 min read

Lesson 46 of 58 · Module 9 of 10 · Week 6

Threads:The resilience thread

Automated Agent and Policy Versioning: Tool Contracts and Prompt Versions in Production

An agent's behavior drifts through its tool contracts and its prompt versions, not through model retraining, so versioning has to stamp both together — automatically, not as a manual one-off — or a team investigating a regression cannot tell what actually changed, and cannot roll back to exactly the combination that was known to work. This is Objective 8.4 of NCP-AAI's Run, Monitor, and Maintain domain (5% of the exam), and it owns AGENT/policy versioning specifically — automated model retraining is a related but distinct practice covered in NVIDIA's generalist-LLM certification material.

By the end you can

  1. 01Explain why an agent's versioning surface is its tool contracts and prompt versions specifically, not the underlying model's weights, and why that distinction matters for what gets stamped.
  2. 02State precisely what "automated" rules out in this objective's framing, and connect that to the incomplete-loop risk M8-02 and M8-03 leave behind without it.
  3. 03Distinguish a version identifier that merely names a file from one that actually delivers traceability and safe rollback, and explain why the difference matters once a regression is confirmed.
  4. 04Trace a full incident from a confirmed regression through an automated versioned rollback, naming what each stage of that chain contributes.
01

What actually drifts under a deployed agent: tool contracts and prompt versions

[GROUND TRUTH] (Sources/ncp-aai/domain-8-run-monitor-maintain.md) frames the objective as implementing automated tuning, retraining, and versioning in production, with versioning specifically enabling traceability and clean rollback — not just file naming, but knowing exactly which version is live and being able to revert safely. Applied to an agent rather than a bare model, "which version is live" has to mean something more specific than a single model checkpoint, because two deployments of the exact same underlying model can behave completely differently depending on two things this section names directly.

Tool contracts. An agent's tools are the interface between its reasoning and the outside world — a search function, a booking API, a database query. A tool contract is the defined shape of that interface: what inputs a tool call expects, what outputs it returns, and what side effects calling it has. Change a tool's contract — a search tool starts returning five results instead of ten, a booking API's date format changes, a database query tool starts silently truncating long results — and the agent calling that tool can start behaving differently without anyone having touched the agent's own prompt or model at all. The agent did not get worse at reasoning; the thing it depends on changed shape underneath it.

Prompt versions. The instructions and templates that shape how an agent reasons and decides what to do next are themselves a versioned artifact, separate from any tool it calls. A prompt template edited to fix one issue can, in the same edit, subtly change how the agent handles an entirely different class of task — a rewritten instruction meant to make the agent more concise can also make it skip a clarifying question it used to ask, for instance. Prompt changes are frequent, often made quickly in response to an observed problem, and exactly the kind of change that needs the same traceability discipline as a model checkpoint would, because a prompt edit is every bit as capable of causing a regression as a model swap is.

Both of these are what actually drifts under a deployed agent in the sense this domain cares about, and both need to be captured by versioning together — not one or the other — because a regression can originate in either one independently, or in an interaction between the two. A team that versions only its prompts, while a tool provider silently changes a contract underneath it, will find itself unable to explain a regression that a tool-contract diff would have made obvious in seconds. A team that versions only its tool contracts, while prompt edits ship unrecorded, faces exactly the same blind spot from the other direction.

02

Why "automated" is doing real work in this objective, not a throwaway adjective

L1 — a manual versioning habit is a habit that eventually gets skipped

Picture a team that has a genuinely good versioning discipline on paper — every tool-contract change and prompt edit gets recorded, in principle, whenever someone remembers to do it. In practice, a habit that depends on a person remembering to act, every single time, under time pressure, during an incident, or on a quiet Tuesday when nothing seems urgent, is a habit that will eventually be skipped. The exact moment a version record is most valuable — right after a fast, under-pressure prompt fix during an active incident — is also the exact moment a manual process is most likely to be skipped, because nobody pauses mid-incident to fill out a changelog. Automating the versioning step removes that dependency on remembering entirely: the record gets made because the system makes it, not because a person chose to.

L2 — the mechanism: what automated versioning actually has to capture, and why manually would fail it

[GROUND TRUTH] (Sources/ncp-aai/domain-8-run-monitor-maintain.md) is explicit that versioning is about traceability and clean rollback, not just naming files — a distinction that applies with even more force to an agent's tool contracts and prompts than to a single model checkpoint, because an agent's behavior at any given moment is jointly determined by several independently-changing pieces. A version stamp that actually delivers traceability has to record, together, as one coordinated unit: which tool contracts (and which specific version of each) were active, which prompt template (and which specific version) was active, and which underlying model was in use — captured automatically at the moment a change ships, not reconstructed later from memory or from scattered commit messages across different repositories a tool provider and a prompt author might each maintain separately.

Automating this capture is what makes the record complete by construction rather than complete by diligence. A CI/CD pipeline that stamps a version identifier the moment a prompt template or a tool-contract definition is deployed, tying that identifier to the exact artifacts that shipped together, produces a record that cannot be incomplete the way a manually-maintained changelog can be, because the stamping happens as a mechanical step in the deployment itself rather than as a separate task someone has to also remember to do.

L3 — the exam-relevant edge case: an incomplete rollback is worse than an obviously failed one

The sharpest trap in this material is a rollback that looks successful but is not actually complete. Suppose an agent's prompt template is rolled back to its prior version after a regression, but the tool contract a downstream provider changed independently is left as-is, because nobody's rollback procedure thought to check it. The agent is now running its old prompt against a new tool contract — a combination that never existed in production before, and one nobody has validated. This is a subtler failure than an obviously-broken rollback, because the prompt reverting alone might partially improve things, masking that the combination is still wrong; a team can declare the rollback successful, move on, and be caught off guard when the same or a related regression resurfaces, because the actual root cause — the tool-contract mismatch — was never addressed at all. This is precisely why a version has to be a coordinated snapshot of both prompt and tool-contract state together: rolling back only one half of that pair restores a combination that may never have been tested as a unit.

03

Automated tool-contract/prompt versioning vs. manual, ad-hoc changes: a decision table

ScenarioCorrect classificationWhy
A CI/CD pipeline automatically stamps a version identifier recording the exact prompt template and tool-contract versions together, the moment either one deploysAutomated agent/policy versioning, as objective 8.4 intendsThe record is produced mechanically as part of deployment, not dependent on a person remembering
An engineer edits a prompt template directly in a live config during an incident and does not update any version recordManual, unrecorded change — not the practice this objective describesNo traceable record exists of what changed, when, or by whom
A tool provider changes an API's response format, and the agent's version record has no field for tracking third-party tool-contract versions at allAn incomplete versioning scheme, even if prompt versioning is otherwise solidVersioning that omits tool contracts leaves half of what actually drifts under an agent unrecorded
A rollback restores the prior prompt template but leaves an already-changed tool contract in placeAn incomplete rollback, despite looking like a full revertThe agent is now running a combination — old prompt, new tool contract — that was never validated together
A version identifier is a sequential number with no record of what prompt or tool-contract state it corresponds toNaming, not versioningA name distinguishes two states from each other without recording what differs between them or how to fully restore either one
A version record captures the prompt template, every tool contract in use, and the underlying model together as one stamped unitVersioning that satisfies traceability and safe rollbackCaptures the complete, coordinated state needed to explain a regression and reverse it fully
04

Worked example: an automated rollback from a confirmed regression to a restored, coordinated version

Take a constructed scenario, continuing the customer-support agent from M8-03's worked example, illustrative rather than measured from a real deployment. Recall that M8-03 traced v4's task-success regression on product-defect-report tickets to the drafting step omitting a required warranty-claim step v3 reliably included.

text
Step 1 -- automated trigger.
  M8-03's confirmed, segmentation-verified regression (product-defect-report tickets only)
  automatically opens a versioned-rollback candidate rather than waiting for an engineer to
  notice the trend and manually decide to act.

Step 2 -- root cause located per M8-02's per-step tracing.
  The regression traces to v4's prompt template for the drafting step, which dropped an explicit
  instruction ("always confirm warranty-claim eligibility before drafting a resolution") that
  v3's prompt template included -- not a tool-contract change, and not the underlying model,
  which is unchanged between v3 and v4.

Step 3 -- check the coordinated version record before deciding what to roll back.
  v4's stamped version record: prompt template v4.2 (drafting step) + tool contracts unchanged
  from v3 (ticketing-system tool v7, warranty-lookup tool v3) + underlying model unchanged.
  v3's stamped version record: prompt template v3.1 (drafting step) + tool contracts
  ticketing-system tool v7, warranty-lookup tool v3 + underlying model unchanged.
  -> Because tool contracts and the model are identical between v3 and v4, the coordinated
     record confirms the prompt template is the ONLY thing that actually changed -- a rollback
     of the prompt alone restores a combination that has, in fact, already been running (v3's).

Step 4 -- automated rollback executed.
  Drafting-step prompt template reverted to v3.1. Tool contracts and model untouched, since the
  version record confirmed they were never part of the regression.
  Rollback is stamped as its own version event (v4-rollback-1), recording exactly what was
  reverted and why, rather than silently overwriting v4's record.

Step 5 -- post-rollback confirmation (per M8-03's online task-success regression check).
  Product-defect-report task-success rate over the next measurement window: 81.9%, back within
  v3's established noise band (79.8%-84.6% observed range) -- confirms the rollback addressed
  the actual regression rather than merely coinciding with an unrelated recovery.

The scenario's payoff depends on step 3 in a way worth naming explicitly: because the version record captured tool contracts and the model alongside the prompt, the team could confirm with certainty that reverting the prompt alone was sufficient, rather than guessing and rolling back everything indiscriminately or, worse, rolling back only the prompt without ever checking whether the tool contracts had also silently drifted in the interim. Had the version record only tracked prompt versions and said nothing about tool contracts, the team would have had no way to rule out a tool-contract change as a contributing factor, and the rollback in step 4 would have been an act of hope rather than a confirmed, complete fix.

THE EARNED INSIGHT: Versioning an agent is not one task but two that have to be done together — capturing tool-contract state and capturing prompt-version state — because either one can drift independently and produce the exact same symptom (a live regression) with a completely different fix, and a version record that only tracks one of the two can neither explain a regression it never had the layer to see nor guarantee a rollback restores a combination that was ever actually validated; automating the capture of both, tied together as one stamped unit at the moment either changes, is what turns "we think we fixed it" into "we know precisely what we reverted, and we know the resulting combination is one that was already proven to work."

05

Two versioning practices with the same name for different reasons

Read narrowly on purpose, this lesson's subject sits next to a lookalike practice found elsewhere in NVIDIA's certification material, in the domain covering generalist LLM production operations rather than agents specifically: refreshing a model's own weights through fine-tuning or full retraining, and versioning the resulting checkpoint so a bad refresh can be undone. Put the two side by side and the shared word "versioning" is doing double duty for two different jobs — one job stamps an agent's interface to its tools and its own instructions, the other stamps a model's learned parameters after they have been retrained on fresh data to counter drift a static model accumulates over time.

DimensionThis lesson: agent/policy versioningThe lookalike: model-retraining versioning
The thing that actually movedA tool's interface, or the wording of a prompt templateThe numeric values inside a model's weights
What gets stampedTool-contract definitions paired with prompt-template versionsA model checkpoint plus whatever training run produced it
What usually sets off a new versionA tool provider's interface shifting, or a prompt edit made to fix an observed problemA confirmed drift or regression finding that points at output quality specifically
What a rollback puts backThe earlier tool-contract-and-prompt combination, restored as a pairAn earlier checkpoint, with its training lineage intact

The overlap between the two stops at the reason each one exists: both refuse to accept a bare label as "versioning," and both insist a rollback restore something that was actually validated, not just something that used to exist. Past that shared insistence, they are answering to entirely different sources of drift, and telling them apart in a scenario comes down to asking one plain question — did the model's own parameters change, or did something feeding into an otherwise-unchanged model change? A shifted tool interface or a rewritten prompt keeps this lesson's practice in play; retrained weights hand the question to the other one.

06

Common misconceptions about agent and policy versioning

MisconceptionWhat is actually trueWhy it matters
"Versioning an agent means versioning its underlying model"An agent typically calls the same model across versions; what actually drifts is its tool contracts and prompt versionsVersioning only a model checkpoint leaves the two things most likely to cause a regression completely unrecorded
"A sequential version number is enough to satisfy this objective"A number distinguishes states from each other without recording what changed or how to fully restore either stateA naming scheme fails both traceability and safe rollback, the two things versioning is actually for
"Rolling back the prompt alone is always a complete rollback"A tool contract can drift independently of the prompt; restoring only the prompt while a tool contract has silently changed restores an unvalidated combinationSection 2's L3 edge case and the worked example's step 3 both depend on checking both layers together
"Automated just means running on a fixed schedule"Automated in this objective's sense means the version record is produced mechanically at deployment time, and — for rollback — triggered by a confirmed finding, not dependent on a person remembering to act at any pointA calendar-driven process without a mechanical trigger can still miss the exact moment a fast, under-pressure fix ships unrecorded
"This is the same practice as automated model retraining"This lesson versions tool contracts and prompts; a related but separate practice in NVIDIA's generalist-LLM material versions a model's own retrained weightsConfusing the two risks applying the wrong corrective action to a regression whose actual cause sits in a different layer entirely
07

Why automated agent and policy versioning is on the NCP-AAI exam

Run, Monitor, and Maintain is Domain 8 of the NCP-AAI blueprint, weighted at 5% [GROUND TRUTH] (Sources/ncp-aai/domain-8-run-monitor-maintain.md), and this lesson's material is Objective 8.4: implement automated tuning, retraining, and versioning in production. [GROUND TRUTH] (Sources/ncp-aai/domain-8-run-monitor-maintain.md) names the domain's own stated trap directly: treating retraining/versioning as manual, one-off tasks, when the objective calls for automation — and separately frames versioning's purpose as enabling traceability and clean rollback, not just file naming. Expect this objective in a few recurring shapes:

  1. Direct identification. "Which pairing reflects a Run/Monitor/Maintain practice?" keyed to automated retraining and versioning in production, against distractors describing a one-time manual deployment, disabling logs, or removing dashboards after launch.
  2. Naming-vs-versioning discrimination. A scenario describes a team that assigns sequential version numbers to agent deployments but tracks nothing else, asking whether this satisfies the objective — the correct read recognizes this as naming, not versioning.
  3. Incomplete-rollback trap. A scenario like this lesson's worked example describes a rollback that restores only a prompt or only a tool contract, asking whether the rollback is complete — testing whether the coordinated-snapshot requirement is understood.
  4. Automated-vs-manual discrimination. A scenario contrasts a version record produced automatically at deployment time against one a person has to remember to create, testing whether "automated" is recognized as doing real work in the objective's phrasing.
  5. Cross-domain tie-ins. A question naming "versioning" may pair this lesson's agent/tool/prompt-focused scope against a distinct model-retraining practice from a different cert's material, testing the boundary section 5 draws.

What the distractors typically look like

The standard traps in this domain's style are: offering a sequential version number or a descriptive filename as sufficient description of versioning, when the actual requirement is traceability and safe rollback; offering a manual, person-triggered versioning habit as satisfying "automated"; offering a partial rollback (prompt only, or tool contract only) as a complete fix; and conflating this lesson's agent/policy scope with a related but separate model-retraining practice from a different cert's material.

08

Common mistakes about automated agent and policy versioning

MistakeSymptomCauseFix
Versioning the model but not the agent's tool contracts or promptsA regression traced to a prompt or tool-contract change has no version history to consultVersioning was scoped to the model checkpoint onlyVersion tool contracts and prompt templates together, as the layer that actually drifts under an agent
Relying on a manual habit to record version changesA fast, under-pressure prompt fix during an incident ships with no version record at allThe versioning step depended on a person remembering to act under exactly the conditions least likely to support thatAutomate version stamping as a mechanical step in the deployment pipeline itself
Rolling back only one of two changed layersThe agent runs a combination — old prompt against a new tool contract, or the reverse — that was never validated togetherThe rollback procedure did not check the coordinated version record for both layers before actingConfirm from the version record exactly which layer(s) changed before rolling back, and restore both together if both drifted
Treating a version number as sufficient traceabilityA team cannot explain what changed between two versions beyond "it's a different number"The version identifier recorded a label but not the actual tool-contract and prompt stateStamp the full coordinated state — tool contracts, prompt versions, model — not just a distinguishing name
Assuming this practice is the same as model retrainingThe wrong corrective action (retraining a model) gets applied to a regression actually caused by a tool-contract or prompt changeConflating agent/policy versioning with a separate, model-focused practice from a different cert's materialConfirm which layer actually changed — tool contract/prompt (this lesson) or model weights (the separate practice) — before choosing a fix

What is the difference between naming an agent's versions and actually versioning it?

Naming an agent's versions means assigning each deployment a distinguishing label — a sequential number, a date, a short descriptive tag — that tells two deployments apart without recording anything about what actually changed between them. Versioning, as [GROUND TRUTH] (Sources/ncp-aai/domain-8-run-monitor-maintain.md) frames it, additionally requires that the record support traceability (knowing exactly which tool contracts and which prompt version were active for a given deployment) and safe rollback (being able to restore that exact combination with confidence). A label alone satisfies neither: it cannot tell you what changed, and restoring "the file with the old name" does not guarantee the tool contracts an agent depends on have not independently drifted in the interim.

Why can a rollback that restores only a prompt template still leave a regression unresolved?

Because an agent's behavior is jointly determined by its prompt version and the tool contracts it calls, and either one can drift independently of the other. If a regression's actual cause was a tool provider silently changing a contract, reverting only the prompt template restores a combination — old prompt, new tool contract — that may never have run in production before and was never validated as a pair. [GROUND TRUTH] (Sources/ncp-aai/domain-8-run-monitor-maintain.md)'s framing of versioning as covering the full picture, not a single artifact in isolation, is precisely why a complete version record has to capture tool contracts and prompt versions together: only that combined record lets a rollback confirm, rather than assume, which layer actually needs to be restored.

Glossary recap: agent and policy versioning terms this lesson introduced

TermOne-line definition
Tool contractThe defined interface of a tool an agent calls — its expected inputs, outputs, and side effects — which can drift independently of the agent's own prompt or model
Prompt versionA specific, tracked iteration of the instructions and templates shaping how an agent reasons and acts
Coordinated version recordA version stamp capturing tool-contract state and prompt-version state together as one unit, rather than either in isolation
Automated versioningVersion records produced mechanically as part of deployment, not dependent on a person remembering to create them
Traceability (agent versioning)The ability to determine exactly which tool contracts and prompt version were active for a given agent deployment
Safe rollback (agent versioning)Restoring a complete, coordinated prior combination of tool contracts and prompt version, with confidence that combination was previously validated
Automated model retrainingA related but distinct practice, owned by NVIDIA's generalist-LLM certification material, versioning a model's own retrained weights rather than an agent's tool contracts and prompts

Key takeaways on automated agent and policy versioning

  • An agent's versioning surface is its tool contracts and prompt versions, not its underlying model. A deployed agent typically calls the same model across versions; what actually drifts is the interface to its tools and its own instructions.
  • "Automated" means the version record is produced mechanically at deployment time. A manual habit is a habit that gets skipped exactly when it matters most — during a fast, under-pressure fix.
  • A version identifier that only distinguishes files by name satisfies neither traceability nor safe rollback. Both require the record to capture what actually changed and to support a confident, complete restoration.
  • A rollback has to check both layers before acting. Restoring only a prompt while a tool contract has independently drifted restores an unvalidated combination that can leave the real regression unresolved.
  • This lesson closes the loop M8-02 and M8-03 open. Per-step tracing locates a divergence; online regression benchmarking confirms it; automated, coordinated versioning is what makes the resulting fix traceable and safely reversible.
  • This lesson owns agent/policy versioning specifically — not model retraining. A related practice in NVIDIA's generalist-LLM certification material versions a model's own retrained weights instead, a genuinely different unit of change.

Next: M8-05 closes this module by asking what all of this — dashboards, per-step tracing, live regression benchmarking, and automated versioned rollback — actually buys an agent in production: the reliability, visibility, and auditability that let it keep the trust of the people relying on it, rather than any one of these practices being valuable in isolation.

Answers

1. Which pairing reflects a Run/Monitor/Maintain practice, per objective 8.4?

  • A. Automated retraining and versioning in production
  • B. One-time manual deployment only
  • C. Disabling logs to save cost
  • D. Removing dashboards after launch

Objective 8.4 names automated tuning, retraining, and versioning explicitly; the other options describe practices this domain treats as failures, not standards.

2. A team assigns each agent deployment a sequential version number but records nothing else about what changed. Does this satisfy versioning as this domain defines it?

  • A. Yes, distinct numbers are sufficient for versioning
  • B. No — this satisfies naming, not versioning, since it captures neither traceability nor the ability to safely restore a prior combination
  • C. Yes, as long as the numbers are sequential and never reused
  • D. No, because versioning requires no numbering at all

A number alone distinguishes deployments without recording which tool contracts or prompt version was active, or whether restoring an earlier number restores a complete, validated combination.

3. A rollback restores an agent's prior prompt template, but a tool provider had independently changed a contract that was never checked. What is the risk?

  • A. None — restoring the prompt alone is always sufficient
  • B. The agent now runs a combination — old prompt, new tool contract — that may never have been validated together, potentially leaving the real regression unresolved
  • C. This is the correct and complete definition of a safe rollback
  • D. This only matters for model retraining, not agent versioning

A version has to be a coordinated snapshot of both tool contracts and prompt state; restoring only one layer can leave a mismatched, untested combination in place.

4. Why does "automated" matter specifically for versioning a fast, under-pressure prompt fix made during an active incident?

  • A. Automation is irrelevant during incidents
  • B. A manual process depends on someone remembering to record the change, and the moment of highest pressure is exactly when that is most likely to be skipped
  • C. Prompt fixes during incidents never need to be versioned
  • D. Automated versioning only applies to tool contracts, never prompts

The exact moment a version record is most valuable — a fast, under-pressure fix — is also the moment a manual process is most likely to be skipped, which is why the record has to be produced mechanically rather than by habit.

5. What actually drifts under a deployed agent, in the sense this objective is concerned with?

  • A. Only the underlying model's weights
  • B. The agent's tool contracts and prompt versions
  • C. Only the GPU hardware serving the model
  • D. Nothing changes under a deployed agent by definition

A deployed agent typically calls the same underlying model across versions; the things that actually change and cause behavioral drift are its tool contracts and its prompt versions.

6. How does this lesson's scope (agent/policy versioning) differ from automated model retraining, as covered in a different cert's material?

  • A. They are the same practice under a different name
  • B. This lesson versions tool contracts and prompt versions; the model-retraining practice versions a model's own retrained weights instead, a different unit of change entirely
  • C. Agent/policy versioning applies only to latency metrics
  • D. Model retraining requires no versioning at all, unlike agent/policy versioning

The two practices share the same purpose (traceability and safe rollback) but apply to genuinely different things: an agent's tool interface and prompts here, versus a model's learned weights there.

7. A version record captures a prompt template's version and a model checkpoint, but has no field for the tool contracts the agent depends on. What gap does this leave?

  • A. None — prompt and model versioning are always sufficient
  • B. A regression caused by a tool-contract change would be untraceable, since that layer was never recorded at all
  • C. This gap only matters for online task-success regression, not versioning
  • D. Tool contracts never need to be versioned for agents

Omitting tool contracts from the version record leaves one of the two layers that actually drift under an agent completely unrecorded, making a tool-contract-caused regression impossible to trace back with confidence.

8. Placing this lesson within the chain M8-02 through M8-04 builds, what does automated versioning specifically contribute that per-step tracing and online regression benchmarking do not?

  • A. Nothing — tracing and regression benchmarking are sufficient on their own
  • B. The mechanism that makes a confirmed diagnosis into an actual, traceable, safely-reversible fix, rather than leaving the finding as an unactioned diagnosis
  • C. A replacement for per-step tracing, making M8-02 unnecessary
  • D. A way to eliminate the need for online regression benchmarking in M8-03

Tracing locates a divergence and regression benchmarking confirms it, but neither one, by itself, provides a way to safely undo the change responsible — that is exactly what coordinated, automated versioning supplies.