Skip to main content
TrustLens connects to Mistral AI using your API key to discover and monitor agents, models, files, and document libraries in your Mistral workspace.

What TrustLens discovers

Agents

DataSource
Agent name, description, statusMistral Agents API (beta)
Model, instructions, temperature, top-pMistral Agents API (beta)
Tools (code interpreter, web search, image generation, document library, custom functions)Mistral Agents API (beta)
Knowledge bases (document libraries)Mistral Agents API + Libraries API (beta)
Version history and deployment aliasesMistral Agents API (beta)

Models

DataSource
Model name and familyMistral Models API
Capabilities (chat, function calling, vision, fine-tuning)Mistral Models API
Lifecycle status (stable, deprecated, legacy)Mistral Models API
Context windowMistral Models API

Files and document libraries

DataSource
Filename, size, purposeMistral Files API
Document library name, description, document countMistral Libraries API (beta)

Usage metrics

TrustLens collects per-agent usage via the Mistral Conversations API (beta):
MetricDescription
Total runsNumber of agent responses (message outputs)
Total conversationsNumber of unique conversation threads
Average latencyAverage response time per run
Code interpreter callsNumber of code execution tool invocations
File search callsNumber of document library search invocations
Web search callsNumber of web search tool invocations
Image generation callsNumber of image generation tool invocations
Function callsNumber of custom function tool invocations
Token usage (input and output token counts) is not currently available via the Mistral API and will not appear in TrustLens.

Required access

Mistral uses API key authentication — no IAM roles or service principals are needed.

Beta API access

Several Mistral API endpoints used by TrustLens are in beta and require your workspace to have beta access enabled:
EndpointUsed forBeta required
GET /v1/agentsAgent discoveryYes
GET /v1/conversationsUsage metricsYes
GET /v1/librariesDocument library discoveryYes
GET /v1/modelsModel discoveryNo
GET /v1/filesFile discoveryNo
If beta API access is not enabled:
  • Agent discovery will return zero agents
  • Usage metrics will be unavailable
  • Document library discovery will be skipped
  • Models and files will still be discovered
To request beta access, contact Mistral support.

Step-by-step setup

1

Create an API key

  1. Log in to admin.mistral.ai
  2. Go to OrganizationAPI Keys
  3. Click Create new key
  4. Set a name (e.g., neuraltrust-trustlens) and expiry, then click Create
  5. Copy the key value and store it securely — it is only shown once
2

Configure the integration in TrustLens

Provide the following when creating the Mistral integration:
FieldDescription
API KeyThe API key created in Step 1
No additional configuration is required. TrustLens automatically discovers all agents, models, files, and libraries accessible to the key.

Guardrails discovery

TrustLens discovers the native guardrails policies configured on each Mistral agent via the Mistral Agents API. When an agent has guardrails attached, the full policy object is stored and surfaced in the UI.

What is discovered

Mistral guardrails are stored per-agent under the guardrails object with the following shape:
FieldTypeDescription
provider"mistral"Identifies the guardrails source
scope"agent"Policies are attached directly to this agent
policy_countintegerNumber of guardrail policies on the agent
policiesarrayRaw Mistral policy objects — see below
Each entry in policies is the raw guardrails object returned by the Mistral Agents API. Fields vary by policy type but the moderation_llm_v2 (v2) format includes:
FieldTypeDescription
block_on_errorbooleanWhether to block when the moderation call itself errors
moderation_llm_v2stringModeration model used (e.g. "mistral-moderation-2411")
action"block" | "flag"What happens when a category threshold is exceeded
ignore_other_categoriesbooleanWhether categories not listed in thresholds are ignored
custom_category_thresholdsobjectPer-category sensitivity scores (0.0–1.0, lower = more strict)
jailbreakingobject{"enabled": true/false}
piiobject{"enabled": true/false}
Category keys in custom_category_thresholds (v2 taxonomy):
KeyDescription
sexualSexual content
hate_and_discriminationHate speech and discrimination
violence_and_threatsViolence and threats
dangerousDangerous activities
criminalCriminal content
selfharmSelf-harm content
healthMedical / health misinformation
financialFinancial misinformation
jailbreakingPrompt injection / jailbreak attempts
piiPersonally identifiable information
Example guardrails object for a Mistral agent:
{
  "provider": "mistral",
  "scope": "agent",
  "policy_count": 1,
  "policies": [
    {
      "block_on_error": true,
      "moderation_llm_v2": "mistral-moderation-2411",
      "action": "block",
      "ignore_other_categories": false,
      "custom_category_thresholds": {
        "sexual": 0.1,
        "hate_and_discrimination": 0.1,
        "violence_and_threats": 0.1,
        "dangerous": 0.1,
        "criminal": 0.1,
        "selfharm": 0.1,
        "health": 0.5,
        "financial": 0.5,
        "jailbreaking": 0.1,
        "pii": 0.2
      },
      "jailbreaking": {"enabled": true},
      "pii": {"enabled": true}
    }
  ]
}

Agents without guardrails

If an agent has no guardrails configured in the Mistral API, the guardrails field will be null. TrustLens surfaces this as a missing guardrails finding so you can identify agents running without content safety policies.

Feature availability

FeatureAPI key only+ Beta access
Model discoveryYesYes
File discoveryYesYes
Agent discoveryNoYes
Document library discoveryNoYes
Usage metricsNoYes
Version history and aliasesNoYes

Known limitations

LimitationDetails
No token usage metricsThe Mistral API does not expose per-agent token consumption. This field will not appear in TrustLens.
Beta API dependencyCore agent features depend on beta endpoints. If beta access is revoked or unavailable, agent-related features will degrade gracefully but will not function.
Rate limitsMistral enforces organisation-level rate limits. If syncs are failing with rate limit errors, consider reducing sync frequency.
No tenant-wide audit logsMistral does not provide an audit log or activity API for organisation-level agent usage.

Security considerations

  • The API key has access to all resources in your Mistral organisation. TrustLens uses it in a read-only pattern, but the key itself is not scoped to read-only by the Mistral platform.
  • Rotate the API key regularly and update the integration in TrustLens when you do.
  • TrustLens encrypts the API key at rest.
  • If the key is compromised, revoke it immediately in the Mistral Console and create a new one.

Troubleshooting

  • Verify your workspace has beta API access enabled. Contact Mistral support if not.
  • Verify the API key is valid and not expired — go to admin.mistral.ai and confirm the key is listed.
  • Verify agents exist in your workspace by checking the Mistral Console.
  • Usage requires beta API access for the Conversations API (/v1/conversations).
  • Agents must have actual conversation activity to show metrics. Newly created agents with no usage will correctly show zero.
  • The API key is invalid or has expired.
  • Generate a new key in the Mistral Console and update the integration.
  • The agent was created in Mistral without any guardrails policy attached. TrustLens reads and surfaces whatever is configured in the Mistral API — if none, guardrails is null.
  • To add guardrails, update the agent in the Mistral Console or via PATCH /v1/agents/{agent_id} to attach a moderation_llm_v2 policy.
  • After adding guardrails, trigger a manual sync from the TrustLens integration settings page to pick up the new configuration immediately.
  • Beta API access is required for the Libraries API.
  • Verify at least one document library exists in your workspace.