Common use cases
Human review and annotation
Human review and annotation
Build custom annotation interfaces for large-scale human review tasks, surfacing only relevant information for annotators and subject matter experts.
Simplifying traces for non-engineers
Simplifying traces for non-engineers
Replace JSON with intuitive UI components like carousels, playlists, or structured summaries to make traces accessible to PMs, legal reviewers, and domain experts.
Industry-specific visualizations
Industry-specific visualizations
Create views that mirror your product experience:
- Playlist-style views for music applications
- Interactive source-and-answer layouts
- Custom dashboards for internal evaluations
Multi-turn conversation analysis
Multi-turn conversation analysis
Aggregate and display data across conversation turns to analyze dialogue flow and long-running interactions.
Create trace views
To create a custom trace view using Loop:- Select a trace in your logs, experiments, or during human review.
- Select Views.
- Describe how you want to view your trace data.
- “Create a view that renders a list of all tools available in this trace and their outputs”
- “Build an interface to review each trace one by one with easy switching between traces”
- “Create a conversation-style view that highlights user messages and assistant responses”
- “Render the video url from the trace’s metadata field and show simple thumbs up/down buttons”
Share trace views
By default, a custom trace view is only visible and editable by the user who created it. To share your view with all users in the project:- Select Save in the view editor.
- Choose Save as new view version.
- Select Update to make it available project-wide.
Self-hosted deployments: If you restrict outbound access, allowlist
https://www.braintrustsandbox.dev to enable custom views. This domain hosts the sandboxed iframe that securely renders custom view code.Edit trace view React code
Custom trace views are React components that run inside Braintrust. You can edit the component code directly to customize behavior beyond what Loop generates. To edit the React code:- Go to the custom trace view.
- Select in the lower left of the view.
- Select Edit.
| Prop | Type | Description |
|---|---|---|
trace | object | Contains all spans and methods for the trace |
span | object | The currently selected span with full data |
update | function | Update span metadata: update('field', value) |
selectSpan | function | Navigate to a different span: selectSpan(spanId) |
trace object includes:
rootSpanId,selectedSpanId- Current span contextspanOrder- All span IDs in execution orderspans- Map of span_id → span (IDs/relationships only)fetchSpanFields- Fetch full data for multiple spans (see Access data from multiple spans)
- Reuse custom views outside of Braintrust
- Integrate review interfaces into internal tools
- Build standalone annotation applications
- Create consistent review experiences across different contexts
Add interactive controls
Custom views support interactive elements that write data back to traces. Add buttons, inputs, or custom controls to collect:- Human review scores
- Thumbs up/down feedback
- Custom metadata fields
- Annotation notes
update function to write metadata back to the trace. This enables annotation workflows where review and data collection happen in the same interface.
Example: Add thumbs up/down buttons
Access data from multiple spans
By default, only the selected span has full data (input, output, expected, metadata). To access data from other spans, usefetchSpanFields:
Example: Display all span inputs
Next steps
- Add human feedback
- Build datasets from annotated traces
- Learn about Loop for AI-assisted development