Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mortemlabs.com/llms.txt

Use this file to discover all available pages before exploring further.

When a trace completes, Mortem automatically queues it for LLM-powered analysis. The analysis worker reads the full event chronology — every LLM call, tool output, and Solana transaction — and produces a structured autopsy that identifies what the agent decided, what context it relied on, which two or three moments most influenced the outcome, and what you should change before the next run. You don’t need to configure anything; analysis runs automatically on every completed trace.

Where analysis appears

The autopsy appears in the Dossier panel on the trace detail page at /app/traces/[id]. Scroll down past the trace metrics to find the Autopsy section. If the analysis is not yet available, the section reads “Autopsy is queued once the trace completes.”
Analysis is asynchronous. It typically appears a few minutes after a trace completes, depending on the trace size and the current analysis queue. Refresh the trace detail page to check for an updated result.

What the autopsy contains

A completed autopsy includes the following fields:
FieldWhat it answers
SummaryA one-sentence description of what the agent decided and what outcome it produced
What agent sawThe market data, tool outputs, and context the model had access to
What agent missedInformation that was absent, stale, or misweighted at the critical decision point
Suggested fixA concrete change to make in your strategy code before the next run
Failure typeA classification of the root cause (e.g., market_condition, missing_information, bad_instruction)
ConfidenceThe analysis worker’s confidence in its diagnosis, expressed as a percentage
CounterfactualsTwo or three “what if” questions that probe whether the outcome was avoidable
Each counterfactual shows a verdict — avoidable, unavoidable, or unclear — along with the reasoning and the evidence the worker used to reach that conclusion.

Failure type classifications

TypeMeaning
noneThe trace completed without a detected failure
market_conditionMarket state changed between context capture and execution
model_limitThe LLM reached its context or output limit
missing_informationA required data point was absent from the agent’s context
bad_instructionThe prompt or system instruction produced an incorrect decision path
guardrail_gapA missing validation or safety check allowed an undesirable action

Rerunning analysis

If you want a fresh diagnosis — for example after updating your agent’s strategy or if the first result looks incorrect — click Rerun analysis on the trace detail page. This re-queues the trace for the analysis worker, which will produce a new autopsy and replace the existing one.
Rerun analysis after you make a code change to confirm the worker reaches a different conclusion on a previously failing trace. This is a fast way to validate that a fix addresses the root cause the autopsy identified.

Analysis availability

Analysis only runs on completed traces. A trace must have status completed or errored before it enters the analysis queue — traces still marked running are not eligible.
If analysis never appears on a completed trace after several minutes, use the Rerun analysis button on the trace detail page to re-queue it. If the problem persists, confirm the trace status shows completed or errored — traces still in running status are not eligible for analysis.

Analysis provider

Mortem’s analysis worker uses an LLM to generate each autopsy. You do not need to configure the provider from the dashboard — analysis runs automatically on every completed trace. When Ollama is used as the provider, the dashboard shows “usage tracked by Ollama” in the cost field instead of a USD estimate.

Traces

Open a trace to read its autopsy in the dossier panel.

Sharing

Share a trace and its analysis with teammates via a public link.