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.
| Field | What it does |
|---|---|
| Credential (required) | The libSQL / Turso credential. |
| Operation | Add (default), SQL, Retriever or DatabaseInfo. |
| Table Name | The table. Default: nappai. |
| Search Query | The SQL query to run. |
| Ingest Data | The data to store. |
| Embedding | Connector for an embeddings component. If the data has a text field, its representation is also stored for search by meaning. |
Advanced options
| Field | What it does |
|---|---|
| Drop Table | Deletes the table, if it exists, before storing. Off by default. |
| Number Of Results | How many results the search engine returns. Default: 10. |
| Search Score Threshold | If 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.
- Connect the answers to Ingest Data of libSQL, with the
answerstable and an embeddings component. - Run the flow.
- In the assistant, connect the Retriever output to a component that uses a search engine.
Related components
- libSQL: inserts, reads, updates and deletes rows.