Skip to main content

Memories API

Memories are persistent knowledge bases with vector search capabilities. They can store text, files, and other content for retrieval by neurons.

List Memories

Get a list of memories with optional filtering.
Brain scope required. Include the X-Brain-Id header or configure getBrainId in the public client.
GET /v1/memories

Headers

HeaderTypeDescription
X-Brain-Idstring (UUID)Required. Brain ID for scoping

Query Parameters

ParameterTypeDescription
source_typestringFilter by source type: text, file, etc.
limitnumberMaximum number of results (default: 20)
offsetnumberOffset for pagination
sortBystringSort field: created_at, updated_at, name

Example Request

const memories = await auvy.memories.list({
  source_type: 'file'
})

Get Memory

Get a single memory by ID.
GET /v1/memories/:id

Path Parameters

ParameterTypeDescription
idstringMemory UUID

Create Memory

Create a new memory.
POST /v1/memories

Request Body

FieldTypeRequiredDescription
namestringYesMemory name
descriptionstringNoMemory description
source_typestringYesSource type: text or file

Example Request

const memory = await auvy.memories.create({
  name: 'My Memory',
  description: 'A sample memory',
  source_type: 'text'
})

Ingest Memory

Create a memory by ingesting a file (multipart) or text/URL (JSON). Use one of two request formats.
POST /v1/memories/ingest

Option A — File upload (multipart/form-data)

FieldTypeRequiredDescription
filefileYesFile to ingest
namestringNoFile name override
owner_typestringNoOwner type (e.g. neuron, trace)
owner_idstringNoOwner UUID

Option B — Text or URL (application/json)

Either content (non-empty text) or file_url is required.
FieldTypeRequiredDescription
contentstringNo*Text content to ingest
file_urlstring (URL)No*Any publicly reachable file URL (HTTP/HTTPS; e.g. S3, GCS, or any host)
namestringNoMemory name
descriptionstringNoMemory description
owner_typestringNoOwner type (e.g. neuron, trace)
owner_idstring (UUID)NoOwner UUID
skip_title_descriptionbooleanNoSkip auto title/description (default: false)
skip_embeddingbooleanNoSkip embedding job (default: false)
metadataobjectNoCustom metadata
* Either content or file_url must be provided.

Example requests

const file = fileInput.files?.[0] // or new File([...], 'doc.pdf', { type: 'application/pdf' })
if (file) {
  const { memory, embeddingJobId } = await auvy.memories.ingest(file, {
    name: 'document.pdf'
  })
}

Get Memory Chunks

Get vector chunks from a memory for search results.
GET /v1/memories/:id/chunks

Path Parameters

ParameterTypeDescription
idstringMemory UUID

Query Parameters

ParameterTypeDescription
limitnumberMaximum number of chunks
offsetnumberOffset for pagination

Bulk Delete Memories

Delete multiple memories at once.
POST /v1/memories/bulk-delete

Request Body

FieldTypeRequiredDescription
idsarrayYesArray of memory UUIDs to delete

Example Request

const result = await auvy.memories.bulkDelete(['uuid-1', 'uuid-2'])
console.log(`Deleted ${result.deletedCount} memories`)

Example Response

{
  "deletedCount": 2,
  "notFoundCount": 0
}