Skip to main content

Exporting Data

The Export feature lets you download your workspace memories in bulk. Choose a format, apply optional filters, and Memsolus generates a file you can download once it is ready.

Exports require the export.write permission on your API key.


Supported Formats​

FormatBest for
jsonMachine-readable export, data migration
csvSpreadsheets and data analysis tools
markdownHuman-readable documentation or archives

How to Export Your Memories​

1

Create the export job

Submit a request specifying the format and any filters you want to apply. If you provide no filters, all memories in the workspace are exported.

curl -X POST "https://api.memsolus.com/v1/exports?format=json&user_id=user-123" \
-H "X-Api-Key: msk_live_..."

Response:

{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"format": "json",
"status": "PENDING",
"user_id": "user-123",
"created_at": "2026-01-15T10:30:00.000Z"
}
2

Wait for the export to complete

Exports are processed asynchronously. Poll the job until status is READY.

curl "https://api.memsolus.com/v1/exports/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "X-Api-Key: msk_live_..."
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"format": "json",
"status": "READY",
"user_id": "user-123",
"updated_at": "2026-01-15T10:32:00.000Z"
}
3

Download the file

Once status is READY, download the file:

curl -o memories.json \
"https://api.memsolus.com/v1/exports/a1b2c3d4-e5f6-7890-abcd-ef1234567890/download" \
-H "X-Api-Key: msk_live_..."

The download link is available for 72 hours after the export reaches READY. After that, you need to create a new export.


Using the SDK​

import { Memsolus } from '@memsolus/sdk';

const client = new Memsolus({ apiKey: 'msk_live_...' });

// Create the export job
const job = await client.exports.create({
format: 'json',
userId: 'user-123',
categories: ['tech_stack', 'preferences'],
});

// Wait for completion
const result = await client.exports.waitForCompletion(job.id);

// Download
const file = await client.exports.download(result.id);

Export Filters​

All filters are optional. If none are provided, the entire workspace is exported.

FilterTypeDescription
user_idstringExport only memories for this user
agent_idstringExport only memories from this agent
session_idstringExport only memories from this session
priorityenumFilter by LOW, MEDIUM, or HIGH
categoriesstring[]Export only memories with these categories
created_afterISO 8601 dateExport memories created after this date
created_beforeISO 8601 dateExport memories created before this date

Job Status​

StatusWhat it means
PENDINGJob received, waiting to start
PROCESSINGGenerating the file
READYFile is ready to download
FAILEDExport could not be completed
EXPIRED72 hours elapsed — create a new export

Notes​

  • Download links expire after 72 hours — if you miss the window, create a new export
  • Large workspaces may take a few minutes to process