unstale

npm / @mastra/libsql

@mastra/libsql

What changed in @mastra/libsql 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

9 breaking2 security37 new APIs and options6 performance5 behavior and defaults27 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@mastra/libsql 186 changes

Breaking changes 9

  • Text columns containing JSON-like values now read back as stored text rather than parsed objects, fixing the Studio Traces page error on LibSQL storage.

    1.30.0release notes

  • Search now matches pages containing any query word and ranks pages by the number of matching words, while whole-query name matches remain first.

    1.29.0release notes

  • Knowledge is stored as pages, notes, and pins instead of nodes and records. Startup drops the earlier experimental Knowledge node-store tables and creates the new tables; Memory and other tables are untouched.

    1.29.0release notes

  • libSQL stores reject writes from durable agent executions that lost their run during crash recovery. The claims tables are created on init; with disableInit: true, create them before upgrading. Durable agent runs require the tables to exist.

    1.26.0release notes

  • $or and $nor metadata filters now combine the keys of each condition with AND, preventing unintended matches and excess vector deletions.

    1.24.0release notes

  • Listings now honor the orderBy option instead of always returning a fixed order. This requires @mastra/core 1.68.0 or newer.

    1.23.1release notes

  • Factory storage adapter updates with unique-index conflicts now throw UniqueViolationError, matching inserts so callers can handle duplicate claims consistently.

    1.23.1release notes

  • Fixed the store package failing to load with @mastra/core older than 1.63.1 and corrected the minimum supported core version.

    1.22.2release notes

  • Paginated memory reads now re-throw backend failures as MastraError instead of returning empty results; callers can distinguish outages from genuinely empty results.

    1.20.0release notes

Security 2

  • Fixes concurrent dataset item writes so purged payloads cannot be restored during updates or deletes.

    1.23.0release notes

  • Scoped trace deletion now rejects unsupported tenant filters instead of deleting data without scope.

    1.22.4release notes

New APIs and options 37

  • Pass endAt with cron to stop a recurring schedule after a given time; declarative workflow schedules also accept it.

    1.30.0release notes

  • LibSQL observability storage reports whether persistence is local or remote, helping prevent local observability writes on Platform.

    1.30.0release notes

  • Pass runAt instead of cron to create a one-off schedule for an agent or workflow; declarative workflow schedules also accept it.

    1.30.0release notes

  • Workflows can opt into storage version 2, which stores runs as a header plus per-step entries and saves only changes. Existing runs remain usable; init() creates the required tables.

    1.30.0release notes

  • Knowledge storage adapters gain countChildPages({ parentIds, read }), which counts readable child pages under each parent in one query.

    1.29.0release notes

  • Run this once to index pages written before upgrading to the LibSQL Knowledge page link index.

    1.29.0release notes

  • The LibSQL Knowledge store creates and maintains a page link index table at startup, including in existing databases without a schema change. Existing pages need one reindexLinks() run after upgrading.

    1.29.0release notes

  • The pins table gains kind and depth columns, allowing one pin per page per kind. LibSQL rebuilds the table on first start, copying existing pins as page pins; no reset is needed.

    1.29.0release notes

  • Background task updates support the expectedSuspendedAt condition, rejecting a write for an earlier suspension instead of overwriting a newer suspension.

    1.28.0release notes

  • Background task storage adds the optional expiresAt field and filtering by expiresAt; existing tables and collections gain the field automatically when the store initializes.

    1.28.0release notes

  • Background task storage adds the optional metadata field; existing tables and collections gain the field automatically when the store initializes.

    1.28.0release notes

  • Added a method so MastraStorageExporter can end spans started by another process; spans that already ended aren't overwritten.

    1.27.1release notes

  • Added a datasetIds filter to fetch specific datasets by ID in one request; all matches come back on one page, up to 100 IDs.

    1.27.0release notes

  • A nullable supersededBy column is added to the observational memory table automatically at startup and existing rows are backfilled; users managing the schema themselves must add it before upgrading.

    1.26.1release notes

  • Set this option to prune memory run fences when calling storage.prune().

    1.26.0release notes

  • Set this option to prune workflow run ownership claims when calling storage.prune().

    1.26.0release notes

  • Filter observational memory history to records containing a group in active observations or persisted buffered chunks.

    1.25.0release notes

  • Read one history record by ID; it only matches records for the requested thread or resource.

    1.25.0release notes

  • Choose the generation ordering for observational memory history, including finding the earliest retained record.

    1.25.0release notes

  • Adapters advertise support for observational memory history search through this capability.

    1.25.0release notes

  • Background task ownership is persisted with ownerId and leaseExpiresAt, and updateTask() honors expectedOwnerId and expectedLeaseExpiresAt write conditions to fence recovery on the lease. Existing tables are migrated in place.

    1.24.0release notes

  • Copies a thread and its messages without returning message content, avoiding loading every message payload into the Node heap.

    1.23.0release notes

  • Adds an atomic, serialized implementation that moves a thread and all its messages to a new resourceId inside a single transaction.

    1.23.0release notes

  • Accepts tags to filter experiment results; a result matches only when all requested tags are present.

    1.22.5release notes

  • Adds item purging that redacts content from dataset history and linked experiment results while preserving version history and review status.

    1.22.4release notes

  • Knowledge nodes gain an optional bounded description field, written through a dedicated curator tool as part of an experimental memory feature.

    1.22.1release notes

  • Added syncUrl and syncInterval options to keep a local database file synced with a remote libSQL primary.

    1.22.0release notes

  • Added a reusable SQLite client contract for storage adapters using compatible SQLite drivers.

    1.22.0release notes

  • Adds an attempt column to experiment results, enabling retry-safe result writes keyed by experiment, item, and attempt.

    1.21.1release notes

  • Accepts an optional caller-supplied id and upserts on it, so retried experiment submissions replace previous score rows instead of accumulating duplicates.

    1.21.1release notes

  • Adds an optional scorerIds column to experiments for caller-driven experiment results.

    1.21.1release notes

  • Adds a nullable target to experiments, supporting caller-driven experiments with an optional target.

    1.21.1release notes

  • Adds retry-safe experiment result writes that converge on one row for the same experiment, item, and attempt.

    1.21.1release notes

  • Added a durable option to stored agents so agents created through the Agents API can run with durable execution without code deployment; defaults or loop settings can be supplied.

    1.21.0release notes

  • Added foundational support for an upcoming experimental memory capability across storage, runtime, and developer tooling.

    1.21.0release notes

  • LibSQL storage supports experiment grouping fields, which remain available for later grouping and filtering.

    1.20.0release notes

  • LibSQL storage supports experiment provenance fields, which remain available for later grouping and filtering.

    1.20.0release notes

Performance 6

  • Queries that scan rows without using the vector index are much faster because the query vector is parsed once per query instead of once per scanned row, with the same results.

    1.27.0release notes

  • Workflow run lists requested with summary: true now read only status and timestamp from each snapshot, reducing database transfer for large snapshots.

    1.24.0release notes

  • Thread lookups now filter the thread id embedded in suspended run snapshots inside SQLite instead of loading every suspended snapshot into the application.

    1.23.1release notes

  • Adds an idempotently created partial index on startedAt for root spans, improving observability trace listing without scanning the full spans table.

    1.23.0release notes

  • LibSQL overrides getVersions for agents and skills, fetching active versions in one WHERE id IN (...) query instead of one query per listed entity.

    1.22.3release notes

  • Added native application collection counts so totals no longer require loading matching rows.

    1.22.0release notes

Behavior and default changes 5

  • cron is now optional on schedule records and create/update inputs, so strict consumers must check that schedule.cron is defined before reading it.

    1.30.0release notes

  • Database-backed agents retain Editor changes to static model fallback lists across restarts, and existing LibSQL databases upgrade automatically.

    1.29.0release notes

  • Storage identifiers are generated with Web Crypto while synchronous storage interfaces remain unchanged.

    1.24.1release notes

  • Storage adapters declare support for partial thread updates, allowing newer memory versions to preserve existing titles and remain safe with older adapters.

    1.20.0release notes

  • title and metadata are independently optional; omitting either leaves that column untouched, preventing stale titles from overwriting generated ones.

    1.20.0release notes

Fixes and other changes 27

  • Fixed LibSQL vector stores leaving the vector index broken after truncateIndex, which caused later inserts to fail.

    1.30.0release notes

  • Cancellation status is checked in the same statement as a snapshot write, preventing a concurrent write from overwriting a run canceled by another process.

    1.27.1release notes

  • Remote database startup handles transient network errors with limited concurrency and backoff retries; a failed init() can now be retried.

    1.27.0release notes

  • The metadata filter in skills.list and skills.listResolved now matches every key/value pair against resolved version metadata, with correct total and pagination.

    1.27.0release notes

  • New tables get a (threadId, id) primary key, and existing tables are upgraded when storage initializes, preventing duplicate notification ids and enabling PostgreSQL updates and deletes in logical replication publications.

    1.26.2release notes

  • Late workflow result writes no longer recreate deleted runs.

    1.26.1release notes

  • Transactions on :memory: databases now commit or roll back like file databases, so partial writes are not left in place when a write fails.

    1.26.1release notes

  • Concurrent reflection, activation, buffering, and message saves no longer lose context or cause SQLITE_BUSY errors on a local file database.

    1.26.1release notes

  • With url plus syncUrl, observational memory writes sync the replica before retrying after a conflict or treating another instance's record as missing; this does not apply to a prebuilt client.

    1.26.1release notes

  • The experimental memory feature was rearchitected.

    1.26.0release notes

  • Reopens connections after a local database write is refused with SQLITE_BUSY, preventing later writes from failing while the connection is stuck.

    1.26.0release notes

  • When multiple LibSQL clients in one process use the same local database file, a write waits for another client's open transaction instead of blocking the process.

    1.26.0release notes

  • Memory writes retry with backoff when another process briefly holds the database lock, using the existing maxRetries and initialBackoffMs options.

    1.26.0release notes

  • Workflow step results can be recorded together with workflow state in a single write, helping evented workflows resume with the correct state after a restart.

    1.26.0release notes

  • Schedules with no future cron occurrence are stored as completed when their final firing is claimed, so that occurrence is delivered once instead of on every tick.

    1.25.1release notes

  • Fixed the LibSQL store so updating workflow state also updates the run's updatedAt, preventing updated runs from appearing stale in sorting and retention.

    1.24.1release notes

  • Fixes schedules failing with “no such column: owner_type” on databases created by older versions; existing schedules and trigger history are kept, and upgrades are safe when processes share a database.

    1.24.0release notes

  • LibSQL skills storage now includes visibility in the skill returned by create.

    1.23.3release notes

  • Omitted dataset descriptions now read back as undefined, matching their declared type.

    1.23.2release notes

  • LibSQL dataset writes now preserve JSON null in input, groundTruth, and expectedTrajectory across insertion, updates, and version history.

    1.23.2release notes

  • prune now uses one cutoff instant across all retained tables so rows near the retention boundary are handled consistently.

    1.23.1release notes

  • Fixes serialization so primitive background task results round-trip correctly through LibSQL storage.

    1.23.0release notes

  • Fixes double-encoding tags on insert and backfills previously affected rows on init() so they match the new filter.

    1.22.5release notes

  • Fixes url: ':memory:' losing tables after an interactive write transaction by queuing store calls behind open transactions, preventing TRANSACTION_ACTIVE failures.

    1.22.5release notes

  • Fixed local LibSQL vector corruption during concurrent writes.

    1.22.3release notes

  • The LibSQL vector filter's $size operator now binds through a standard ? placeholder, fixing invalid SQL caused by named references that did not match positional bindings.

    1.22.3release notes

  • Lookups now return the item visible in the requested dataset snapshot.

    1.21.1release notes