lemma.trace(). Register the processor
once, then run OpenAI Agents normally.
TypeScript
Install both packages:LEMMA_API_KEY and LEMMA_PROJECT_ID:
Python
Install the Python extra:LEMMA_API_KEY and LEMMA_PROJECT_ID:
What Lemma records
OpenAI Agents trace
group_id is recorded as the Lemma threadId, so runs in
the same conversation stay grouped.
Privacy
The integration records prompts, tool inputs, tool outputs, and model output by default. Disable input/output recording when you need structure and timings without payload contents:Debugging
Use debug mode to confirm spans are arriving live and nested under the expected parent:span started and span ended logs. Tool/function spans should include
the generation or agent span ID as parentId in TypeScript or parent_id in
Python.