Prerequisites
pip install trajectory-sdk- A LangSmith API key (starts with
lsv2_pt_...) - A LangSmith project ID with existing traces
Walkthrough
./exports/, named by conversation ID.
Import by ID
If you already know which conversations you want:LangSmith Notes
- Conversations are identified by
conversation_idorsession_idin run metadata. Runs without either are treated as standalone conversations. - Roles are normalized:
human→user,ai→assistant. - API responses are cached in-memory for 5 minutes to reduce load on repeated imports.