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.

Mortem is a post-trade observability platform built for Solana trading bot teams. When a trade goes wrong, Mortem shows you exactly what your agent decided, in what order, and why — so you can diagnose the cause and prevent the same loss from happening again.

Quick Start

Install the SDK and send your first trace in under five minutes.

Core Concepts

Understand agents, traces, events, and autopsies before you integrate.

SDK Reference

Full reference for the @mortemlabs/sdk TypeScript package.

API Reference

Direct HTTP access to the Mortem ingest and trace APIs.

How Mortem works

1

Create an agent

Sign in to the Mortem dashboard and create an agent. You’ll receive an API key and a one-time verify token.
2

Install the SDK

Add @mortemlabs/sdk to your TypeScript trading bot and configure it with your API key and agent ID.
3

Instrument your runs

Wrap your LLM calls, tool calls, and Solana transactions using Mortem’s instrumentation wrappers. Each run becomes a trace.
4

Inspect and fix

Open the dashboard to replay the decision chronology, read the AI-powered analysis, and apply the suggested fix before the next run.

What Mortem captures

Every agent run produces a trace — a complete record of what happened. Mortem captures:
  • LLM calls — prompts, completions, token counts, and cost estimates
  • Tool calls — which tools fired and what they returned
  • Solana transactions — signatures, lamport flows, and on-chain state
  • Market context — Jupiter quotes and Pyth prices at decision time
  • Custom events — any arbitrary step you instrument yourself

Dashboard guide

Navigate agents, live streams, and trace history in the Mortem dashboard.

Integration guides

Step-by-step integration for Vercel AI SDK, OpenAI, Anthropic, LangChain, and Solana.

Sharing autopsies

Share a public trace link so teammates can review a post-mortem without logging in.

Troubleshooting

Fix common issues with trace ingestion, analysis, and API key setup.