@mastra/lance 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,12 @@
1
- > Guide on vector storage options in Mastra, including embedded and dedicated vector databases for similarity search.
2
-
3
1
  # Storing Embeddings in A Vector Database
4
2
 
5
3
  After generating embeddings, you need to store them in a database that supports vector similarity search. Mastra provides a consistent interface for storing and querying embeddings across various vector databases.
6
4
 
7
5
  ## Supported Databases
8
6
 
9
- **mongodb:**
7
+ **MongoDB**:
10
8
 
11
- ```ts title="vector-store.ts"
9
+ ```ts
12
10
  import { MongoDBVector } from "@mastra/mongodb";
13
11
 
14
12
  const store = new MongoDBVector({
@@ -27,15 +25,13 @@ await store.upsert({
27
25
  });
28
26
  ```
29
27
 
30
- <h3>Using MongoDB Atlas Vector search</h3>
31
-
32
- For detailed setup instructions and best practices, see the [official MongoDB Atlas Vector Search documentation](https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-overview/?utm_campaign=devrel&utm_source=third-party-content&utm_medium=cta&utm_content=mastra-docs).
28
+ ### Using MongoDB Atlas Vector search
33
29
 
34
-
30
+ For detailed setup instructions and best practices, see the [official MongoDB Atlas Vector Search documentation](https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-overview/?utm_campaign=devrel\&utm_source=third-party-content\&utm_medium=cta\&utm_content=mastra-docs).
35
31
 
36
- **pg-vector:**
32
+ **PgVector**:
37
33
 
38
- ```ts title="vector-store.ts"
34
+ ```ts
39
35
  import { PgVector } from "@mastra/pg";
40
36
 
41
37
  const store = new PgVector({
@@ -55,16 +51,13 @@ await store.upsert({
55
51
  });
56
52
  ```
57
53
 
58
- <h3>Using PostgreSQL with pgvector</h3>
59
-
60
- PostgreSQL with the pgvector extension is a good solution for teams already using PostgreSQL who want to minimize infrastructure complexity.
61
- For detailed setup instructions and best practices, see the [official pgvector repository](https://github.com/pgvector/pgvector).
54
+ ### Using PostgreSQL with pgvector
62
55
 
63
-
56
+ PostgreSQL with the pgvector extension is a good solution for teams already using PostgreSQL who want to minimize infrastructure complexity. For detailed setup instructions and best practices, see the [official pgvector repository](https://github.com/pgvector/pgvector).
64
57
 
65
- **pinecone:**
58
+ **Pinecone**:
66
59
 
67
- ```ts title="vector-store.ts"
60
+ ```ts
68
61
  import { PineconeVector } from "@mastra/pinecone";
69
62
 
70
63
  const store = new PineconeVector({
@@ -82,11 +75,9 @@ await store.upsert({
82
75
  });
83
76
  ```
84
77
 
85
-
78
+ **Qdrant**:
86
79
 
87
- **qdrant:**
88
-
89
- ```ts title="vector-store.ts"
80
+ ```ts
90
81
  import { QdrantVector } from "@mastra/qdrant";
91
82
 
92
83
  const store = new QdrantVector({
@@ -107,11 +98,9 @@ await store.upsert({
107
98
  });
108
99
  ```
109
100
 
110
-
111
-
112
- **chroma:**
101
+ **Chroma**:
113
102
 
114
- ```ts title="vector-store.ts"
103
+ ```ts
115
104
  import { ChromaVector } from "@mastra/chroma";
116
105
 
117
106
  // Running Chroma locally
@@ -137,11 +126,9 @@ await store.upsert({
137
126
  });
138
127
  ```
139
128
 
140
-
141
-
142
- **astra:**
129
+ **Astra**:
143
130
 
144
- ```ts title="vector-store.ts"
131
+ ```ts
145
132
  import { AstraVector } from "@mastra/astra";
146
133
 
147
134
  const store = new AstraVector({
@@ -163,11 +150,9 @@ await store.upsert({
163
150
  });
164
151
  ```
165
152
 
166
-
167
-
168
- **libsql:**
153
+ **libSQL**:
169
154
 
170
- ```ts title="vector-store.ts"
155
+ ```ts
171
156
  import { LibSQLVector } from "@mastra/core/vector/libsql";
172
157
 
173
158
  const store = new LibSQLVector({
@@ -188,11 +173,9 @@ await store.upsert({
188
173
  });
189
174
  ```
190
175
 
191
-
176
+ **Upstash**:
192
177
 
193
- **upstash:**
194
-
195
- ```ts title="vector-store.ts"
178
+ ```ts
196
179
  import { UpstashVector } from "@mastra/upstash";
197
180
 
198
181
  // In upstash they refer to the store as an index
@@ -211,11 +194,9 @@ await store.upsert({
211
194
  });
212
195
  ```
213
196
 
214
-
197
+ **Cloudflare**:
215
198
 
216
- **cloudflare:**
217
-
218
- ```ts title="vector-store.ts"
199
+ ```ts
219
200
  import { CloudflareVector } from "@mastra/vectorize";
220
201
 
221
202
  const store = new CloudflareVector({
@@ -234,11 +215,9 @@ await store.upsert({
234
215
  });
235
216
  ```
236
217
 
237
-
238
-
239
- **opensearch:**
218
+ **OpenSearch**:
240
219
 
241
- ```ts title="vector-store.ts"
220
+ ```ts
242
221
  import { OpenSearchVector } from "@mastra/opensearch";
243
222
 
244
223
  const store = new OpenSearchVector({ id: "opensearch", node: process.env.OPENSEARCH_URL });
@@ -255,14 +234,18 @@ await store.upsert({
255
234
  });
256
235
  ```
257
236
 
258
-
259
-
260
- **elasticsearch:**
237
+ **ElasticSearch**:
261
238
 
262
- ```ts title="vector-store.ts"
239
+ ```ts
263
240
  import { ElasticSearchVector } from "@mastra/elasticsearch";
264
241
 
265
- const store = new ElasticSearchVector({ id: 'elasticsearch-vector', url: process.env.ELASTICSEARCH_URL });
242
+ const store = new ElasticSearchVector({
243
+ id: 'elasticsearch-vector',
244
+ url: process.env.ELASTICSEARCH_URL,
245
+ auth: {
246
+ apiKey : process.env.ELASTICSEARCH_API_KEY
247
+ }
248
+ });
266
249
 
267
250
  await store.createIndex({
268
251
  indexName: "my-collection",
@@ -276,10 +259,13 @@ await store.upsert({
276
259
  });
277
260
  ```
278
261
 
279
-
280
- **couchbase:**
262
+ ### Using Elasticsearch
263
+
264
+ For detailed setup instructions and best practices, see the [official Elasticsearch documentation](https://www.elastic.co/docs/solutions/search/get-started).
281
265
 
282
- ```ts title="vector-store.ts"
266
+ **Couchbase**:
267
+
268
+ ```ts
283
269
  import { CouchbaseVector } from "@mastra/couchbase";
284
270
 
285
271
  const store = new CouchbaseVector({
@@ -302,10 +288,9 @@ await store.upsert({
302
288
  });
303
289
  ```
304
290
 
305
-
306
- **lancedb:**
291
+ **Lance**:
307
292
 
308
- ```ts title="vector-store.ts"
293
+ ```ts
309
294
  import { LanceVectorStore } from "@mastra/lance";
310
295
 
311
296
  const store = await LanceVectorStore.create("/path/to/db");
@@ -323,15 +308,13 @@ await store.upsert({
323
308
  });
324
309
  ```
325
310
 
326
- <h3>Using LanceDB</h3>
311
+ ### Using LanceDB
327
312
 
328
- LanceDB is an embedded vector database built on the Lance columnar format, suitable for local development or cloud deployment.
329
- For detailed setup instructions and best practices, see the [official LanceDB documentation](https://lancedb.github.io/lancedb/).
313
+ LanceDB is an embedded vector database built on the Lance columnar format, suitable for local development or cloud deployment. For detailed setup instructions and best practices, see the [official LanceDB documentation](https://lancedb.github.io/lancedb/).
330
314
 
331
-
332
- **s3vectors:**
315
+ **S3 Vectors**:
333
316
 
334
- ```ts title="vector-store.ts"
317
+ ```ts
335
318
  import { S3Vectors } from "@mastra/s3vectors";
336
319
 
337
320
  const store = new S3Vectors({
@@ -354,8 +337,6 @@ await store.upsert({
354
337
  });
355
338
  ```
356
339
 
357
-
358
-
359
340
  ## Using Vector Storage
360
341
 
361
342
  Once initialized, all vector stores share the same interface for creating indexes, upserting embeddings, and querying.
@@ -364,7 +345,7 @@ Once initialized, all vector stores share the same interface for creating indexe
364
345
 
365
346
  Before storing embeddings, you need to create an index with the appropriate dimension size for your embedding model:
366
347
 
367
- ```ts title="store-embeddings.ts"
348
+ ```ts
368
349
  // Create an index with dimension 1536 (for text-embedding-3-small)
369
350
  await store.createIndex({
370
351
  indexName: "myCollection",
@@ -376,150 +357,174 @@ The dimension size must match the output dimension of your chosen embedding mode
376
357
 
377
358
  - OpenAI text-embedding-3-small: 1536 dimensions (or custom, e.g., 256)
378
359
  - Cohere embed-multilingual-v3: 1024 dimensions
379
- - Google text-embedding-004: 768 dimensions (or custom)
360
+ - Google gemini-embedding-001: 768 dimensions (or custom)
380
361
 
381
- > **Note:**
382
- Index dimensions cannot be changed after creation. To use a different model, delete and recreate the index with the new dimension size.
362
+ > **Warning:** Index dimensions cannot be changed after creation. To use a different model, delete and recreate the index with the new dimension size.
383
363
 
384
364
  ### Naming Rules for Databases
385
365
 
386
366
  Each vector database enforces specific naming conventions for indexes and collections to ensure compatibility and prevent conflicts.
387
367
 
388
- **mongodb:**
389
-
390
- Collection (index) names must:
391
- - Start with a letter or underscore
392
- - Be up to 120 bytes long
393
- - Contain only letters, numbers, underscores, or dots
394
- - Cannot contain `$` or the null character
395
- - Example: `my_collection.123` is valid
396
- - Example: `my-index` is not valid (contains hyphen)
397
- - Example: `My$Collection` is not valid (contains `$`)
398
-
399
- **pgVector:**
400
-
401
- Index names must:
402
- - Start with a letter or underscore
403
- - Contain only letters, numbers, and underscores
404
- - Example: `my_index_123` is valid
405
- - Example: `my-index` is not valid (contains hyphen)
406
-
407
- **pinecone:**
408
-
409
- Index names must:
410
- - Use only lowercase letters, numbers, and dashes
411
- - Not contain dots (used for DNS routing)
412
- - Not use non-Latin characters or emojis
413
- - Have a combined length (with project ID) under 52 characters
414
- - Example: `my-index-123` is valid
415
- - Example: `my.index` is not valid (contains dot)
416
-
417
- **qdrant:**
418
-
419
- Collection names must:
420
- - Be 1-255 characters long
421
- - Not contain any of these special characters:
422
- - `< > : " / \ | ? *`
423
- - Null character (`\0`)
424
- - Unit separator (`\u{1F}`)
425
- - Example: `my_collection_123` is valid
426
- - Example: `my/collection` is not valid (contains slash)
427
-
428
- **chroma:**
429
-
430
- Collection names must:
431
- - Be 3-63 characters long
432
- - Start and end with a letter or number
433
- - Contain only letters, numbers, underscores, or hyphens
434
- - Not contain consecutive periods (..)
435
- - Not be a valid IPv4 address
436
- - Example: `my-collection-123` is valid
437
- - Example: `my..collection` is not valid (consecutive periods)
438
-
439
- **astra:**
440
-
441
- Collection names must:
442
- - Not be empty
443
- - Be 48 characters or less
444
- - Contain only letters, numbers, and underscores
445
- - Example: `my_collection_123` is valid
446
- - Example: `my-collection` is not valid (contains hyphen)
447
-
448
- **libsql:**
449
-
450
- Index names must:
451
- - Start with a letter or underscore
452
- - Contain only letters, numbers, and underscores
453
- - Example: `my_index_123` is valid
454
- - Example: `my-index` is not valid (contains hyphen)
455
-
456
- **upstash:**
457
-
458
- Namespace names must:
459
- - Be 2-100 characters long
460
- - Contain only:
461
- - Alphanumeric characters (a-z, A-Z, 0-9)
462
- - Underscores, hyphens, dots
463
- - Not start or end with special characters (_, -, .)
464
- - Can be case-sensitive
465
- - Example: `MyNamespace123` is valid
466
- - Example: `_namespace` is not valid (starts with underscore)
467
-
468
- **cloudflare:**
469
-
470
- Index names must:
471
- - Start with a letter
472
- - Be shorter than 32 characters
473
- - Contain only lowercase ASCII letters, numbers, and dashes
474
- - Use dashes instead of spaces
475
- - Example: `my-index-123` is valid
476
- - Example: `My_Index` is not valid (uppercase and underscore)
477
-
478
- **opensearch:**
479
-
480
- Index names must:
481
- - Use only lowercase letters
482
- - Not begin with underscores or hyphens
483
- - Not contain spaces, commas
484
- - Not contain special characters (e.g. `:`, `"`, `*`, `+`, `/`, `\`, `|`, `?`, `#`, `>`, `<`)
485
- - Example: `my-index-123` is valid
486
- - Example: `My_Index` is not valid (contains uppercase letters)
487
- - Example: `_myindex` is not valid (begins with underscore)
488
-
489
- **elasticsearch:**
490
-
491
- Index names must:
492
- - Use only lowercase letters
493
- - Not exceed 255 bytes (counting multi-byte characters)
494
- - Not begin with underscores, hyphens, or plus signs
495
- - Not contain spaces, commas
496
- - Not contain special characters (e.g. `:`, `"`, `*`, `+`, `/`, `\`, `|`, `?`, `#`, `>`, `<`)
497
- - Not be "." or ".."
498
- - Not start with "." (deprecated except for system/hidden indices)
499
- - Example: `my-index-123` is valid
500
- - Example: `My_Index` is not valid (contains uppercase letters)
501
- - Example: `_myindex` is not valid (begins with underscore)
502
- - Example: `.myindex` is not valid (begins with dot, deprecated)
503
-
504
- **s3vectors:**
505
-
506
- Index names must:
507
- - Be unique within the same vector bucket
508
- - Be 3–63 characters long
509
- - Use only lowercase letters (`a–z`), numbers (`0–9`), hyphens (`-`), and dots (`.`)
510
- - Begin and end with a letter or number
511
- - Example: `my-index.123` is valid
512
- - Example: `my_index` is not valid (contains underscore)
513
- - Example: `-myindex` is not valid (begins with hyphen)
514
- - Example: `myindex-` is not valid (ends with hyphen)
515
- - Example: `MyIndex` is not valid (contains uppercase letters)
516
-
368
+ **MongoDB**:
369
+
370
+ Collection (index) names must:
371
+
372
+ - Start with a letter or underscore
373
+ - Be up to 120 bytes long
374
+ - Contain only letters, numbers, underscores, or dots
375
+ - Cannot contain `$` or the null character
376
+ - Example: `my_collection.123` is valid
377
+ - Example: `my-index` is not valid (contains hyphen)
378
+ - Example: `My$Collection` is not valid (contains `$`)
379
+
380
+ **PgVector**:
381
+
382
+ Index names must:
383
+
384
+ - Start with a letter or underscore
385
+ - Contain only letters, numbers, and underscores
386
+ - Example: `my_index_123` is valid
387
+ - Example: `my-index` is not valid (contains hyphen)
388
+
389
+ **Pinecone**:
390
+
391
+ Index names must:
392
+
393
+ - Use only lowercase letters, numbers, and dashes
394
+
395
+ - Not contain dots (used for DNS routing)
396
+
397
+ - Not use non-Latin characters or emojis
398
+
399
+ - Have a combined length (with project ID) under 52 characters
400
+
401
+ - Example: `my-index-123` is valid
402
+ - Example: `my.index` is not valid (contains dot)
403
+
404
+ **Qdrant**:
405
+
406
+ Collection names must:
407
+
408
+ - Be 1-255 characters long
409
+
410
+ - Not contain any of these special characters:
411
+
412
+ - `< > : " / \ | ? *`
413
+ - Null character (`\0`)
414
+ - Unit separator (`\u{1F}`)
415
+
416
+ - Example: `my_collection_123` is valid
417
+
418
+ - Example: `my/collection` is not valid (contains slash)
419
+
420
+ **Chroma**:
421
+
422
+ Collection names must:
423
+
424
+ - Be 3-63 characters long
425
+ - Start and end with a letter or number
426
+ - Contain only letters, numbers, underscores, or hyphens
427
+ - Not contain consecutive periods (..)
428
+ - Not be a valid IPv4 address
429
+ - Example: `my-collection-123` is valid
430
+ - Example: `my..collection` is not valid (consecutive periods)
431
+
432
+ **Astra**:
433
+
434
+ Collection names must:
435
+
436
+ - Not be empty
437
+ - Be 48 characters or less
438
+ - Contain only letters, numbers, and underscores
439
+ - Example: `my_collection_123` is valid
440
+ - Example: `my-collection` is not valid (contains hyphen)
441
+
442
+ **libSQL**:
443
+
444
+ Index names must:
445
+
446
+ - Start with a letter or underscore
447
+ - Contain only letters, numbers, and underscores
448
+ - Example: `my_index_123` is valid
449
+ - Example: `my-index` is not valid (contains hyphen)
450
+
451
+ **Upstash**:
452
+
453
+ Namespace names must:
454
+
455
+ - Be 2-100 characters long
456
+
457
+ - Contain only:
458
+
459
+ - Alphanumeric characters (a-z, A-Z, 0-9)
460
+ - Underscores, hyphens, dots
461
+
462
+ - Not start or end with special characters (\_, -, .)
463
+
464
+ - Can be case-sensitive
465
+
466
+ - Example: `MyNamespace123` is valid
467
+
468
+ - Example: `_namespace` is not valid (starts with underscore)
469
+
470
+ **Cloudflare**:
471
+
472
+ Index names must:
473
+
474
+ - Start with a letter
475
+ - Be shorter than 32 characters
476
+ - Contain only lowercase ASCII letters, numbers, and dashes
477
+ - Use dashes instead of spaces
478
+ - Example: `my-index-123` is valid
479
+ - Example: `My_Index` is not valid (uppercase and underscore)
480
+
481
+ **OpenSearch**:
482
+
483
+ Index names must:
484
+
485
+ - Use only lowercase letters
486
+ - Not begin with underscores or hyphens
487
+ - Not contain spaces, commas
488
+ - Not contain special characters (e.g. `:`, `"`, `*`, `+`, `/`, `\`, `|`, `?`, `#`, `>`, `<`)
489
+ - Example: `my-index-123` is valid
490
+ - Example: `My_Index` is not valid (contains uppercase letters)
491
+ - Example: `_myindex` is not valid (begins with underscore)
492
+
493
+ **ElasticSearch**:
494
+
495
+ Index names must:
496
+
497
+ - Use only lowercase letters
498
+ - Not exceed 255 bytes (counting multi-byte characters)
499
+ - Not begin with underscores, hyphens, or plus signs
500
+ - Not contain spaces, commas
501
+ - Not contain special characters (e.g. `:`, `"`, `*`, `+`, `/`, `\`, `|`, `?`, `#`, `>`, `<`)
502
+ - Not be "." or ".."
503
+ - Not start with "." (deprecated except for system/hidden indices)
504
+ - Example: `my-index-123` is valid
505
+ - Example: `My_Index` is not valid (contains uppercase letters)
506
+ - Example: `_myindex` is not valid (begins with underscore)
507
+ - Example: `.myindex` is not valid (begins with dot, deprecated)
508
+
509
+ **S3 Vectors**:
510
+
511
+ Index names must:
512
+
513
+ - Be unique within the same vector bucket
514
+ - Be 3–63 characters long
515
+ - Use only lowercase letters (`a–z`), numbers (`0–9`), hyphens (`-`), and dots (`.`)
516
+ - Begin and end with a letter or number
517
+ - Example: `my-index.123` is valid
518
+ - Example: `my_index` is not valid (contains underscore)
519
+ - Example: `-myindex` is not valid (begins with hyphen)
520
+ - Example: `myindex-` is not valid (ends with hyphen)
521
+ - Example: `MyIndex` is not valid (contains uppercase letters)
517
522
 
518
523
  ### Upserting Embeddings
519
524
 
520
525
  After creating an index, you can store embeddings along with their basic metadata:
521
526
 
522
- ```ts title="store-embeddings.ts"
527
+ ```ts
523
528
  // Store embeddings with their corresponding metadata
524
529
  await store.upsert({
525
530
  indexName: "myCollection", // index name
@@ -542,8 +547,7 @@ The upsert operation:
542
547
 
543
548
  Vector stores support rich metadata (any JSON-serializable fields) for filtering and organization. Since metadata is stored with no fixed schema, use consistent field naming to avoid unexpected query results.
544
549
 
545
- > **Note:**
546
- Metadata is crucial for vector storage - without it, you'd only have numerical embeddings with no way to return the original text or filter results. Always store at least the source text as metadata.
550
+ > **Warning:** Metadata is crucial for vector storage - without it, you'd only have numerical embeddings with no way to return the original text or filter results. Always store at least the source text as metadata.
547
551
 
548
552
  ```ts
549
553
  // Store embeddings with rich metadata for better organization and filtering
@@ -585,7 +589,7 @@ When building RAG applications, you often need to clean up stale vectors when do
585
589
 
586
590
  The most common use case is deleting all vectors for a specific document when a user deletes it:
587
591
 
588
- ```ts title="delete-vectors.ts"
592
+ ```ts
589
593
  // Delete all vectors for a specific document
590
594
  await store.deleteVectors({
591
595
  indexName: "myCollection",
@@ -594,6 +598,7 @@ await store.deleteVectors({
594
598
  ```
595
599
 
596
600
  This is particularly useful when:
601
+
597
602
  - A user deletes a document and you need to remove all its chunks
598
603
  - You're re-indexing a document and want to remove old vectors first
599
604
  - You need to clean up vectors for a specific user or tenant
@@ -602,7 +607,7 @@ This is particularly useful when:
602
607
 
603
608
  You can also use complex filters to delete vectors matching multiple conditions:
604
609
 
605
- ```ts title="delete-vectors-advanced.ts"
610
+ ```ts
606
611
  // Delete all vectors for multiple documents
607
612
  await store.deleteVectors({
608
613
  indexName: "myCollection",
@@ -627,7 +632,7 @@ await store.deleteVectors({
627
632
 
628
633
  If you have specific vector IDs to delete, you can pass them directly:
629
634
 
630
- ```ts title="delete-by-ids.ts"
635
+ ```ts
631
636
  // Delete specific vectors by their IDs
632
637
  await store.deleteVectors({
633
638
  indexName: "myCollection",
@@ -1,20 +1,33 @@
1
- # Storage API Reference
1
+ # LanceDB Storage
2
2
 
3
- > API reference for storage - 1 entries
3
+ The LanceDB storage implementation provides a high-performance storage solution using the LanceDB database system, which excels at handling both traditional data storage and vector operations.
4
4
 
5
+ > **Observability Not Supported:** LanceDB storage **does not support the observability domain**. Traces from the `DefaultExporter` cannot be persisted to LanceDB, and Mastra Studio's observability features won't work with LanceDB as your only storage provider. To enable observability, use [composite storage](https://mastra.ai/reference/storage/composite) to route observability data to a supported provider like ClickHouse or PostgreSQL.
5
6
 
6
- ---
7
+ ## Installation
7
8
 
8
- ## Reference: LanceDB Storage
9
+ **npm**:
9
10
 
10
- > Documentation for the LanceDB storage implementation in Mastra.
11
+ ```bash
12
+ npm install @mastra/lance@latest
13
+ ```
11
14
 
12
- The LanceDB storage implementation provides a high-performance storage solution using the LanceDB database system, which excels at handling both traditional data storage and vector operations.
15
+ **pnpm**:
13
16
 
14
- ## Installation
17
+ ```bash
18
+ pnpm add @mastra/lance@latest
19
+ ```
20
+
21
+ **Yarn**:
15
22
 
16
23
  ```bash
17
- npm install @mastra/lance@beta
24
+ yarn add @mastra/lance@latest
25
+ ```
26
+
27
+ **Bun**:
28
+
29
+ ```bash
30
+ bun add @mastra/lance@latest
18
31
  ```
19
32
 
20
33
  ## Usage
@@ -40,6 +53,12 @@ const storage = await LanceStorage.create("my-storage", "s3://bucket/db", {
40
53
 
41
54
  ### LanceStorage.create()
42
55
 
56
+ **name:** (`string`): Name identifier for the storage instance
57
+
58
+ **uri:** (`string`): URI to connect to the LanceDB database. Can be a local path, cloud DB URL, or S3 bucket URL
59
+
60
+ **options?:** (`ConnectionOptions`): Connection options for LanceDB, such as timeout settings, authentication, etc.
61
+
43
62
  ## Additional Notes
44
63
 
45
64
  ### Schema Management
@@ -82,23 +101,22 @@ const memoryStore = await storage.getStore('memory');
82
101
  const thread = await memoryStore?.getThreadById({ threadId: "..." });
83
102
  ```
84
103
 
85
- > **Note:**
86
- If `init()` is not called, tables won't be created and storage operations will fail silently or throw errors.
104
+ > **Warning:** If `init()` is not called, tables won't be created and storage operations will fail silently or throw errors.
87
105
 
88
106
  ### Deployment Options
89
107
 
90
108
  LanceDB storage can be configured for different deployment scenarios:
91
109
 
92
110
  - **Local Development**: Use a local file path for development and testing
93
- ```
111
+ ```text
94
112
  /path/to/db
95
113
  ```
96
114
  - **Cloud Deployment**: Connect to a hosted LanceDB instance
97
- ```
115
+ ```text
98
116
  db://host:port
99
117
  ```
100
118
  - **S3 Storage**: Use Amazon S3 for scalable cloud storage
101
- ```
119
+ ```text
102
120
  s3://bucket/db
103
121
  ```
104
122