> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-typedoc-upgrade.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Conversation

> TypeScript SDK reference

Defined in: [src/genai/conversation.ts:72](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L72)

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`

Defined in: [src/genai/conversation.ts:94](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L94)

##### Returns

`string`

***

### attributes

#### Get Signature

> **get** **attributes**(): `Attributes`

Defined in: [src/genai/conversation.ts:106](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L106)

##### Returns

`Attributes`

***

### conversationId

#### Get Signature

> **get** **conversationId**(): `string`

Defined in: [src/genai/conversation.ts:102](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L102)

##### Returns

`string`

***

### model

#### Get Signature

> **get** **model**(): `string`

Defined in: [src/genai/conversation.ts:98](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L98)

##### Returns

`string`

***

### sessionId

<Warning>
  **Deprecated.** Use [Conversation.conversationId](#conversationid) instead.
</Warning>

#### Get Signature

> **get** **sessionId**(): `string`

Defined in: [src/genai/conversation.ts:111](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L111)

##### Returns

`string`

## Methods

### end()

> **end**(`opts?`): `void`

Defined in: [src/genai/conversation.ts:168](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L168)

#### Parameters

##### opts?

`SpanEndOptions`

#### Returns

`void`

***

### startTurn()

> **startTurn**(`opts?`): [`Turn`](./turn)

Defined in: [src/genai/conversation.ts:156](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L156)

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

##### opts?

[`TurnInit`](./turninit) = `{}`

#### Returns

[`Turn`](./turn)

#### Examples

```ts twoslash theme={null}
// @noErrors
const turn = conversation.startTurn();
```

```ts twoslash theme={null}
// @noErrors
const turn = conversation.startTurn({
  model: 'gpt-4o',
  agentName: 'research-bot',
  agentId: 'research-bot-prod',
  agentDescription: 'Looks up facts on Wikipedia.',
  agentVersion: '1.4.2',
  userMessage: 'What is the weather in Tokyo?',
  systemInstructions: ['You are a helpful weather bot.'],
  startTime: new Date('2026-05-29T10:00:00.000Z'),
});
```
