# Quick Start

### **Installation**

Install the SDK using your preferred package manager:

**NPM**

```bash
npm install @cryptalk/browser


```

**PNPM**

```bash
pnpm install @cryptalk/browser

```

**Yarn**

```bash
yarn add @cryptalk/browser
```

#### Usage

Here's a basic example of how to use the SDK:

```javascript
import { Client } from "@cryptalk/browser";

// Create a new Cryptalk client
const client = await Client.create(signer, {
  env: "production",
});

// Start a new conversation
const conversation = await client.conversations.newConversation(peerAddress);

// Send a message
await conversation.send("Hello, !");

// Listen for new messages
for await (const message of conversation.streamMessages()) {
  console.log("New message:", message.content);
}
```

**Vite**

Add the following to `vite.config.ts`:

```typescript
import { defineConfig } from "vite";

export default defineConfig({
  optimizeDeps: {
    exclude: ["@xmtp/wasm-bindings", "@cryptalk"],
    include: ["@xmtp/proto"],
  },
});
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cryptalks-organization-1.gitbook.io/cryptalk-sdk/quick-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
