mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases > The changelog information of each package has been omitted from this message, as the content exceeds the size limit. ## @mastra/factory@0.29.0-alpha.5 ## mastra@1.40.0-alpha.4 ## @mastra/core@1.84.0-alpha.4 ## @mastra/playground-ui@69.1.0-alpha.4 ## @mastra/libsql@1.31.0-alpha.2 ## @mastra/pg@1.37.0-alpha.2 ## @mastra/client-js@1.60.1-alpha.4 ## @mastra/react@1.15.1-alpha.4 ## @mastra/deployer-cloud@1.84.0-alpha.4 ## @mastra/longmemeval@1.1.43-alpha.4 ## @mastra/opencode@0.1.43-alpha.4 ## create-factory@0.4.4-alpha.4 ## @mastra/code-sdk@1.19.1-alpha.5 ## mastracode@0.50.1-alpha.5 ## @mastra/deployer@1.84.0-alpha.4 ## @mastra/mcp-apps-components@0.1.1-alpha.1 ## @mastra/mcp-docs-server@1.3.14-alpha.4 ## @mastra/server@1.84.0-alpha.4 ## @mastra/redis-streams@0.9.0-alpha.2 ## @mastra/elysia@0.1.24-alpha.4 ## @mastra/express@1.5.28-alpha.4 ## @mastra/fastify@1.5.28-alpha.4 ## @mastra/hono@1.7.26-alpha.4 ## @mastra/koa@1.7.28-alpha.4 ## @mastra/nestjs@0.3.1-alpha.4 ## @mastra/next@0.2.42-alpha.4 ## @mastra/tanstack-start@0.2.42-alpha.4 ## @mastra/convex@1.9.1-alpha.2 ## @mastra/turso@0.1.22-alpha.2 ## @mastra/inngest@1.11.3-alpha.0 ## @mastra/temporal@0.6.1-alpha.4 ## @mastra/platform-workspace@1.13.1-alpha.0 ## create-mastra@1.40.0-alpha.4 ## @internal/playground@1.40.0-alpha.4 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
History
|
|
|---|---|---|
| .. | ||
| src | ||
| .gitignore | ||
| CHANGELOG.md | ||
| lint-staged.config.js | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
| turbo.json | ||
| vitest.config.ts | ||
@mastra/libsql
SQLite implementation for Mastra, providing both vector similarity search and general storage capabilities with connection pooling and transaction support.
Installation
npm install @mastra/libsql
Usage
Vector Store
import { LibSQLVector } from '@mastra/libsql';
const vectorStore = new LibSQLVector({
url: 'file:./my-db.db',
});
// Create a new table with vector support
await vectorStore.createIndex({
indexName: 'my_vectors',
dimension: 3,
metric: 'cosine',
});
// Add vectors
const ids = await vectorStore.upsert({
indexName: 'my_vectors',
vectors: [
[0.1, 0.2, 0.3],
[0.3, 0.4, 0.5],
],
metadata: [{ text: 'doc1' }, { text: 'doc2' }],
});
// Query vectors
const results = await vectorStore.query({
indexName: 'my_vectors',
queryVector: [0.1, 0.2, 0.3],
topK: 10, // topK
filter: { text: 'doc1' }, // filter
includeVector: false, // includeVector
minScore: 0.5, // minScore
});
Documentation
Changelog
See the package changelog for version history and release notes.
Support
We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.