Actions15
Create or Update
AI-generatedSummary
Upsert a vector into the Minimemory database, creating a new record or updating an existing one by ID.
Inputs
- databaseName (required) — Name to identify this database instance in memory
- vectorId (required) — Unique identifier for the vector
- vector (required) — Vector as JSON array of numbers, e.g., [0.1, 0.2, 0.3, ...]. Can also use expression to get from previous node.
- metadata — Optional metadata as JSON object, e.g., {
Output shape
Object containing: success (boolean), operation (string), id (string), dimensions (number), hasMetadata (boolean), totalVectors (number). Returned on successful upsert/insert.
Both 'insert' and 'upsert' UI operations map to the same internal code path; selecting 'Create or Update' sets the operation parameter to 'upsert'. If metadata is provided as a non-empty object, it is persisted with the vector; otherwise it is omitted.
Examples
Example 1: Add a new embedding vector to the default database
databaseName: 'default', vectorId: 'vec-001', vector: [0.1, 0.5, 0.9], metadata: {'title': 'Doc A', 'category': 'tech'}
Example 2: Update an existing vector's values
databaseName: 'default', vectorId: 'vec-001', vector: [0.2, 0.6, 1.0]