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

# startConversation

> TypeScript SDK reference

> **startConversation**(`opts?`): [`Conversation`](../interfaces/conversation)

Defined in: [src/genai/api.ts:26](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/api.ts#L26)

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

### opts?

[`ConversationInit`](../interfaces/conversationinit) = `{}`

## Returns

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

## Examples

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

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