Skip to main content
A vector field stores a fixed-length array of numbers. You can create, read, replace, and delete its value through ordinary collection operations without configuring a search index or an AI provider. FrogBot does not generate the vector for you.

Configure a vector field

Install @frogbotai/db-sqlite, set FROGBOT_SECRET, and add this frogbot.config.ts:
This configuration has no search index and can initialize with the SQLite adapter. The three-dimensional value keeps the example short; choose dimensions that match the vectors your application supplies.

Config options

Admin options

Vector fields use the JSON editor and support the standard field admin options, plus these options:

Write and read vectors

In trusted server-side code, use the Local API. This example explicitly bypasses collection access; for request-scoped operations, pass the request and use overrideAccess: false instead.
dimensions must be a positive integer. A supplied value must be an array of exactly that many finite numbers; strings, NaN, and Infinity are rejected. Optional fields may be omitted or set to null; set required: true to require a value on normal writes. Generated collection types represent vector values as number[] with optional/null behavior according to the field configuration. The field uses the JSON editor in the admin panel; admin.hidden or admin.readOnly changes presentation, not API permissions.
Set vectors in a collection hook or in the vector field’s own hooks. FrogBot validates the vector after those hooks run. Hooks on other fields run at the same time as the vector’s validation, so a vector they set after an await can be saved without validation, including in drafts.
Matching dimensions do not guarantee two embeddings use the same model or embedding space. Updating or deleting the record does not regenerate embeddings. See Search for the index and query API’s current availability.

Storage

Vectors are stored as JSON arrays by default. A database adapter can instead map each vector field, with its path and dimensions, to a native vector column through the adapter’s mapVectorField option. None of the built-in adapters provides native vector storage yet, so every adapter uses the JSON default today.