Passive Testing
Esta página aún no está disponible en tu idioma.
Passive testing is how Mibo evaluates your Agent. Your system sends traces of real interactions, and Mibo checks them against your test cases. Mibo never calls your Agent. You get visibility into AI quality on real-world scenarios, including edge cases that synthetic tests miss.
How it works
Section titled “How it works”- Your AI system handles a real user interaction.
- Your system sends a canonical trace (input, output, and any execution details) to Mibo’s trace ingestion endpoint.
- Mibo schedules evaluation for the active test cases that apply to the trace.
- Review the results in your quality dashboard.
Setting it up
Section titled “Setting it up”Passive testing needs three things: an API key, an active test, and a trace. The Overview page walks you through them in order until the first result appears. See Set up your Agent for the steps in the dashboard.
-
Create an API key
Follow Creating an API key. You use this key to authenticate trace requests. Open the verification link in the browser you signed up with. If you open it elsewhere, Mibo asks you to choose a new password and earlier API keys stop working. Mibo does not evaluate traces until the workspace owner verifies the email. See Email verification and trace access.
For OTLP, set the agent’s Service name in Agent settings to match your exporter’s
service.name. Your key’s scope only authorizes the matched agent. See API Keys & Trace Routing. -
Create or enable a test
Open Tests and click New test, or open an existing test. Keep the test Active. Save the test before you send traces. See Creating Test Cases.
-
Send traces and review results
Send traces after you create an API key and save an active test. Evaluated traces appear on the Traces page after the run completes, when a test applies. See Sending Traces for the decision matrix.
The two paths
Section titled “The two paths”Both arrive at the same endpoint, both produce the same canonical trace internally, and both feed identical assertion evaluation.
The ingestion endpoint
Section titled “The ingestion endpoint”POST https://api.mibo-ai.com/public/tracesRequest — Custom API example
Section titled “Request — Custom API example”curl -X POST "https://api.mibo-ai.com/public/traces" \ -H "Content-Type: application/json" \ -H "x-api-key: <YOUR_API_KEY>" \ -H "x-request-id: chat-001" \ -d '{ "serviceName": "support-bot", "spans": [ { "span_id": "root-001", "name": "Customer Support Agent", "attributes": { "gen_ai.operation.name": "chat", "gen_ai.request.model": "gpt-4o-mini", "gen_ai.input.messages": "[{\"role\":\"user\",\"parts\":[{\"type\":\"text\",\"content\":\"When are you open?\"}]}]", "gen_ai.response.text": "We are open Monday to Friday, 9am to 5pm." }, "status": { "code": 1 } } ] }'serviceName names the Agent that receives the trace. Mibo uses the Agent with that service name, or creates it. For a workspace key without it, Mibo uses the workspace’s only active non-demo Agent, or returns 400 SERVICE_NAME_REQUIRED. A restricted key that names no allowed Agent returns 400 CUSTOM_API_PLATFORM_NOT_FOUND.
Set gen_ai.operation.name and gen_ai.request.model on the span that makes the model call. Without them, the trace shows Model not reported.
For the OTLP envelope shape, see OTLP ingestion.
Required
Section titled “Required”x-api-keyheader: your workspace API key.Content-Type: application/json.- A body matching either Your API (
{ spans: [...] }) or OTLP ({ resourceSpans: [...] }). Any other shape returns400.
Optional
Section titled “Optional”x-request-idheader: the trace’s external identifier. See Trace identity for the rules for each ingestion path.serviceName(top level): names the Agent, like OTLPservice.name.platformId(top-level UUID, advanced): explicit Agent override that always wins.metadata.mibo.platform_id(Your API, advanced): an alternative form of theplatformIdoverride. Other metadata fields do not affect assertion evaluation; put assertion data in span attributes.Content-Encoding: gzip: compressed body. Useful for large traces.
Agent resolution
Section titled “Agent resolution”Mibo resolves the target differently for each path:
- Your API: a key scoped to one agent selects it. Otherwise,
serviceNamefinds or creates the Agent, like OTLPservice.name. With no identifier, a workspace key uses the workspace’s only active non-demo Agent, or returns400 SERVICE_NAME_REQUIRED. A restricted key that matches no allowed Agent returns400 CUSTOM_API_PLATFORM_NOT_FOUND. At your plan’s Agent limit, a new name returns403 AGENT_LIMIT_REACHED. The trace is held pending unless the pending limit is reached. To get the Agent, upgrade your plan or archive an Agent, then send another trace for it, then assign tests. - OTLP: a single-Agent key selects that Agent. Other keys match
service.namewithin their allowed Agents. A workspace key can fall back to its only active non-demo Agent when the service name is unconfigured. OTLP does not usemibo.platform_id.
If the target is missing, unmatched, or unauthorized, the request returns a routing error.
What happens after a trace is received
Section titled “What happens after a trace is received”When Mibo receives a new trace:
- Mibo applies best-effort redaction to secrets, and to personal data if your workspace enables it, then stores the trace. See Data handling.
- Mibo checks whether the Agent has active tests.
- Mibo selects the tests whose Checks a trace when condition matches the trace, and schedules passive evaluation. OTLP waits for its debounce window so additional batches can be merged first.
- Mibo evaluates the trace against the selected test cases. A test whose condition does not match the interaction is skipped.
- Results appear in your dashboard. If no test applies, the trace is still stored and shows No test covered.
The evaluation happens asynchronously when at least one test applies. The trace endpoint responds immediately with a 201 for a new trace, or 200 when updating an existing trace. Evaluation runs in the background.
Unverified workspaces
Section titled “Unverified workspaces”If the workspace owner has not verified their email, Mibo still stores the traces your keys send. It does not evaluate them. These traces show NOT EVALUATED with the reason Verify your email to evaluate traces. After verification, use Evaluate all. Once the owner verifies, open Waiting traces from the Overview page and choose Evaluate all, or evaluate as many as your plan’s allowance covers.
While the owner’s email is unverified, a workspace stores up to 1,000 traces, and deleted traces count toward that limit. After that, Mibo rejects new traces with 403 UNVERIFIED_TRACE_LIMIT_REACHED until the owner verifies. Verify before you send production traffic.
If a trace appears without an evaluated result
Section titled “If a trace appears without an evaluated result”A trace receipt and an evaluated result are separate milestones. If the trace appears on the Traces page but no result appears:
- If the status is NOT EVALUATED with the verification reason, verify the workspace owner’s email first. Then evaluate the waiting traces as described above.
- Wait through the ingestion delay, then refresh the dashboard. For OTLP, the debounce period lasts about five seconds after the final batch arrives, with a 60-second cap from the first batch. Evaluation starts asynchronously after that period. If the result is still pending, keep waiting and refreshing until evaluation finishes before you change the test configuration or resend the trace.
- Open Tests.
- Check that the test is Active. Open the test and turn on Active if it is off.
- Open the test and check Checks a trace when. If the trace’s user interaction does not match the condition, Mibo skips the test. Edit the condition or clear it to check every trace, then click Save test.
- Send a trace with a fresh identity after saving the change. For Your API, use a new
x-request-id. For OTLP, use a newtraceIdand do not reuse anx-request-idheader. Mibo does not reevaluate a previously accepted trace after this configuration change. Retrying its accepted payload with the same identity is not a new trace: Your API updates the existing trace, while OTLP merges or deduplicates the payload.
If the trace does not appear at all, check the ingestion response and follow the retry steps in Your API response codes and retries or OTLP troubleshooting.
If scenario routing is unavailable
Section titled “If scenario routing is unavailable”Routing can be unavailable for a completed passive run, which the Overview shows as UNROUTED. Mibo still runs tests with an empty Checks a trace when, but it cannot compare the trace with the conditions of the other tests until scenario routing recovers.
Use a new trace to check whether scenario routing has recovered:
- For Your API, use a new
x-request-id. For OTLP, use a newtraceIdand do not reuse anx-request-idheader. - Check the new trace after the passive run completes.
If the new trace also shows UNROUTED on the Overview, wait and repeat these steps with another fresh identity.
For a predictable retry, do not resend an accepted trace with the same identity. Your API updates the existing trace. OTLP deduplicates a later batch without another passive evaluation when every span ID in the batch is already stored. A batch with a new span ID can schedule another passive evaluation, but use a new traceId for a deliberate retry. For the full identity and retry rules, see If a trace appears without an evaluated result.
If no input was available for scenario routing
Section titled “If no input was available for scenario routing”The Traces list can show a trace whose detail says This trace had no usable user input for scenario routing. Mibo cannot compare the trace with a Checks a trace when condition when it cannot extract input. Tests with an empty condition still run, but tests with a condition do not.
Add the user’s message to the span that carries your AI system’s input before sending the next trace. Use gen_ai.input.messages for an OpenTelemetry message array or gen_ai.prompt for a plain-text fallback. Mibo uses the latest user message in gen_ai.input.messages; each message’s text belongs in a parts array. The Canonical Trace Reference lists both input attributes.
This illustrative span-attributes fragment shows the message structure. For a complete payload, see the Canonical Trace Reference.
{ "gen_ai.input.messages": [ { "role": "user", "parts": [{ "type": "text", "content": "I want to cancel my subscription" }] } ], "gen_ai.response.text": "I can help you cancel your subscription."}For a predictable recovery, wait for the current passive run to finish, then send a new trace with the updated instrumentation. For Your API, use a new x-request-id. For OTLP, use a new traceId and do not reuse an x-request-id header. A later OTLP batch with a new input-bearing span under the same traceId can schedule another evaluation, but use a fresh identity for a deliberate retry.
Recover from a passive semantic evaluation issue
Section titled “Recover from a passive semantic evaluation issue”A passive trace can be accepted and still fail to produce a usable semantic evaluator score. Open the trace in Traces and find the semantic check under Test results. Its row shows the skipped reason. A temporary evaluator outage can mark the check as skipped. Skipped checks do not count toward the overall score, so the result can show Passed even though that check was not evaluated.
To retry after the current passive execution reaches a terminal result:
- If the issue is an invalid threshold, open the test from Tests. In the Checks section, set Strictness for the AI-powered check to a number from
0through1. In View as JSON, setthresholdto a finite number in the same range. Then click Save test. - Wait for the current result to finish before sending another trace. Refresh the dashboard while it is pending.
- Send a new trace after the evaluator is available. For Your API, use a new
x-request-id. For OTLP, use a newtraceIdand do not reuse anx-request-idheader.
For accepted-trace replay limits and incremental OTLP evaluation, see the passive trace retry rules.
Which test cases run on a real conversation
Section titled “Which test cases run on a real conversation”Picture your n8n or Flowise assistant handling real people all day. Some ask about pricing, some want a refund, some just say hello. You’ve written a test for each of those situations.
Should your “refund” test run on a conversation where someone only asked for your opening hours? No. It would turn red, even though your assistant did nothing wrong. That’s a false alarm, and a dashboard full of false alarms is one you stop trusting.
To prevent this, every test has one setting: Checks a trace when. It tells Mibo which real conversations to check with that test.
- Empty: Mibo checks every trace.
- A condition: Mibo compares each conversation with the condition. If it matches, the test runs. If it clearly doesn’t, Mibo skips the test for that conversation. A skip never counts as a failure.
So the condition does two jobs: it tells Mibo how to judge the reply, and it tells Mibo when this test applies. Write it the way you’d explain the situation to a coworker:
- Clear: “The user asks to cancel their subscription.”
- Too vague to match: “Handle the request.”
For a rule that should hold for every reply, such as “The answer is never empty,” leave the condition empty.
Setting it
Section titled “Setting it”- Open a test from Tests, or create a new one.
- In the form, find Checks a trace when after Name and Applies to.
- Describe the conversation, or leave the field empty.
- Click Save test.
In the View as JSON view, this same setting is the scenario field. Its value is the condition in plain language.
{ "scenario": "When the user asks to cancel their subscription, the agent explains how", "assertions": { "semantic": [ { "criteria": "The agent explains how to cancel and does not refuse outright", "threshold": 0.8 } ] }}Missing instrumentation, not silent pass/fail
Section titled “Missing instrumentation, not silent pass/fail”If a token_limit, http_status, or node_call assertion can’t find the attribute it needs in your trace, Mibo flags it as missing instrumentation rather than passing or failing silently. The dashboard renders it distinctly so you know to add the right attribute to your spans.
The attributes Mibo reads are listed under each path’s deep-dive:
Use cases
Section titled “Use cases”Production monitoring
Section titled “Production monitoring”Connect your system’s logging pipeline to Mibo. New trace submissions are evaluated against your test cases, giving you continuous quality visibility without any request to your system.
Post-mortem analysis
Section titled “Post-mortem analysis”To investigate a production problem, submit a new trace for the interaction to evaluate it against applicable test cases. See Your quality dashboard for how to inspect the results.
Shadow testing
Section titled “Shadow testing”Send traces from a staging Agent to evaluate changes before you deploy them. Compare quality scores over time to catch regressions early.