How do you detect when an AI system drifts from its documented purpose?
Purpose drift is when an AI system starts doing things its documented purpose doesn't cover: calling new tools, reaching new providers, or handling new kinds of data. Detect it by declaring the data classes and tools a system is meant to use, and comparing them with what runtime enforcement observes. Each difference becomes a notice to the system's owner.
Purpose drift is a governance problem, not a model problem. The model can work exactly as well as it did on launch day while the system around it gains an MCP server, a new data source, or a new class of user. The documented purpose then describes a system that no longer exists, and every review, risk tier, and approval that relied on it is out of date. This guide explains how drift differs from model drift, how to declare what a system is for, and what to do when the observed behavior moves away from it. For the governance model it fits into, see what is AI governance.
What is purpose drift in an AI system?
Purpose drift is the gap that opens between an AI system's documented purpose and what the system does in production. An AI system is an application or agent together with the model providers and tools it uses. Its purpose is the record of what it's for, which data it may handle, and which tools it may call. Drift is any observed behavior outside that record.
Drift usually comes from ordinary changes, not from an attack. The following list describes common causes:
- A configuration change adds a tool. Someone adds an MCP server to a coding agent's configuration, or a new tool to an agent's tool list, and the change ships without a governance review.
- The data changes. A support assistant designed for order questions starts receiving pasted medical records, because customers send what they send.
- The users change. An internal agent built for one team gets shared with another team whose work involves different data.
- The agent finds a new path. A model given a general tool, such as a shell or a web fetch, uses it for tasks nobody listed.
People sometimes call this scope creep. The difference is that scope creep describes a project's plan growing, while purpose drift describes a running system's behavior moving away from its record. The second is measurable, because you can compare the record with what the system did.
How is purpose drift different from model drift?
Model drift is a decline in a model's accuracy or output quality as the data it sees moves away from the data it was trained or evaluated on. Purpose drift is a change in what the system does, whether or not its outputs are accurate. The two need different monitoring, and a third kind, behavior drift within one session, needs another. The following table compares them.
| Kind of drift | What changes | How you detect it | Who acts on it |
|---|---|---|---|
| Model drift | Accuracy, quality, or fairness of the model's outputs over time | Evaluation metrics on production inputs and outputs, compared with a baseline | The team that trains or selects the model |
| Purpose drift | The tools, providers, and data classes the system uses, compared with its documented purpose | Declared tools and data classes compared with runtime records over days and weeks | The AI system's owner |
| Session behavior drift | The sequence of actions within one agent session, such as reading a credential and then uploading data | Review of the session's actions as they happen | The policy that decides the next action, then an administrator |
Model drift monitoring belongs with model evaluation. If you train or fine-tune models, you need it, and Arcjet doesn't measure model accuracy. Most teams that use third-party models through agents have little influence over model drift but full responsibility for purpose drift.
Session behavior drift is a security control that works inside a single session. Arcjet reviews the sequence of a coding agent's actions and flags the session as tainted when the sequence looks like harm done one reasonable-looking step at a time. A policy can then refuse the next risky action until a person clears the session. For how that review works, see how we built AI agent behavior drift analysis with Cloudflare Clef and what is session tainting. Purpose drift looks across sessions at whether the system as a whole still matches its record.
What does purpose drift look like in practice?
Purpose drift shows up as a tool, provider, or data class in the runtime records that the purpose doesn't list. The following examples show each kind. Arcjet's drift comparison covers the first three; a new provider shows up in the inventory instead:
- A new MCP server. A coding agent declared for source code changes starts calling a database MCP server. The declared tools list file edits, shell commands, and two approved MCP servers, and captured tool calls show a third.
- A new data class. A customer support agent declared to handle names and order numbers produces sensitive-information findings for protected health information (PHI) in its prompts.
- A new kind of tool. An internal research agent declared as read-only starts making tool calls that write files or send messages.
- A new provider. An agent declared to use one model provider starts sending requests to a second one, which then appears in the inventory as a provider with no decision or review.
None of these is necessarily wrong. A new MCP server might be an approved improvement, and PHI in a support channel might be something you have to accept and handle. What matters is that each change reaches the owner, who decides whether the purpose changes or the behavior does.
How do you set up purpose drift detection?
To set up purpose drift detection, declare what each AI system may use, and make sure the runtime records the same things. The following steps assume the system already appears in your AI inventory with an owner. For those steps, see AI inventory and AI system owners.
- Write the purpose in plain words. State what the system is for and who uses it. Keep it short enough that a reviewer can check behavior against it.
- Declare the data classes. List the sensitive data the system is expected to handle, using the classes your detection reports: personally identifiable information (PII), secrets, and PHI, which is in a pilot. Leave a class off if the system should never see it.
- Declare the tools. List the tool kinds and MCP servers the system may call. For a coding agent, this is often shell commands, file edits, and a short list of MCP servers.
- Put sensitive-information detection in the path. Drift on data classes needs findings to compare against. Add a Guard policy with sensitive-information detection to the prompts and tool calls the system sends. For detector details, see the sensitive information documentation.
- Capture tool calls. Install coding-agent hooks or report tool calls through the SDK, so Arcjet records the tools each system uses.
- Read the first notices with the owner. The first comparison often shows declarations that were incomplete rather than behavior that changed. Correct the declaration, mark the system reviewed, and treat later notices as real changes.
Drift detection is only as good as the declaration. A purpose field that says "general assistant" with every tool declared never drifts, because it allows everything. A narrow declaration produces useful notices.
How does Arcjet compare declared and observed behavior?
Arcjet compares each AI system's declared data classes and tools with its sensitive-information findings and captured tool calls, and sends the owner a notice when they differ. The comparison uses the records Arcjet already keeps, so it needs no separate agent or scan.
The following table shows what Arcjet compares for each declaration.
| Declaration | Compared with | A difference means |
|---|---|---|
| Data classes | Sensitive-information findings in the system's prompts and tool calls | The system handled a class of data its purpose doesn't list |
| Tools | Captured tool calls, including the MCP server and tool kind | The system called a tool or MCP server its purpose doesn't list |
The owner gets a drift notice, and the evidence page reports drift as its own signal, so an auditor can see which systems drifted from their declarations.
Drift doesn't block anything by itself. Blocking is a policy decision, and it belongs in a Guard policy that someone tested and published. Keeping the two apart means a drift notice can't break a working system, and a policy change still goes through test before live and, where you require one, a second approver.
What should an owner do with a drift notice?
The owner decides whether the purpose or the behavior is wrong, and then change one of them. A drift notice that's read and dismissed without a change leaves the record and the system disagreeing. The following table lists the usual responses.
| Finding | Response | What it records |
|---|---|---|
| The change is intended and acceptable | Update the purpose and declarations, then mark the system reviewed | A governance change in the WorkOS audit log and a new review date |
| The change raises the system's risk | Update the purpose, then revisit the risk tier and the controls that tier requires | A new risk tier and review on the AI system |
| The change isn't acceptable | Restrict it with a Guard policy, such as an MCP allowlist or a sensitive-information rule, published in dry run first | A policy revision, its test, and the decisions it makes |
| The system is no longer needed | Retire the actor | Revoked keys, a kept record, and the retirement in the audit log |
A drift notice is also a reason to review early. Reviews fall due every 180 days, and a system that gained a tool or a data class shouldn't wait for the next one. For the review routine, see AI system review. For how a change in data or tools can move a system between tiers, see AI risk tiers.
Which framework requirements does drift detection support?
Drift detection supplies evidence for requirements about intended use and monitoring in the NIST AI RMF and the EU AI Act. The following table lists the references. Titles are paraphrases. The evidence page also maps drift to ISO/IEC 42001, which the table leaves out because the standard's text is sold rather than published openly. For the frameworks themselves, see the NIST AI RMF, ISO/IEC 42001, and Regulation (EU) 2024/1689 on EUR-Lex.
| Requirement | Our short title | Drift evidence |
|---|---|---|
| NIST AI RMF MAP 1.1 | Intended purpose is documented | Purpose, declared data classes, and declared tools |
| EU AI Act Article 26(5) | Deployers monitor operation | Runtime records and drift notices |
The EU AI Act row applies to deployers of high-risk systems, and classification is a legal judgment. Purpose also matters outside AI law. Article 5(1)(b) of the General Data Protection Regulation (GDPR) requires personal data to be collected for specified purposes and not processed further in a way that's incompatible with them, and a drift notice on a PII class is a prompt to check that. For more information, see GDPR and CCPA compliance for LLM applications.
What does Arcjet not cover for purpose drift?
Arcjet detects drift only in what it records, and only against what you declare. The following list names the gaps:
- Systems Arcjet doesn't observe. An agent that doesn't report to Arcjet, or a coding agent without hooks, produces no tool calls to compare.
- Data classes outside detection. Arcjet's detection covers PII, secrets, and PHI (in a pilot). Drift into other kinds of sensitive data, such as trade secrets in free text, isn't detected.
- Paths without detection. A prompt or tool call that no sensitive-information policy inspects produces no finding, so it can't show drift.
- Model drift. Arcjet doesn't measure model accuracy, quality, or fairness.
- Whether the purpose is lawful or appropriate. Arcjet compares behavior with the purpose you wrote. Judging that purpose is your organization's work.
Where Arcjet fits
Arcjet keeps the purpose and the behavior in the same place. Each AI system in the inventory carries an owner, a purpose, declared data classes and tools, and a review date. Guard, coding-agent hooks, and sensitive-information detection record what the system does. Arcjet compares the two, sends each difference to the owner, and reports drift on the evidence page next to NIST AI RMF 1.0, ISO/IEC 42001, and the EU AI Act.
The comparison uses the records of the controls that enforce your policies, so you don't run a separate survey to find out whether a system still matches its purpose. When the owner decides a change isn't acceptable, the fix is a Guard policy in the same console, tested in dry run before it goes live.
For coding agents, the most common place drift starts, see AI governance for coding agents. For the full governance model, see what is AI governance.
Frequently asked questions
Is purpose drift the same as model drift?
No. Model drift is a decline in a model's accuracy or output quality as production data moves away from training data. Purpose drift is a change in what an AI system does, such as calling a new MCP server or handling a new class of sensitive data, whether or not the model's outputs stay accurate. Model drift needs evaluation metrics; purpose drift needs a declared scope compared with runtime records.
Does a drift notice block the AI system?
No. In Arcjet, purpose drift sends a notice to the AI system's owner and appears on the evidence page. Blocking is a separate decision, made with a Guard policy that passes a test and runs in dry run before it goes live, so a drift notice can't break a working system.
Which data classes can Arcjet compare for drift?
Arcjet compares the data classes its sensitive-information detection reports: personally identifiable information (PII), secrets, and protected health information (PHI), which is in a pilot. The comparison works only on prompts and tool calls that a sensitive-information policy inspects. Other kinds of sensitive data, such as trade secrets in free text, aren't detected.
How is purpose drift different from session tainting?
Session tainting looks at the sequence of actions within one coding-agent session and flags the session when the sequence looks harmful, so a policy can refuse the next risky action until a person clears it. Purpose drift looks across sessions at whether an AI system as a whole still matches its documented purpose, and notifies the owner.
Which frameworks ask for purpose drift monitoring?
None uses the term, but several requirements need it. NIST AI RMF MAP 1.1 asks for a documented intended purpose, and EU AI Act Article 26(5) asks deployers of high-risk systems to monitor operation. Arcjet's evidence page also maps drift to ISO/IEC 42001.
AI runtime security in your code
Protect your AI agent workflows with Arcjet
Purpose drift on data classes starts with detection in the path. Add sensitive-information detection to your agent's prompts and tool calls.