Policy Attribute Reference
A HYPR AgentPass™ policy condition can refer to any attribute on this page. The policy form carries the same list under Available attributes reference. This page adds what the form cannot say at length: when each attribute is present.
How to Read This Reference
An attribute is either always present on the traffic described, or present only when the gateway resolved it. When an attribute is absent, a condition that tests it is not a match. The policy does nothing, and reports no error.
That is the safe direction. It also means a block written only on a sometimes-absent attribute lets through the traffic it never learned about. How Policies Are Evaluated explains this in full. On this page, the Presence column tells you which case you are in.
Types are CEL's: String, Int, Bool, List, and Map for a parsed JSON object. You reach a map's fields with dots, such as request.body.max_tokens. Test a field that might not be there with has() before comparing it.
Request
These attributes are present on every request, in both phases.
| Attribute | Type | Presence | Description |
|---|---|---|---|
request.method | String | Always | HTTP method, such as GET, POST, PUT or DELETE |
request.path | String | Always | Request path, such as /v1/messages |
request.headers | Map | Always | HTTP request headers |
request.body | Map | Always | The parsed JSON body. An empty map when the body is not JSON. |
request.body_raw | String | Always | The request body as unparsed text. An empty string when there is no body. |
request.listener | String | Always | The listener that received the request. Usually the connector's name, and agent-portal on Agent Portal traffic |
request.route | String | Always | Reserved. An empty string on current traffic, so do not build a rule on it |
request.backend | String | Always | The backend the request will be forwarded to. Usually the connector's name |
request.user | String | When the gateway resolved the person | See The Signed-In Person |
request.agent | Map | Always; empty when unauthenticated | See The Calling Agent |
request.file_count | Int | Always; 0 when none | See Attached Files |
request.files | List | When the request carries files | See Attached Files |
The Calling Agent
request.agent describes the agent identity the gateway authenticated for this request. It is an empty map when the caller is unauthenticated, so each of these fields is absent on anonymous traffic:
| Attribute | Type | Presence | Description |
|---|---|---|---|
request.agent.name | String | When authenticated | The agent's name |
request.agent.owner | String | When authenticated | Email of the agent's owner, its supervisor |
request.agent.scopes | List of String | When authenticated | The agent's permission scopes |
request.agent.type | String | When the agent holds an inference or tools scope | inference, tools or both, derived from the scopes. Absent for an agent with neither. |
The Signed-In Person
One attribute identifies the person a request acts for.
| Attribute | Type | Presence | Description |
|---|---|---|---|
request.user | String | When the gateway resolved the person | Email of the person this request acts for, as the gateway verified it at sign-in. That is someone chatting in the Agent Portal, or an agent session established against a verified identity. Never a value the caller claimed about itself. |
The gateway resolves the person on MCP, REST API and Microsoft 365 Copilot connectors, and on an Agent Portal upload. On Anthropic, OpenAI, AWS Bedrock and custom connectors, request.user is absent.
request.user is absent when nobody signed in. A block written as !request.user.endsWith("@example.com") therefore lets every anonymous request through. Write it with a guard that is always present, as shown in Policy Examples. Requiring a sign-in in the first place is the connector's job, not the policy's.
Attached Files
When a request carries files through the Agent Portal, a policy can test what they are and what they contain.
| Attribute | Type | Presence | Description |
|---|---|---|---|
request.file_count | Int | Always; 0 when none | How many files the request carries. The safe way to ask whether this request carried a file at all. |
request.files | List | When the request carries files | One entry per file. Absent when there are none, so request.files.exists(…) is a non-match on ordinary traffic. |
Each entry in request.files has these fields:
| Field | Type | Presence | Description |
|---|---|---|---|
name | String | Always | File name |
mime_type | String | When known | File type, such as application/pdf |
size_bytes | Int | When known | Size in bytes |
sha256 | String | When known | Checksum of the file's contents |
parsed_chars | Int | When text was read | How many characters of text were read out of the file |
truncated | Bool | When text was read | Whether reading stopped before the end of the file |
text | String | When text was read | The text read out of the file, up to a limit. Text beyond the limit is not checked, so a rule looking for a phrase near the end of a very long document may not find it. |
sensitivity_label | Map | On an upload in the Agent Portal | The Microsoft Purview sensitivity label the file carries, and whether its format can carry one at all. See The Document's Sensitivity Label. |
A file is checked twice: when it is uploaded, and again on the message that sends it to the agent.
- At upload,
name,mime_type,size_bytesandsha256are the gateway's own measurement of the file. It reads the type from the contents, so a renamed attachment is measured for what it is. - On the send, those four fields describe what the caller says the file is.
Write rules about those four fields to act at upload. text is the content that actually reaches the agent, so a rule about text holds equally on both.
The text a rule reads is used for the check, and then discarded. It is never written to the audit trail or a log. The audit trail records a file's name, type, size, checksum, how many characters were read, whether reading stopped early, and any sensitivity label.
The Document's Sensitivity Label
When a file is uploaded in the Agent Portal, AgentPass reads the Microsoft Purview sensitivity label the document carries. It offers the label to a policy as request.files[].sensitivity_label. A rule can then block anything marked Highly Confidential, or require every Office document to be classified before an agent reads it.
sensitivity_label is AgentPass's own reading of the document it received, so it is present only on the upload. It is absent on the message that sends the file to Copilot or a Copilot Studio agent. A label there could only be something the caller claimed about the file, so AgentPass offers nothing.
A condition on an absent attribute is never true, so a label rule written for a send does nothing. Write label rules to act at upload. See Agent Portal Attachments for what else the upload checks.
The label carries these fields:
| Field | Type | Presence | Description |
|---|---|---|---|
state | String | Always, on an upload | labeled, unlabeled or not_applicable. See What the Three States Mean |
id | String | When the label carries an identifier | The label's identifier in Microsoft Purview. Prefer this over name in a rule you enforce. |
name | String | When the label's name is on the document | The label's display name, such as Highly Confidential |
parent_id | String | When the label is a sub-label | The identifier of the label it sits under, so one rule covers a whole branch of your label taxonomy |
source | String | When a label was found | msip_properties for Microsoft Purview's own stamp, label_info_part for the label information inside an unencrypted Office file, which carries the identifier but no name, or sensitivity_property for a plain sensitivity name a third-party tool wrote |
protected | Bool | Only when the label states it | Whether the label asserts rights protection. Purview does not normally record this on the document, so it is usually absent. Do not build a rule that depends on finding it. |
What the Three States Mean
state is the one field that is always there. Build a rule on it when you want an answer for every upload, not only the labeled ones. It takes three values:
| State | Meaning |
|---|---|
labeled | The document carries a sensitivity label. The other fields describe it. |
unlabeled | The format can carry a sensitivity label, AgentPass looked, and there was none. |
not_applicable | The format cannot carry an Office sensitivity label at all: plain text, Markdown, CSV, JSON, HTML and PDF. |
not_applicable lets you require every Office document to be classified without also blocking every text file. state == 'unlabeled' reaches unclassified Word, Excel and PowerPoint documents, and leaves alone the formats that could never carry a label.
Prefer the Label's Identifier to Its Name
name is what you recognize, such as Highly Confidential, which makes a rule easy to read. It also changes the moment somebody renames the label in Microsoft Purview, and a rule naming the old value stops matching.
An identifier does not change, so id is the better choice for a rule you rely on. Keep the label's name in the policy's Description, so the rule stays readable.
parent_id is set on a sub-label. A rule written against a parent label's identifier therefore covers every sub-label under it. You need not list each one, or re-edit the rule when your taxonomy grows.
Working conditions for all of this are in Policy Examples.
Response
These attributes are present only on a Post-Response rule. During Pre-Request, the whole response map is empty, so each of them is absent.
| Attribute | Type | Presence | Description |
|---|---|---|---|
response.status | Int | Post-Response | HTTP status code |
response.headers | Map | Post-Response | HTTP response headers |
response.body | Map | Post-Response | The parsed JSON response body |
response.latency_ms | Int | Post-Response | How long the backend took to respond, in milliseconds |
On a model provider connector, a Post-Response rule that reads only response.* holds the whole reply until it has run. See Governing Inference Traffic.
Connector
These attributes are present on every request, whatever kind of connector handled it.
| Attribute | Type | Presence | Description |
|---|---|---|---|
connector.name | String | Always | Name of the connector handling this request |
connector.template | String | Always | The kind of connector: ANTHROPIC, OPENAI, AWS_BEDROCK, AWS_BEDROCK_MANTLE, MCP_PROXY, REST_API, AWS_AGENTCORE, ANTHROPIC_MANAGED_AGENTS, M365_COPILOT or CUSTOM |
connector.onboarding_mode | String | Always | How the connector treats an agent that has not been onboarded: REQUIRE_APPROVAL, AUTO_APPROVE, DISABLED or OBSERVE |
Lead with a connector.template guard on any rule that is specific to one kind of connector, such as connector.template == "AWS_BEDROCK" && …. The Connectors field on the form scopes the policy the same way. The guard makes the intent visible in the rule itself.
A connector with a data ceiling also carries connector.data_ceiling and connector.data_ceiling_rank. See Data Classification.
The AWS Caller Behind a Bedrock Request
On an AWS Bedrock connector, connector.aws.bedrock.* describes the AWS developer behind the request, as far as the gateway could identify them. It covers identity, credential, client and network. Only identity_source, credential_type and has_security_token are always present, and the rest arrive when resolved. Bedrock Caller Policies lists every attribute and the safe pattern for a block.
Microsoft 365 Copilot Details
On a Microsoft 365 Copilot connector, connector.m365.copilot.* describes where the request came from:
- The Agent Portal surface
- The signed-in person
- The Microsoft Entra tenant
- The conversation
- On a Copilot Studio turn, the agent it targets
Only surface is always present. Microsoft 365 Copilot Policies lists every attribute and the surface values.
Data Classification
tool.name and tool.connector are present on every tool call, labeled or not. Most of the others are present only when something classified the call, such as a label on the tool or connector this request reaches. The Presence column gives each case. Classifying the Data Your Tools Handle explains how a label is assigned, and how a call's effective classification is resolved.
| Attribute | Type | Presence | Description |
|---|---|---|---|
tool.name | String | On a tool call | The tool being called |
tool.connector | String | On a tool call | The connector providing it |
tool.tier · tool.tier_rank | String · Int | When the tool is labeled | The tier assigned to the tool, and its rank |
tool.tags | List of String | When the tool is labeled | The tags assigned to the tool |
data.tier · data.tier_rank | String · Int | When anything classified the call | The effective classification of this call, from the tool's labels, the connector default, any tag floor and the sensitivity label on an attached file |
data.tags | List of String | When anything classified the call | The effective tags |
data.sources | List | When anything classified the call | What contributed the classification, and how. Each entry's origin is assignment (an administrator), external (a sensitivity label on a file), detected (content detection) or semantic (the optional classifier). Each entry also carries kind (TOOL, RULE or CONNECTOR) and detail, a readable description of the source. Use origin, not kind, to tell an assignment from a detection |
data.scan | String | When content detection scanned the call | full, or truncated (the payload exceeded the scan window, so part of it was not read) |
data.semantic | String | When the semantic tier is on and the call has arguments to classify | ok, low_confidence, adversarial, unavailable, budget or withheld (not sent, because content detection found a credential inside a value) |
data.confidence | Double | When the classifier returned a confidence | The classifier's confidence in its verdict |
data.advisory | Bool | Only when true | The verdict fell between Advise above and Act above. It still contributes to the classification, so an enforcing rule that should act only on confident verdicts can exclude it. A verdict below Advise above is low_confidence, recorded and never acted on |
connector.data_ceiling · connector.data_ceiling_rank | String · Int | When a ceiling is set on the connector | The highest classification this destination may receive |
response.data.* | — | Post-Response, when the call is classified or its reply was scanned | tier, tier_rank, tags, sources and scan only. The call's classification, raised by anything detection found in the reply, so it is never lower than data.*. When the reply was not scanned, it repeats the request's classification |
data.scan is reported separately from the tags, so "nothing was found" and "not all of it was read" stay distinguishable. A rule that must not pass unexamined content should test data.scan as well as the classification.
Compare tier_rank, not tier. Tier names are yours to rename, and a rule naming one stops matching the day somebody does. The rank survives a rename.
Ranks start at 1. A call that nothing classified carries no data.tier, data.tier_rank, data.tags or data.sources, not a rank of 0. A condition on them is therefore a non-match, not a comparison against zero. Such a call can still carry data.scan and the semantic attributes.
Session
These attributes are present when session tracking is on, and the caller could be identified. They are available on the Pre-Request phase, on MCP and REST API connectors. They describe what the call's session read before this call. The call itself is described by data. Governing What a Session Has Already Read explains what counts as a session and which calls contribute.
| Attribute | Type | Presence | Description |
|---|---|---|---|
session.tier_rank | Int | When session tracking identified the caller | Rank of the most sensitive tier the session has read; 0 when it has read nothing classified |
session.tier | String | When session.tier_rank is above 0 | The key of that tier |
session.tags | List of String | When session tracking identified the caller | Every tag the session has read |
session.connectors | List of String | When session tracking identified the caller | Every connector the session has called, classified or not |
session.contributions | Int | When session tracking identified the caller | How many calls have counted toward the session |
session.key_kind | String | When session tracking identified the caller | How the session was identified: agentcore_session, cma_session, agent_identity or user |
The whole session map is absent on the Post-Response phase, on any other kind of connector, when tracking is off, when nothing identifies the caller, or when the session record cannot be read in time. As everywhere, an absent attribute is a non-match, so a session rule steps aside rather than blocking.
Inference
On a connector that reaches a model, a policy reads a normalized view of the conversation. One rule therefore works the same whichever provider is behind the connector. The model connectors are Anthropic, OpenAI, AWS Bedrock, AWS Bedrock Mantle and, in part, Microsoft 365 Copilot.
On any other connector, the whole inference map is empty, and each of these attributes is absent. An inference rule scoped to the wrong connector therefore matches nothing, not everything.
You do not need this section to write an inference rule. Describe your goal in plain English, and the gateway drafts it, as described in Authoring a Policy with AI. Use this section to read a draft closely, or to write a rule by hand.
Check the Newest Message, Not the Whole Conversation
An inference request carries the entire conversation. Every time an agent takes another step, it resends every turn so far. A rule that matches anywhere in that conversation keeps matching on every later turn. A single blocked prompt can therefore block the rest of the conversation.
The inference.latest_turn attributes scope a rule to the newest message only. A rule written against them fires once, on the turn that introduced the content. Evaluation also stays quick, because the text checked is one turn, not the whole history.
Prefer inference.latest_turn.text over matching the conversation as a whole. It is what makes a rule fire once instead of repeatedly.
Request Attributes
These attributes describe what the agent sent. They are available to a rule in either phase.
| Attribute | Type | Presence | Description |
|---|---|---|---|
inference.provider | String | Inference connectors | anthropic, openai, bedrock or m365_copilot. AWS Bedrock and AWS Bedrock Mantle connectors both report bedrock |
inference.model | String | When the request names one | Model being called |
inference.system | String | When there is one | System prompt, flattened |
inference.turn_count | Int | Inference connectors | Turns in the conversation so far |
inference.tools | List of String | Inference connectors | Tools the agent says it can run |
inference.latest_turn.role | String | When there is a turn | Who sent the newest message, such as user or assistant. On an OpenAI connector, a tool's output arrives as tool. Anthropic and AWS Bedrock carry a tool's output in a user turn |
inference.latest_turn.text | String | When there is a turn | Text of the newest message only. Use this instead of the whole conversation. |
inference.latest_turn.tool_results | List of {tool_name, input_json, content} | When there is a turn | Output the agent fed back after running a tool on its own machine. tool_name is the tool, and the file path or command it was given is in input_json. |
Reply Attributes
These attributes describe what the model sent back. They are available to a Post-Response rule.
| Attribute | Type | Presence | Description |
|---|---|---|---|
inference.tool_uses | List of {name, input_json} | Post-Response | Tools the model is asking to run. Use this to stop dangerous commands. |
inference.completion.text | String | Post-Response | The model's reply text |
inference.completion.stop_reason | String | Post-Response | Why the model stopped |
Enforcing a rule that reads these stops the reply at the tool call. See Governing Inference Traffic.
Tool Names and Tool Arguments
A tool call has two parts, and rules generally need the second one.
tool_name on inference.latest_turn.tool_results, and name on inference.tool_uses, is the tool, such as Read or Bash. What the tool was asked to act on, such as the file path or the shell command, is in input_json.
A rule that looks for a credential read therefore matches on input_json. The tool name is Read for every read the agent makes, whatever the file. Shell commands work the same way: the tool name is Bash whether the command is harmless or destructive, and the command itself is in input_json.
Tool results use tool_name, and tool uses use name.
On a Microsoft 365 Copilot Connector
Microsoft's relay hands the gateway a prompt and a reply, not a provider conversation. A Copilot connector therefore fills only part of this namespace:
| Attributes | On a Copilot connector |
|---|---|
inference.provider, inference.latest_turn.text, inference.completion.text | Carry a real value: m365_copilot, the message the user just sent, and Copilot's reply |
inference.turn_count, inference.latest_turn.role | Present, but always 1 and user, because the relay sends the newest message alone |
inference.model, inference.system | Never arrive. A rule on either never fires on a Copilot connector. |
inference.tools, inference.latest_turn.tool_results, inference.tool_uses | Present, but always empty lists |
inference.completion.stop_reason | Present, but always an empty string |
Adding a reply-side rule to a Copilot connector changes how replies arrive for everyone using it. See Checking What Copilot Replies before you enable one.
Related
- How Policies Are Evaluated — why an absent attribute never matches, and what a match does
- Writing a Policy by Hand — the form, the operators, and the in-product reference panel
- Policy Examples — a working expression for every namespace on this page
- Agent Portal Attachments — the file types an upload may carry, and what is checked before a policy sees it
- Classifying the Data Your Tools Handle — how the
tool.*anddata.*values are assigned and resolved