Skip to main content

Trust: Audit, Security and AI Governance

Who changed what, who used which AI, what the AI was kept from doing, and what you run: across agents, APIs, chat and voice, kept as records you can check, search and export.

Admin › Trust has seven tabs:

TabWhat it answers
Audit logWho changed which setting, user, model, agent, API, knowledge base or tool. Who signed in, failed to sign in, or signed out.
AI activityEvery model call: who, from which application, which model, which tools and data it used, how many tokens, the cost, and whether it failed.
SecurityFailed sign-ins, guardrail blocks, refused uploads, API keys used from new addresses; alert rules; shadow AI found in your proxy logs.
GuardrailsWhat each application does with prompt injection and personal data, and which chat tools ask before they run.
InventoryEvery AI asset, its owner, last use, the data it touches, its risk tier and license; what uses a piece of data; how models changed.
ReportsAI use by department, answer quality, the evidence pack for an auditor, and archived agent runs.
SettingsWho must use two-step sign-in, whether AI activity keeps prompt and response text, quality sampling and retention.

Only admins can open it. For a task-by-task guide to the audit records, see the Audit section.


Audit Log​

One row per change or sign-in event. Each row records:

  • who (a user, an API key, or the system);
  • from which address and browser;
  • what changed: the record's state before and after, plus a one-line summary.

What is recorded​

AreaChanges recorded
AgentsWorkflows, skills, automations, data sources and catalog secrets (name only)
APIsAPI definitions, their lifecycle and versions, and the gateway settings
ChatModels (create, edit, access, delete); knowledge bases and their files; Tools and Functions, including their code; usage limits; deleted chats (title and owner only, never the messages); refused uploads
VoiceVoice agents, deployments, review policies and settings
PlatformUsers (role, details, password changed, deleted); groups and their members; every setting changed in Admin › Settings; sign-ins (with the method: password, LDAP, SSO, two-step); failed sign-ins; sign-outs; API keys created or deleted; two-step sign-in turned on, off or reset; SCIM provisioning

Secrets never reach the log. Any field whose name marks it as a secret (a key, token, password, secret, header or webhook) is stored as set or not set. Token-shaped strings and credentials in URLs are hidden too. A changed secret shows in the summary as api_key: changed.

Tools and Functions keep their code (up to 200 KB, else its SHA-256), because they run on the server with full rights.

Searching and exporting​

  • Filters: application (Agents, APIs, Chat, Voice, Platform), action, period and text. Click a row to see its before and after.
  • Export CSV or JSON: downloads the filtered rows (at most 100,000) with their chain fields. The file's SHA-256 is shown and sent as the X-Content-SHA256 header: keep it with the file as evidence that it hasn't changed since.

Tamper evidence​

The audit log is one hash chain.

  • Each row is sealed, within seconds of being written. It gets:
    • a sequence number;
    • the hash of the row before it;
    • its own SHA-256 over all its fields.
  • Any change shows: changing a row, removing one or inserting one breaks the chain.
  • Verify: the Audit log tab shows Chain verified, or the first broken record and why.
  • Daily checkpoint: once a day, the latest hash is kept as a checkpoint. Set AUDIT_ANCHOR_WEBHOOK_URL and it is also POSTed outside Studio, for example to your SIEM: {"kind": "hrida-audit-anchor", "seq": …, "entry_hash": "…", "at": …}.
  • PostgreSQL: a database trigger refuses any change to a sealed row.
  • Retention: rows older than AUDIT_LOG_RETENTION_DAYS (2555 days, about 7 years) are removed from the start of the chain only. A checkpoint keeps the last removed row's hash, so the rest still verifies.
Tamper-evident, not tamper-proof

Someone with full access to the database can still delete rows, checkpoints or the trigger. They can't do it unnoticed when the daily anchors are kept somewhere they can't reach, such as AUDIT_ANCHOR_WEBHOOK_URL or the exports you keep.


AI Activity​

One row for every model call in Studio, in every application:

ApplicationCalls recorded
ChatChats, temporary chats, channels, the OpenAI-compatible API (with or without a chat), and background tasks such as titles, tags and follow-ups
AutomationsTheir runs' model calls
AgentsEvery LLM call of Agent Builder runs and skill tests, with the run and workflow
VoiceEach turn of a call, scenario tests and the post-call summary, with the session and voice agent
AssistantsThe API Builder assistant and the Admin Assistant
API gateway callsThe API Builder gateway's own call log (these calls use no model)

Each row records:

  • the user, the time, the model and its provider;
  • the chat, run or session;
  • the tools the model called, and the knowledge bases and files attached;
  • prompt and completion tokens, and the cost (from Model Pricing);
  • the time taken, the caller's address, and the error if the call failed.

Deleting chats doesn't touch it. So usage limits are counted from AI activity, and a user can't reset a limit by deleting chats. Background tasks (titles, tags, follow-ups) are recorded but don't count toward limits, as before.

Prompt and response text are not kept by default. Turn on Keep the prompt and the response of each model call in Settings when your audits must show what was asked and answered. Each is kept up to 20,000 characters, and cleared after the number of days you set. The rest of the row stays until AI_USAGE_RETENTION_DAYS (400 days).

Export CSV downloads the filtered rows, with their SHA-256.


Two-Step Sign-In​

Password and LDAP sign-ins can ask for a second step: a 6-digit code from an authenticator app (Microsoft Authenticator, Google Authenticator, 1Password and others).

  • Turning it on: each person can set it up in Settings › Account › Two-step sign-in. They scan the QR code, enter a code, and save the 10 recovery codes shown; each recovery code works once.
  • Requiring it: in Admin › Trust › Settings, choose Admins or Everyone. Anyone covered who has no app yet is asked to set one up at their next sign-in, before they get in.
  • Signing in: after a correct password, Studio asks for the code. Each code works once. A failed code is audited, and attempts are throttled.
  • Lost phone: an admin opens Admin › Users, edits the person and clicks Reset two-step sign-in. The reset is audited.
  • SSO: company-account sign-ins (OIDC, Microsoft, Google) rely on the identity provider's own MFA.

API Keys​

A user's API key (sk-…) is stored only as its SHA-256, plus an encrypted copy for Functions and Tools that call Studio as the user. The key is shown once, when it is created. After that, Settings › Account shows only how it starts and ends; if it is lost, create a new one. Keys created before this release keep working: they are converted on upgrade.


Upload Checks​

Every upload is checked on the server before it is stored:

  • Size: the Max Upload Size of Admin › Settings › Documents (RAG_FILE_MAX_SIZE, in MB), now enforced by the server as well as the browser.
  • Types that run code: executables and scripts (.exe, .dll, .bat, .ps1, .vbs, .jar, .lnk and more) are refused. So are documents with macros (.docm, .xlsm, .pptm…), unless FILE_ALLOW_MACRO_DOCUMENTS=true.
  • Viruses: set CLAMAV_HOST to scan every upload with ClamAV. An infected file is refused. When the scanner can't be reached, uploads are refused until it is back, unless CLAMAV_FAIL_OPEN=true.

Each refusal is in the audit log. To run ClamAV next to Studio:

yaml
  clamav:
    image: clamav/clamav:stable
    restart: unless-stopped
    volumes:
      - clamav-db:/var/lib/clamav
# and on the Studio service:
#   environment:
#     CLAMAV_HOST: clamav

Guardrails​

Built-in checks on what goes into and comes out of the models, in every application. They work without a builder adding anything; an Agent Builder guardrails node can still add its own.

CheckWhat it looks for
Prompt injectionText that tries to override instructions, reveal the hidden prompt, change the AI's role or make it misuse tools: patterns, and optionally an AI check
Personal dataCard numbers (with a Luhn check), Aadhaar, PAN, email addresses and Indian phone numbers: the API gateway's masking presets
Tool and API resultsInstructions hidden in a web page, file or API answer that a tool returned
Retrieved documentsInstructions hidden in the knowledge or files given to a chat model

For each application and check, choose what happens:

ActionEffect
OffNot checked
FlagA security event is recorded and the text goes through. For a tool result or documents, a note telling the model it is data, not instructions, is put first (not for JSON, which must stay parseable).
RedactPersonal data only: masked, then the call goes on
BlockRefused. A chat message gets This was blocked by your organization's AI policy; an agent run fails with that reason; a voice caller hears a short apology; a tool result or documents are withheld from the model.

Where they run:

  • Chat: chats, assistants, automations and the OpenAI-compatible API. The person's own message is checked, not the documents the platform added. An answer that isn't streamed is checked before it is returned. A streamed answer is already on its way, so it can only be flagged.
  • Agents: the run's input is checked once, when the run starts. Each model call's prompt is the builder's template around that input, so it is checked only for personal data. Every tool result is checked.
  • Voice: what the caller says, and the agent's answers. The summary after a call isn't checked.
  • API: API Builder responses that agents read are checked as tool results.

Defaults: injection, tool results and documents are flagged; personal data is off. Background tasks (titles, tags), direct connections and the platform's own checks aren't checked.

The AI check for injection asks a model whether a message tries to take it over, when the patterns found nothing. Choose its model under Model for the AI check (empty: the default model), and click Test to see that it answers.

When the AI check can't answer (its model failed, the provider is down, or it answered neither yes nor no), If the AI check cannot answer decides:

  • Let the message through (the default);
  • Flag the message: it goes through with a flag. It is never blocked because the check failed.

Either way, a warning is logged and a high-severity Guardrail AI check could not answer security event is recorded, at most one per 10 minutes, so a broken check doesn't go unnoticed.

Try it: the Try the saved policy box shows what the policy would do with a text, without recording anything.

Tools that ask first​

Chat tools in this list ask the person before they run: a dialog in the chat shows what the tool would do and its arguments (secrets hidden). The tool runs only if the person allows it. By default: send_email, execute_code, delete_automation, delete_calendar_event.

When no one can be asked (the OpenAI-compatible API, automations, a closed tab), When no one can be asked decides: Run the tool (the default) or Don't run it. A declined or unanswered call is a security event, and the model is told the tool wasn't run.


Security​

Security events are recorded as they happen:

EventSeverityWhen
Failed sign-inlowA wrong email or password, or a failed LDAP sign-in
Wrong second-factor codemediumA wrong authenticator or recovery code
Sign-ins throttledmediumToo many attempts for one account (one event per 5 minutes)
Blocked, flagged or redacted by the guardrailshigh, medium, lowSee Guardrails
Guardrail AI check could not answerhighThe AI check for injection couldn't judge a message (one event per 10 minutes)
Tool not allowedlowA tool that asks first was declined or not answered
Upload refusedmedium (high for a virus)See Upload checks
API key from a new addressmediumA user's API key used from an address it was never used from (not the first one)
Alert firedhighAn alert rule fired
Shadow AImediumSee Shadow AI

The tab shows the totals by severity, the most frequent events, and the list, filtered by event and period. Click an event for its details. Events are kept for 365 days (Keep security events for in Settings).

Alerts​

Alert rules watch a metric over a window and fire when it is above a threshold:

ApplicationMetrics
AgentsFailed runs (%, once there are at least 5 runs); runs stopped by a loop or the time limit; run cost (USD). Optionally for one workflow.
VoiceReply time (95th percentile of calls, ms); handoffs to a person; calls ended by an error or dropped. Optionally for one voice agent.
ChatMessages blocked by the guardrails; chat cost (USD), optionally for one model
PlatformFailed sign-ins and second-factor codes; high-severity security events
  • Checked every minute, by one Studio replica at a time.
  • Fires at most once per cooldown, to a pop-up for every admin signed in, a webhook (Slack, Microsoft Teams, Google Chat, Discord or plain JSON) and email (through the instance's SMTP account).
  • Each firing is a security event. Check now shows the metric's current value; Send a test sends a test alert to the rule's channels.

API Builder alerts stay in the API Builder, per API.

Shadow AI​

AI services people use outside Studio. Upload a log, and each person or address reaching a public AI service is a finding:

  • Proxy, DNS or firewall logs: CSV with a host, domain or URL column (and a user or client address column), JSON lines with the same fields, or plain text lines.
  • The Computer egress log: docker logs computer-egress (squid's access log). Each Hrida Computer's traffic goes through it.

Studio's own model connections aren't findings, and neither are the hosts you list as sanctioned (your approved AI services). Each finding (who, service, hosts, requests, last seen) is a security event. Each import is kept with its findings and the log's SHA-256.


Inventory​

Every AI asset in Studio, by application:

ApplicationAssets
AgentsWorkflows, skills, automations
APIAPI Builder APIs, and the data sources their operations serve
ChatCustom models and assistants (digital employees among them), and tools
VoiceVoice agents
ComputerEach person's Hrida Computer

For each one, Studio shows:

  • its owner, status, version and when it was last used;
  • the data it touches: knowledge bases, files, data sources, skills and base models.

Admins record the rest. Click an asset to set:

  • its risk tier: minimal, limited, high or unacceptable, the EU AI Act's tiers. Until it is set, a suggestion is shown: limited for what talks to people or reaches your data, minimal otherwise. The suggestion is only a starting point.
  • its license and a link to its terms;
  • the kinds of data it handles, its purpose and notes;
  • Save and mark reviewed, to record who reviewed it and when.

Each change is in the audit log.

Lineage: under an asset, pick one of its data items to see everything else that uses it:

  • For a file, this includes what uses the knowledge bases the file is in.
  • For a data source, it includes the workflows in the Agent Builder spaces allowed to query it.

Model change history: every model created, edited, shared or deleted, and every change to the model connections (base URLs, keys, defaults), from the audit log.


Reports​

AI use by department​

Give each group a Department (Admin › Users › Groups › edit a group). The report adds up each person's AI activity under their groups' departments: people, model calls, tokens and cost. Someone in groups of two departments counts in both; someone in none is under No department.

Answer quality​

A judge model scores a sample of chat answers that used documents (knowledge, files, web results):

  • relevance: does the answer address the question;
  • groundedness: is what it states supported by the documents.

Each score is from 0 to 1. Set the share of answers to score, and the judge model, in Settings (0, the default, turns it off). Pick the judge from the chat's models and click Test to see that it answers; while it can't, answers go unscored and a warning is logged. Each scored answer is one more model call, in the background, recorded in AI activity. The report shows the averages per model and the latest scores, with the judge's reason.

Evidence pack​

Download a ZIP for a period, for an auditor:

FileContents
audit_log.csvThe period's audit rows with their chain fields
audit_chain.jsonThe chain check over those rows, and the checkpoints
approvals.csvReview decisions in agent runs, workflow and API lifecycle steps, voice agent reviews
inventory.jsonThe AI inventory with what admins recorded
policies.jsonThe guardrails, tool approval, two-step sign-in, retentions, usage limits and alert rules in force
security_events.csvThe period's security events
usage.jsonCalls, tokens and cost per application and model, and per department
quality.jsonDaily quality scores
framework_mapping.mdWhat each file evidences in the EU AI Act, ISO/IEC 42001 and India's DPDP Act
manifest.jsonThe period, who made it, and each file's SHA-256

The ZIP's own SHA-256 is shown, and each download is in the audit log.

Note

The pack is evidence for an assessment, mapped to the clauses it supports. It is not a certification or a legal opinion: which obligations apply depends on each AI system's role and risk class.

Archived agent runs​

Agent runs older than EXECUTION_TRACE_RETENTION_DAYS (90 days) are archived before they are deleted. Each UTC day becomes one gzip JSON-lines file (the runs, their steps and costs), recorded with its SHA-256. The files go where the API gateway call-log archives go: under agent-runs/ in your storage provider (S3, GCS, Azure), or in DATA_DIR. A day is deleted only once it is archived. The identity-provider token on a run is never archived, and secrets in a run's saved state are hidden. EXECUTION_TRACE_ARCHIVE=false turns archiving off.

Deleting a workflow deletes its runs, so they are archived first, as one file listed as Deleted workflow. If they can't be archived, the workflow isn't deleted: try again once the storage is back.

Several Studio replicas

With local storage, an archive is written to the data volume of the replica that made it. On a cluster with a volume per replica, use S3 (or GCS or Azure) storage, so every replica can read the archives.


Reconstructing a Run​

Each agent run now records what exactly it ran:

  • the workflow's version and its published snapshot;
  • a SHA-256 of the graph it was given (a draft has no snapshot);
  • the version of each skill its nodes used.

The reason for each branch is recorded in the run's steps. The class a classify node picked, an if/else verdict, a guardrails node's PASS or FAIL, and a loop stopped at its maximum all become decision steps. Before, they were only in OpenTelemetry.

Pauses, errors and decisions are written reliably: in order, with one retry. Node starts are still written in the background.


Connection Keys at Rest​

Saved settings that are keys, secrets, passwords or tokens are stored encrypted in the database. This covers:

  • the OpenAI-compatible connection keys;
  • the web search, speech, image and document-loader keys;
  • OAuth client secrets and the LDAP app password;
  • keys inside tool server connections.

The encryption key comes from HRIDAAI_SECRET_KEY. Values saved before this release are read as they are, and encrypted the next time settings are saved.

Caution

If HRIDAAI_SECRET_KEY changes, the saved keys can't be decrypted. Studio logs which setting failed, and the connection fails until the key is entered again. Every Studio service (the gateway and voice services too) needs the same HRIDAAI_SECRET_KEY.

CONFIG_ENCRYPT_SECRETS=false stores the keys plain again from the next time settings are saved, if you need them readable outside Studio.

Rolling back to an earlier release: 1.3.0 changes the database (API keys are stored hashed, connection keys encrypted, new tables), and an earlier release can't run on it. Back up the database before you upgrade, and restore that backup to roll back.


Cost and Limits​

  • Agent run cost comes from Model Pricing, like chat cost. A model with no price falls back to the old rough estimate.
  • Usage limits count agent runs too, not only chat and automations. A run started by someone over a hard limit is refused, like their chat would be.
  • Catalog budgets: when a catalog passes its alert threshold (runs, tokens or cost), admins get a pop-up and a security event, once a month.
  • Voice calls show their cost in USD in the voice agent's analytics:
    • the model's part, from Model Pricing;
    • speech at the prices you set in Admin › Settings › Voice Agents › Speech prices (0 for self-hosted speech).

Supply Chain​

Studio's build pipeline checks what it ships:

  • pip-audit: the pinned Python requirements against the PyPI advisory database, on every change to them and weekly.
  • Trivy: the Studio and gateway images just built, for critical and high vulnerabilities that have a fix.
  • Image signing: with cosign and a key pair. Nothing is written to the public transparency log.

To turn signing on, create a key pair (cosign generate-key-pair). Store the private key and its password as the repository secrets COSIGN_PRIVATE_KEY and COSIGN_PASSWORD. Then verify an image before you deploy it:

bash
cosign verify --key cosign.pub --insecure-ignore-tlog ghcr.io/<owner>/<image>@sha256:<digest>

Accepted findings go in .github/pip-audit-ignore.txt and .trivyignore, one ID per line with the reason.


Settings​

SettingDefault
Two-step sign-in required forNobodyTRUST_MFA_REQUIRED: off, admins or all
Keep the prompt and the responseOffTRUST_RECORD_PROMPT_TEXT
Clear the text after90 daysTRUST_TEXT_RETENTION_DAYS
Score answer quality0% (off)TRUST_QUALITY_SAMPLE_PERCENT; the judge: TRUST_QUALITY_MODEL_ID (empty: the default model)
Keep security events for365 daysTRUST_SECURITY_RETENTION_DAYS (30 to 3650)
GuardrailsSee GuardrailsTRUST_GUARDRAILS
Tools that ask firstsend_email, execute_code, delete_automation, delete_calendar_eventTRUST_TOOL_APPROVAL (comma-separated); TRUST_TOOL_APPROVAL_UNATTENDED: allow or deny

These are ConfigVars: set once from the environment, then changed here. Changing them is audited.

Environment variables​

VariableDefaultMeaning
AUDIT_LOG_RETENTION_DAYS2555How long audit rows are kept
AUDIT_ANCHOR_WEBHOOK_URL—Where the daily chain checkpoint is POSTed
AI_USAGE_RETENTION_DAYS400How long AI activity rows are kept
TRUST_MFA_REQUIREDoffoff, admins or all
TRUST_RECORD_PROMPT_TEXTfalseKeep prompt and response text
TRUST_TEXT_RETENTION_DAYS90When that text is cleared
CLAMAV_HOST / CLAMAV_PORT— / 3310ClamAV's clamd
CLAMAV_TIMEOUT_SECONDS30One scan's time limit
CLAMAV_FAIL_OPENfalseStore uploads when the scanner is down
FILE_BLOCKED_EXTENSIONSexecutables and scriptsReplaces the list of refused types (comma-separated)
FILE_ALLOW_MACRO_DOCUMENTSfalseLet documents with macros through
TRUST_QUALITY_SAMPLE_PERCENT0Share of answers with documents to score
TRUST_QUALITY_MODEL_ID—The judge model: any model from the chat's model list (empty: the default model)
TRUST_SECURITY_RETENTION_DAYS365How long security events are kept
TRUST_TOOL_APPROVALsend_email, execute_code, delete_automation, delete_calendar_eventChat tools that ask first (comma-separated)
TRUST_TOOL_APPROVAL_UNATTENDEDallowallow or deny when no one can be asked
EXECUTION_TRACE_RETENTION_DAYS90When agent runs are archived and deleted
EXECUTION_TRACE_ARCHIVEtrueArchive agent runs before deleting them
CONFIG_ENCRYPT_SECRETStrueStore saved connection keys encrypted (false: plain again from the next save)

API​

All admin-only, under /api/v1/trust:

MethodPath
GET/auditRows, with application, action, resource_type, actor_id, since, until, q, limit, offset
GET/audit/export?format=csv|jsonThe filtered rows; X-Content-SHA256 is the file's hash
GET/audit/verifyThe chain recomputed: ok, verified, broken
GET/audit/checkpointsPurge and daily checkpoints
GET/activityAI activity rows; application=api lists API gateway calls
GET/activity/summaryCalls, tokens, cost and errors per application and model
GET/activity/exportCSV of the filtered rows
GET / POST/settingsThe settings above
GET/security/events, /security/summarySecurity events (kind, severity, application, since); totals per kind, severity and day
GET / POST/guardrailsThe policy and tool approval; POST /guardrails/test tries a text
GET / POST/alerts, /alerts/{id}Alert rules and their metrics; DELETE /alerts/{id}; POST /alerts/{id}/check?send=true
GET/qualityQuality scores per day and model, and the latest
GET/inventoryAI assets; POST /inventory/{type}/{id} sets the risk tier, license and the rest
GET/lineage?kind=&id=What uses a knowledge base, file, data source, skill, model or tool
GET/departmentsAI use per department
GET/models/historyModel and connection changes
GET/evidence?since=&until=The evidence pack (ZIP); X-Content-SHA256 is its hash
POST / GET/shadow-ai/import, /shadow-ai/importsCheck a log (multipart: file, source, sanctioned); earlier imports
GET/archivesArchived agent run days

Two-step sign-in is under /api/v1/auths/mfa: verify, status, setup, enable, disable, recovery-codes, and, for admins, DELETE /users/{user_id}.

Hrida.ai is proprietary software of Zlabs Innovation. See the license for terms. © 2026 Zlabs Innovation.