Skip to content

libSQL

libSQL stores data in a table of your libSQL or Turso database, queries it with SQL and, if you connect an embeddings component, lets you search its texts by meaning.

There are two components named libSQL. This one is for storing and searching. The other libSQL works row by row: it inserts, reads, updates and deletes.

When to use it

  • Storing in Turso the texts a flow processes to search them later.
  • Giving an agent a search engine over your documents stored in libSQL.
  • Querying your database with SQL from a flow.

Configuration

If you connect data to Ingest Data, it is stored in the table, which is created if it does not exist. If you type a query in Search Query, it runs and returns its result. The Retriever output offers the table as a search-by-meaning engine.

You need a libSQL / Turso credential with your database address and token. See Credentials.

FieldWhat it does
Credential (required)The libSQL / Turso credential.
OperationAdd (default), SQL, Retriever or DatabaseInfo.
Table NameThe table. Default: nappai.
Search QueryThe SQL query to run.
Ingest DataThe data to store.
EmbeddingConnector for an embeddings component. If the data has a text field, its representation is also stored for search by meaning.

Advanced options

FieldWhat it does
Drop TableDeletes the table, if it exists, before storing. Off by default.
Number Of ResultsHow many results the search engine returns. Default: 10.
Search Score ThresholdIf not 0, the search engine drops results that are not similar enough.

Output

Data holds the data stored or the query result. Retriever is the search-by-meaning engine. Database Info and Database Schema describe the database and the table.

Example

A support team stores in Turso the answers it has already given.

  1. Connect the answers to Ingest Data of libSQL, with the answers table and an embeddings component.
  2. Run the flow.
  3. In the assistant, connect the Retriever output to a component that uses a search engine.
  • libSQL: inserts, reads, updates and deletes rows.