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

# Audit

> Overview of NexusOne's Audit feature used for searching who did what across data access, APIs, and more.

When something goes wrong, or an auditor asks who did what, you need a record you can search. Without one, you would
dig through the logs of each NexusOne platform component separately, and each component names its fields
differently.

The Audit feature gives you a single place to search what happened across NexusOne platform components. You can find
out who accessed a table and who called the API. You can also see which tools ran, which business rules applied, and
how the AI Router handled a request.

NexusOne organizes what it records into streams. A stream is the audit trail of one area, such as data access or API
calls.

## Key features

The Audit feature provides the following:

* **Field-aware filters**: Filter on any field of a stream. Each field offers comparisons that suit its type, such as a
  date, a name, or a number.
* **Full event details**: Open any result to see everything NexusOne recorded about it.
* **One page for every audit trail**: Search all five audit streams in one place.
* **Role-based access**: Limit searching to users with the `nx1_audit_viewer` role. No role can change the records.
* **Time range search**: Narrow a search to the date and time range you need.

## How it works

Audit has five streams, which you search one at a time.

* **Data Access**: Every access that Ranger evaluated.
* **API calls**: Each authenticated call to the NexusOne API.
* **MCP tool calls**: Each tool called over MCP.
* **Business rules**: Each use and change of a rule.
* **AI Router**: Each routing decision the AI Router made.

The following sections give a brief overview of each stream.

### Data access

[Apache Ranger](https://docs.nx1cloud.com/platform-components/apache-ranger/ranger-in-nx1.md) enforces data access policies in NexusOne.
The Data Access stream records every access that Ranger evaluated, and Ranger writes these records itself.

The Data Access stream provides the following:

* **What it records**: The following for each event:
  * Who made the request.
  * The resource they tried to reach.
  * The type of access.
  * Whether the policy allowed it.
* **Allowed and denied access**: Each event has a **Result** field, which is `1` when a policy allowed the access and `0`
  when it denied the access. Filter on `0` to find every denied request.

### API calls

API calls records one event for each authenticated call to the NexusOne API, plus every access denial.

The API calls stream provides the following:

* **What it records**: The following for each event:
  * The user.
  * The method and path of the call.
  * How the caller authenticated.
  * The outcome.
  * The client IP address.
* **Denied calls**: When the API denies a call, the event shows the roles the call required and the reason for the
  denial.

### MCP tool calls

MCP tool calls records one event for each tool called over MCP. NexusOne features such as chat, crews, and the AI
Router call tools this way, and so can an MCP client.

The MCP tool calls stream provides the following:

* **What it records**: The following for each event:
  * The user.
  * The tool.
  * The outcome.
  * How long the call took.
* **What it leaves out**: NexusOne records the names of the arguments passed to a tool, but never their values.

### Business rules

In NexusOne, a business rule is a decision table that turns your data into a decision. For example, a rule can decide
whether to approve a loan or which discount a customer gets.

The business rules stream provides the following:

* **Who changed a rule**: Each time someone changes the status of a rule, such as by submitting, approving, or publishing it, the event
  shows who did it and which rule it affected.
* **Which rule made a decision**: Each time a rule runs or someone simulates it, the event shows which decision and
  version ran, the outcome, and how long it took.
* **Tracing a rule**: Each event has a **Ruleset hash** field. Filter on it to find every evaluation that ran exactly
  the same rules.

### AI router

The AI router receives requests for LLMs and sends each one to the LLM that should answer it.
This stream records every routing decision the AI Router made. The router writes these records itself.

The AI Router stream provides the following:

* **What it records**: The following for each request:
  * The LLM the client asked for.
  * The LLM the router used.
  * The decision that matched.
  * The token counts and latency of the request.
* **Guardrail results**: Whether the router flagged a jailbreak attempt, personal data, or a hallucination.

## Use cases

These examples show how different industries can use NexusOne's Audit capabilities:

* **Financial services**: Search Data Access for denied requests on a table of client accounts, to show an auditor who
  tried to read it.
* **Healthcare**: Search AI Router for requests that carried personal data, to confirm how patient details were
  handled.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.