1. Install
- TypeScript
- Python
2. Set environment variables
Find your API key and project ID in Lemma project settings.The SDK sends to
https://api.uselemma.ai by default. Pass baseUrl to new Lemma({ baseUrl }) only when you need a custom endpoint.3. Create a client
- TypeScript
- Python
4. Send your first trace
- TypeScript
- Python
Optional: stamp a release
A release is the stable identifier your deployment process assigns to the running app, such as an app version, commit SHA, or container tag. Change it with each deployment.Option 1: Set an environment variable (recommended)
LEMMA_RELEASE to that value during deployment to give each deployed code version a unique, stable identifier.
Option 2: Pass it when creating the client
- TypeScript
- Python
release option overrides LEMMA_RELEASE.
Framework adapters accept the same release option.
Next steps
Traces
Define one agent execution.
Generations
Capture LLM calls with model, prompt, completion, and timing.
Tool calls
Record tool arguments and results.
Trace contract
The exact shape Lemma reads.