> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: Session

> TypeScript SDK reference

[weave](../) / Session

A Session groups Turns under a single `gen_ai.conversation.id`. It is not
itself an OTel span — children stamp the conversation id onto theirs.

## Table of contents

### Properties

* [agentName](./session#agentname)
* [model](./session#model)
* [sessionId](./session#sessionid)

### Methods

* [end](./session#end)
* [startTurn](./session#startturn)
* [create](./session#create)

## Properties

### agentName

• `Readonly` **agentName**: `string`

#### Defined in

[genai/session.ts:22](https://github.com/wandb/weave/blob/6538626556c93d6f31ae725fdefe4e6b8b71bc2c/sdks/node/src/genai/session.ts#L22)

***

### model

• `Readonly` **model**: `string`

#### Defined in

[genai/session.ts:23](https://github.com/wandb/weave/blob/6538626556c93d6f31ae725fdefe4e6b8b71bc2c/sdks/node/src/genai/session.ts#L23)

***

### sessionId

• `Readonly` **sessionId**: `string`

#### Defined in

[genai/session.ts:24](https://github.com/wandb/weave/blob/6538626556c93d6f31ae725fdefe4e6b8b71bc2c/sdks/node/src/genai/session.ts#L24)

## Methods

### end

▸ **end**(): `void`

#### Returns

`void`

#### Defined in

[genai/session.ts:51](https://github.com/wandb/weave/blob/6538626556c93d6f31ae725fdefe4e6b8b71bc2c/sdks/node/src/genai/session.ts#L51)

***

### startTurn

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

#### Parameters

| Name   | Type                                 |
| :----- | :----------------------------------- |
| `opts` | [`TurnInit`](../interfaces/turninit) |

#### Returns

[`Turn`](./turn)

#### Defined in

[genai/session.ts:43](https://github.com/wandb/weave/blob/6538626556c93d6f31ae725fdefe4e6b8b71bc2c/sdks/node/src/genai/session.ts#L43)

***

### create

▸ **create**(`opts?`): [`Session`](./session)

#### Parameters

| Name   | Type                                       |
| :----- | :----------------------------------------- |
| `opts` | [`SessionInit`](../interfaces/sessioninit) |

#### Returns

[`Session`](./session)

#### Defined in

[genai/session.ts:27](https://github.com/wandb/weave/blob/6538626556c93d6f31ae725fdefe4e6b8b71bc2c/sdks/node/src/genai/session.ts#L27)
