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.

A trace records everything your agent did during a single run — from the first LLM call through the last Solana transaction — as an ordered, timestamped evidence chain. When a trade goes wrong, opening the trace for that run tells you exactly which decision preceded the loss, what context the model relied on, and where execution diverged from intent. Traces are the primary debugging surface in Mortem.

Finding traces

Open an agent at /app/agents/[id], then click Traces to reach the trace list at /app/agents/[id]/traces. The list shows up to 25 traces per page, ordered newest first. Each row in the list displays:
ColumnWhat it shows
Statusrunning, completed, or errored
Trace IDUnique identifier for this run
Input summaryThe goal or prompt your agent passed to startSession
Started atWall-clock time the session opened
EventsTotal number of events captured
TokensTotal tokens consumed across all LLM calls
TxsNumber of Solana transactions submitted
Use the status filter buttons at the top of the list to narrow the view to a specific status.

Trace statuses

StatusMeaning
runningThe session is open and events are still arriving
completedThe session closed with session.complete(...)
erroredThe session closed with session.fail(...) or an unhandled error
A trace with status running for an unexpectedly long time usually means the agent process exited without calling session.fail(error). Check that your agent’s error handling always calls the fail path.

Watching live traces

The agent detail page at /app/agents/[id] shows a live stream panel that surfaces traces as they arrive via Server-Sent Events. You don’t need to navigate to the trace list to see activity — the stream updates automatically while the page is open. Each entry in the stream links directly to the trace detail page. Click it to open the full chronology even while the trace is still running.

Trace detail page

Open a trace at /app/traces/[id] to see a three-panel layout.

Dossier panel (left)

The left panel summarizes the trace:
  • Status badge and any tags assigned at session creation
  • Input summary and trace ID
  • Metrics grid: duration, event count, token count, cost estimate, lamport total, and Solana transaction count
  • Share controls — generate or revoke a public link (see Sharing)
  • Autopsy — the LLM-powered analysis of this trace (see Analysis)

Event chronology panel (center)

The center panel lists every event in sequence. Each row shows the event type badge (llm_call, tool_call, solana_tx, custom), status, sequence number, a human-readable headline, and timing. Expand any event to see its parent event ID, end time, payload encryption status, and error message if one was recorded. Use the Scrub events slider to jump to any position in the timeline. The focused event is highlighted and its payload appears in the inspector panel.

Context inspector panel (right)

The right panel displays the full JSON payload for the currently focused event. Use Copy as markdown to copy the event details as formatted markdown — useful for pasting into a bug report or debugging session.

Event types

TypeWhat it captures
llm_callModel name, provider, token usage, cost estimate, streaming flag
tool_callTool name, input arguments, output value
solana_txTransaction signature, cluster, lamport fee, instruction names, confirmation status
mcp_callModel context protocol round-trip details
x402_paymentHTTP payment channel interaction
customAny step you instrument with session.beginEvent("custom", ...)
If your agent encrypted SDK payloads with MORTEM_MASTER_KEY, event payloads display as encrypted in the inspector instead of plain JSON. The event metadata (type, timing, status) is always visible regardless of encryption.

Deleting a trace

Open the trace detail page and locate the Delete option. Deleting a trace removes its events and any associated analysis permanently. If the trace has an active share link, the public page at /share/[token] will return a “buried” error after deletion.

Analysis

Read the LLM-powered autopsy that Mortem generates after each trace completes.

Sharing

Generate a public link to share a trace with teammates or in post-mortems.