> ## 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.

# startConversation

> TypeScript SDK reference

# startConversation

▸ **startConversation**(`opts?`): [`Conversation`](../classes/conversation)

Start a new Conversation and install it as the current conversation.
Subsequent calls to `startTurn` will pick it up automatically.

Pass `attributes` to stamp custom (non-semconv) attributes on every
span the conversation emits.

#### Parameters

| Name   | Type                                                 |
| :----- | :--------------------------------------------------- |
| `opts` | [`ConversationInit`](../interfaces/conversationinit) |

#### Returns

[`Conversation`](../classes/conversation)

`Example`

```ts twoslash theme={null}
// @noErrors
weave.startConversation({agentName: 'research-bot'});
```

`Example`

```ts twoslash theme={null}
// @noErrors
weave.startConversation({
  agentName: 'research-bot',
  conversationId: '019efa53-8a65-711c-b4c1-7c1cb72c0bb7',
  attributes: {'myagent.version': '1.23'},
});
```

#### Defined in

[src/genai/api.ts:26](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/genai/api.ts#L26)

***
