What TrustLens discovers
Agents
| Data | Source |
|---|---|
| Agent name, description, status | Mistral Agents API (beta) |
| Model, instructions, temperature, top-p | Mistral 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 aliases | Mistral Agents API (beta) |
Models
| Data | Source |
|---|---|
| Model name and family | Mistral Models API |
| Capabilities (chat, function calling, vision, fine-tuning) | Mistral Models API |
| Lifecycle status (stable, deprecated, legacy) | Mistral Models API |
| Context window | Mistral Models API |
Files and document libraries
| Data | Source |
|---|---|
| Filename, size, purpose | Mistral Files API |
| Document library name, description, document count | Mistral Libraries API (beta) |
Usage metrics
TrustLens collects per-agent usage via the Mistral Conversations API (beta):| Metric | Description |
|---|---|
| Total runs | Number of agent responses (message outputs) |
| Total conversations | Number of unique conversation threads |
| Average latency | Average response time per run |
| Code interpreter calls | Number of code execution tool invocations |
| File search calls | Number of document library search invocations |
| Web search calls | Number of web search tool invocations |
| Image generation calls | Number of image generation tool invocations |
| Function calls | Number 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:| Endpoint | Used for | Beta required |
|---|---|---|
GET /v1/agents | Agent discovery | Yes |
GET /v1/conversations | Usage metrics | Yes |
GET /v1/libraries | Document library discovery | Yes |
GET /v1/models | Model discovery | No |
GET /v1/files | File discovery | No |
- Agent discovery will return zero agents
- Usage metrics will be unavailable
- Document library discovery will be skipped
- Models and files will still be discovered
Step-by-step setup
Create an API key
- Log in to admin.mistral.ai
- Go to Organization → API Keys
- Click Create new key
- Set a name (e.g.,
neuraltrust-trustlens) and expiry, then click Create - Copy the key value and store it securely — it is only shown once
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 theguardrails object with the following shape:
| Field | Type | Description |
|---|---|---|
provider | "mistral" | Identifies the guardrails source |
scope | "agent" | Policies are attached directly to this agent |
policy_count | integer | Number of guardrail policies on the agent |
policies | array | Raw Mistral policy objects — see below |
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:
| Field | Type | Description |
|---|---|---|
block_on_error | boolean | Whether to block when the moderation call itself errors |
moderation_llm_v2 | string | Moderation model used (e.g. "mistral-moderation-2411") |
action | "block" | "flag" | What happens when a category threshold is exceeded |
ignore_other_categories | boolean | Whether categories not listed in thresholds are ignored |
custom_category_thresholds | object | Per-category sensitivity scores (0.0–1.0, lower = more strict) |
jailbreaking | object | {"enabled": true/false} |
pii | object | {"enabled": true/false} |
custom_category_thresholds (v2 taxonomy):
| Key | Description |
|---|---|
sexual | Sexual content |
hate_and_discrimination | Hate speech and discrimination |
violence_and_threats | Violence and threats |
dangerous | Dangerous activities |
criminal | Criminal content |
selfharm | Self-harm content |
health | Medical / health misinformation |
financial | Financial misinformation |
jailbreaking | Prompt injection / jailbreak attempts |
pii | Personally identifiable information |
guardrails object for a Mistral agent:
Agents without guardrails
If an agent has no guardrails configured in the Mistral API, theguardrails field will be null. TrustLens surfaces this as a missing guardrails finding so you can identify agents running without content safety policies.
Feature availability
| Feature | API key only | + Beta access |
|---|---|---|
| Model discovery | Yes | Yes |
| File discovery | Yes | Yes |
| Agent discovery | No | Yes |
| Document library discovery | No | Yes |
| Usage metrics | No | Yes |
| Version history and aliases | No | Yes |
Known limitations
| Limitation | Details |
|---|---|
| No token usage metrics | The Mistral API does not expose per-agent token consumption. This field will not appear in TrustLens. |
| Beta API dependency | Core agent features depend on beta endpoints. If beta access is revoked or unavailable, agent-related features will degrade gracefully but will not function. |
| Rate limits | Mistral enforces organisation-level rate limits. If syncs are failing with rate limit errors, consider reducing sync frequency. |
| No tenant-wide audit logs | Mistral 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
No agents discovered
No agents discovered
- 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 metrics unavailable
Usage metrics unavailable
401 Unauthorized on any endpoint
401 Unauthorized on any endpoint
Agents showing null or missing guardrails
Agents showing null or missing guardrails
- The agent was created in Mistral without any guardrails policy attached. TrustLens reads and surfaces whatever is configured in the Mistral API — if none,
guardrailsisnull. - To add guardrails, update the agent in the Mistral Console or via
PATCH /v1/agents/{agent_id}to attach amoderation_llm_v2policy. - After adding guardrails, trigger a manual sync from the TrustLens integration settings page to pick up the new configuration immediately.
Document libraries not appearing
Document libraries not appearing
- Beta API access is required for the Libraries API.
- Verify at least one document library exists in your workspace.