> ## Documentation Index
> Fetch the complete documentation index at: https://docs.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Auditing and governing Box AI and Box Extract

Box AI and Box Extract work with the files you already store in Box. Box Extract saves the values it extracts as metadata on the source file, or delivers them through the API to other systems. You audit and govern this work with the controls you already use for your content.

| Task | Control |
| - | - |
| Decide who can use Box AI and Box Extract | [Box AI settings in the Admin Console](#control-who-can-use-box-ai-and-box-extract) |
| Limit which content Box AI reads and who can edit extracted metadata | [Permissions](#permissions-for-box-ai-and-extracted-metadata) |
| Review Box AI queries | [User Activity report and enterprise events](#audit-box-ai-activity) |
| Check which files a Custom Extract Agent processed | [Run History](#run-history) |
| Track metadata changes | [User Activity report and enterprise events](#audit-box-ai-activity) |
| Keep files for a set period or prevent their permanent deletion | [Retention policies and legal holds](#retention-policies-and-legal-holds) |
| Apply retention automatically from extracted values | [Retention for metadata that Box Extract sets](#retention-for-metadata-that-box-extract-sets) |

> [!NOTE]
>
> * Box AI reporting in the User Activity report is available on Business plans and above.
> * Box Extract Agent APIs are available on Business plans and above. Custom Extract Agents are available on Enterprise Advanced plans.
> * Retention policies and legal holds are part of Box Governance, which is included in Enterprise Plus and Enterprise Advanced plans and available as a paid add-on to other business plans.

## Control who can use Box AI and Box Extract

Admins control access to each Box AI service in **Admin Console > Box AI > Settings**. Services include AI Home, Box Preview, Box Notes, Box Hubs, Box Extract, the Box AI API, and official Box integrations. For most services, you can enable Box AI for all managed users, for selected users and groups, or for everyone except selected users and groups, or disable it for all managed users. You can enter up to 100 names or email addresses and up to 100 groups. The Box AI API setting applies to all developer users. See [Configuring Box AI](https://docs.box.com/en/box-ai/admins/configuring-box-ai.md).

Users who are not enabled for Box Extract do not see the **Extract** tab. See [Enabling Box Extract](https://docs.box.com/en/box-extract/enabling-box-extract.md). In Box Preview, the **Enable File Metadata Autofill** option, and its references and confidence levels sub-options, are disabled by default.

Only admins and co-admins can create, generate, or edit metadata templates. Managed users can use or replace an existing template in a Custom Extract Agent. See [Using Box Extract](https://docs.box.com/en/box-extract/using-box-extract.md#create-a-custom-extract-agent).

## Permissions for Box AI and extracted metadata

### Box AI uses the requesting user's access

Box AI respects user permissions and enterprise security policies, and your data does not train AI models without explicit permission. See [About Box AI](https://docs.box.com/en/box-ai/getting-started/what-is-box-ai.md).

Box AI can only read and synthesize information from content the user can access, and Box Agent searches only the content available to the user through permissions and collaboration settings. See [Accessing Box AI](https://docs.box.com/en/box-ai/using-box-ai.md). Box Shield classifications can narrow this further. Depending on who has access to classified content, Box AI for Hubs might not use that content to generate responses. See [Box AI for Hubs](https://docs.box.com/en/box-ai/admins/box-ai-for-hubs.md).

### Custom Extract Agents use the agent owner's folder access

You can attach a Custom Extract Agent only to folders where the agent owner has Owner, Co-owner, Editor, or Viewer Uploader access. If the owner loses access to the source folder or file, the extraction fails. Custom Extract Agents are private to the user who creates them and cannot be shared with other users.

> [!WARNING]
>
> If the owner's access changes to Viewer or Previewer after the folder is attached, extraction still runs, but Box cannot update the metadata and does not record the extraction in Run History. Detach the folder from the agent to avoid this.

See the limitations in [About Box Extract](https://docs.box.com/en/box-extract/about-box-extract.md#limitations).

### Metadata follows folder permissions

Extracted values are metadata, so standard metadata permissions apply. A collaborator who can view an item can view its metadata, and a collaborator with upload permission can also edit the values. For example, a Viewer can only view metadata, while a Previewer Uploader can view and edit it. External collaborators outside your enterprise cannot add metadata instances to a file in the web app.

See [Using metadata](https://docs.box.com/en/box-fundamentals/for-users/staying-organized/organizing-and-tracking-content/using-metadata.md#permissions-and-collaboration) and [Understanding collaborator permission levels](https://docs.box.com/en/box-fundamentals/for-users/collaborating/collaborating-by-inviting-others/understanding-collaborator-permission-levels.md).

## Audit Box AI activity

### User Activity report

The [User Activity report](https://docs.box.com/en/box-admin-tools/reporting-and-insights/user-activity-report.md) includes an **AI Activity** action type. It logs an **AI query** when a user queries Box AI and receives a response, and a **Failed AI query** when the user does not receive a response.

You can filter the report by users or groups, by folders or files, and by date range. You can view or export the results as a .csv file.

### Enterprise events

The enterprise event stream records Box AI activity with these event types:

| Event type | When it occurs |
| - | - |
| `BOX_AI_USER_REQUEST` | A user asks Box AI a question or makes a request. |
| `BOX_AI_USER_FAILED_REQUEST` | The question or request returns an error. |
| `AI_SECURITY_DETECTION` | Box AI detects a potential security risk, such as a prompt injection attempt, in a Box Agent session. Legacy agents and Box Shield Pro agents are not scanned. |

Retrieving enterprise events with the API requires an admin or co-admin with permission to run new reports and access existing reports. See [enterprise events](https://developer.box.com/guides/events/enterprise-events/for-enterprise) and [AI security detection events](https://developer.box.com/guides/events/event-triggers/ai-security-detection-events) in the Box Developer Documentation.

### Box AI usage

The **Usage** tab in the Admin Console shows AI Unit consumption, AI usage by product and user, and the users approaching their daily usage limits. Data can be up to one hour behind. See [Viewing Box AI usage in the Usage tab](https://docs.box.com/en/box-ai/admins/viewing-box-ai-usage.md).

## Audit Box Extract runs and metadata changes

### Run History

Each Custom Extract Agent has a **Run History** that records extraction jobs, including status, source folder, date and time, and file name. Select a file name to verify the extracted metadata in Box Preview. Failed extractions include a tooltip that explains the reason. See [Managing Custom Extract Agents in Box Extract](https://docs.box.com/en/box-extract/managing-custom-extract-agents-in-box-extract.md).

Keep these Run History limitations in mind:

* Run History records are stored temporarily.
* If a file in the Run History is deleted, its log is also removed.
* A file with no metadata found still shows a **Success** status.
* If the agent owner's access to a source folder changes to Viewer or Previewer, extractions still run but are not recorded in Run History.

### Metadata actions and events

In the User Activity report, the **Metadata** action type records **Added template**, **Removed template**, and **Edited Attributes** actions.

In the enterprise event stream, metadata instance changes appear as `METADATA_INSTANCE_CREATE`, `METADATA_INSTANCE_UPDATE`, `METADATA_INSTANCE_DELETE`, and `METADATA_INSTANCE_COPY` events. Template changes appear as `METADATA_TEMPLATE_CREATE`, `METADATA_TEMPLATE_UPDATE`, and `METADATA_TEMPLATE_DELETE`, and cascade policy changes as `METADATA_CASCADE_POLICY_CREATE` and `METADATA_CASCADE_POLICY_APPLY`.

## Retention policies and legal holds

### Retention policies

Retention policies keep content in Box for a set period and can remove it at the end of that period. A policy can apply to content in specified folders, content with specified classification labels or metadata, or all new content.

Retention policies apply to all versions of a file. For metadata-based retention, if you remove the metadata that carries a retention policy from a file, the file is still governed by the original policy. Retention periods can also start on a date defined in file metadata, which is called event-based retention. See [About retention and retention policies](https://docs.box.com/en/box-governance/retention/about-retention-and-retention-policies.md) and [Adding metadata to a retention policy](https://docs.box.com/en/box-governance/retention/adding-metadata-to-a-retention-policy.md).

### Retention for metadata that Box Extract sets

Retention policies treat a metadata value the same way whether a user, a third-party integration, or a Custom Extract Agent sets it. For example, if a retention policy keeps files where **Document Type** is **Contract** for 7 years, and a Custom Extract Agent sets **Document Type** to **Contract** on an uploaded file, the policy applies without anyone tagging the file manually.

Event-based retention works the same way. The retention period starts from the date a Custom Extract Agent sets in the metadata field. Event-based retention is an advanced capability that can require design and planning, so contact Box Support or your Customer Success team before you set it up.

### Legal holds

While a legal hold policy is active, Box prevents the files, folders, or custodians' content it covers from being permanently deleted. A legal hold also overrides a retention policy's **Permanently Delete** disposition action until the hold is lifted. See [About legal hold policies](https://docs.box.com/en/box-governance/legal-holds/about-legal-hold-policies.md).

### Audit retention and legal holds

| Source | What it shows |
| - | - |
| User Activity report | The **Legal Holds** and **Policies** action types record legal hold policy and custodian changes, and folders or metadata added to or removed from a retention policy. |
| [Retention report](https://docs.box.com/en/box-admin-tools/reporting-and-insights/retention-report.md) | The files a retention policy covers. |
| [Disposition report](https://docs.box.com/en/box-admin-tools/reporting-and-insights/disposition-report.md) | The disposition of content under retention policies. |
| Enterprise events | `LEGAL_HOLD_POLICY_CREATE`, `LEGAL_HOLD_POLICY_UPDATE`, `LEGAL_HOLD_POLICY_DELETE`, `LEGAL_HOLD_ASSIGNMENT_CREATE`, `LEGAL_HOLD_ASSIGNMENT_DELETE`, and `RETENTION_POLICY_ASSIGNMENT_ADD` events. |
