| JavaScript option | Python option |
|---|---|
conversationId | conversation_id |
requestId | request_id |
traceId | trace_id |
Field Semantics
| Field | Use it for | Stability |
|---|---|---|
conversationId | Group all turns in one user-agent conversation. | Same across related turns. |
requestId | Identify one application request, turn, job, or model run. | New for each turn or job. |
traceId | Connect Averta events to your logs, traces, or observability system. | Same as your tracing span or request trace. |
requestId or traceId is missing, the SDK generates one. It does not generate conversationId because only your app knows the conversation boundary.
Recommended Pattern
For a multi-turn agent, keepconversationId stable and rotate requestId per turn:
Dashboard Debugging
Use request context to answer operational questions:| Question | Search by |
|---|---|
| What happened in this user conversation? | conversationId |
| Why did this specific turn fail? | requestId |
| How do Averta events line up with app logs? | traceId |
| Did production use the wrong policy? | API key prefix plus requestId |
Common Mistakes
- Reusing one
requestIdfor every turn in a conversation. - Omitting
conversationIdfor multi-turn agents. - Creating request context in logs but not passing it into
wrapOpenAI(...),wrap_openai(...), orwrapAnthropic(...). - Wrapping one long-lived provider client once and expecting per-request context to change later.