Skip to main content
A Conversation groups Turns under a single gen_ai.conversation.id. It is not itself an OTel span — children stamp the conversation id onto theirs.

Accessors

agentName

Get Signature

get agentName(): string
Returns
string

attributes

Get Signature

get attributes(): Attributes
Returns
Attributes

conversationId

Get Signature

get conversationId(): string
Returns
string

model

Get Signature

get model(): string
Returns
string

sessionId

Deprecated. Use Conversation.conversationId instead.

Get Signature

get sessionId(): string
Returns
string

Methods

end()

end(opts?): void

Parameters

object

Returns

void

startTurn()

startTurn(opts?): Turn
Start a new Turn under this Conversation. The turn inherits the conversation’s conversationId; agentName, agentId, agentDescription, agentVersion and model fall back to the conversation’s values when not provided on opts.

Parameters

TurnInit = {}

Returns

Turn

Examples