0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
mastra/stores/libsql
dane-ai-mastra[bot] 3c7d26e6ab
chore: version packages (alpha) (#30516)
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 2026-11-16 23:44:41 +01:00
..
src feat(core, pg, libsql, server): run evented workflows and durable agents on storage v2 (#29370) 2026-11-16 08:23:06 -08:00
.gitignore move libsql to own store package 2025-04-23 14:56:15 +02:00
CHANGELOG.md chore: version packages (alpha) (#30516) 2026-11-16 23:44:41 +01:00
lint-staged.config.js refactor(lint): replace ESLint with type-aware oxlint (#27476) 2026-10-18 10:38:35 -07:00
package.json chore: version packages (alpha) (#30516) 2026-11-16 23:44:41 +01:00
README.md docs: point store READMEs at the new integrations vector pages (#28970) 2026-10-30 11:31:23 +01:00
tsconfig.build.json Add a child-process peer helper for cross-process durable tests and port harness case T79 (#26034) 2026-10-06 17:09:29 -05:00
tsconfig.json chore: migrate package builds to tsdown (#19829) 2026-07-28 12:32:21 +02:00
tsdown.config.ts feat(storage): add LibSQL and PostgreSQL Knowledge v2 schema (#26018) 2026-10-08 23:34:57 -07:00
turbo.json chore: migrate package builds to tsdown (#19829) 2026-07-28 12:32:21 +02:00
vitest.config.ts refactor: reorganize core tests and namespace vitest projects across monorepo (#12662) 2026-02-09 10:24:48 +01:00

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