- Configure custom rendering in the LangSmith UI or via the API.
- Build a custom renderer to display output data.
- Understand where custom rendering appears in LangSmith.
Overview
By default, LangSmith displays outputs in a standard JSON format. With custom output rendering, you can replace this default view with your own HTML page that receives the output data via the postMessage API and renders it however you choose. This is particularly useful for:- Domain-specific formatting: Display medical records, legal documents, or other specialized data types in their native format.
- Custom visualizations: Create charts, graphs, or diagrams from numeric or structured output data.
Prerequisites
- A LangSmith dataset
- A web page that can receive postMessage events (can be hosted anywhere or run locally)
- Basic knowledge of HTML/JavaScript and the postMessage API
Configure custom output rendering
In the LangSmith UI
To configure custom output rendering for a dataset:
- Navigate to your dataset in the Datasets & Experiments page.
- Click ⋮ (three-dot menu) in the top right corner.
- Select Custom Output Rendering.
- Toggle Enable custom output rendering.
- Enter the webpage URL in the URL field.
- Click Save.

Via the API
You can also configure custom rendering programmatically by updating the dataset metadata:Build a custom renderer
Understand the message format
Your HTML page will receive output data via the postMessage API. LangSmith sends messages with the following structure:type: Indicates whether this is an actual output ("output") or a reference output ("reference").data: The output data itself.metadata.inputs: The input data that generated this output, provided for context.
Message delivery timing: LangSmith uses an exponential backoff retry mechanism to ensure your page receives the data even if it loads slowly. Messages are sent up to 6 times with increasing delays (100ms, 200ms, 400ms, 800ms, 1600ms, 3200ms).
Example implementation
This example listens for incoming postMessage events and displays them on the page. Each message is numbered and formatted as JSON, making it easy to inspect the data structure LangSmith sends to your renderer.Where custom rendering appears
When enabled, your custom rendering will replace the default output view in:- Experiment comparison view: When comparing outputs across multiple experiments:

- Run detail panes: When viewing runs that are associated with a dataset:

- Annotation queues: When experiments are added to annotation queues for review:

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.