Skip to content

Data Providers

Data providers connect MemoryLayer to external data sources for automated document ingestion. Configure a provider once, set a sync schedule, and MemoryLayer pulls new and updated content automatically into the documents pipeline.

This page covers the /v1/data-providers REST API and the connector set in core MemoryLayer. MemoryLayer Enterprise, the open-source (AGPL-3.0) production edition, adds working connectors for S3, GitHub, Google Drive, Dropbox, Slack, Teams, Discord, web pages, manual upload, and local files, plus scheduled sync. See Data Connectors.

The REST API surface is the same in MemoryLayer and MemoryLayer Enterprise. Enterprise adds more provider_type values, backed by its memorylayer-data-connectors service, and a scheduler that honours schedule.


Core Connector Set

Core MemoryLayer ships with a single connector type:

TypeDescriptionTypical Connection Args
localLocal filesystem path on the server hostroot_path, glob, recursive

local is the default provider_type value if you omit it. A _default local provider is auto-created in each workspace on first access, so listing providers in a fresh workspace will always show at least one entry.


Create a Local Filesystem Provider

Terminal window
curl -X POST "$MEMORYLAYER_URL/v1/data-providers" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Engineering Docs (local)",
"provider_type": "local",
"description": "Local docs directory mounted into the server",
"enabled": true,
"connection_args": {
"root_path": "/data/docs/engineering",
"glob": "**/*.md",
"recursive": true
},
"schedule": "0 2 * * *",
"metadata": {"team": "engineering"}
}'

Fields:

FieldRequiredDescription
nameYesProvider name (must not be empty)
provider_typeNoConnector type (defaults to local)
descriptionNoHuman-readable description
enabledNoWhether the provider is active (default true)
connection_argsNoNon-sensitive connection parameters
scheduleNoCron expression for automatic sync
metadataNoArbitrary key-value metadata

List Providers

Terminal window
curl "$MEMORYLAYER_URL/v1/data-providers?limit=50&offset=0" \
-H "Authorization: Bearer $API_KEY"

Get a Provider

Terminal window
curl "$MEMORYLAYER_URL/v1/data-providers/$PROVIDER_ID" \
-H "Authorization: Bearer $API_KEY"

Only non-sensitive connection_args are stored and returned in core MemoryLayer. Never put credentials in connection_args. MemoryLayer Enterprise connectors keep credentials separately, encrypted.


Update a Provider

Only provided fields are updated; others remain unchanged.

Terminal window
curl -X PUT "$MEMORYLAYER_URL/v1/data-providers/$PROVIDER_ID" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"schedule": "0 */6 * * *",
"connection_args": {
"root_path": "/data/docs/engineering",
"glob": "**/*.{md,txt}",
"recursive": true
}
}'

Delete a Provider

Terminal window
curl -X DELETE "$MEMORYLAYER_URL/v1/data-providers/$PROVIDER_ID" \
-H "Authorization: Bearer $API_KEY"

Deleting a provider does not delete previously ingested documents or memories.


Sync Scheduling

The schedule field accepts standard cron expressions:

ExpressionMeaning
0 2 * * *Daily at 2:00 AM
0 */6 * * *Every 6 hours
0 0 * * 1Weekly on Monday at midnight
*/30 * * * *Every 30 minutes

Set schedule to null to disable automatic sync. The last_sync_at field on the provider record shows the timestamp of the most recent successful sync.

You can also trigger a one-off sync at any time:

Terminal window
curl -X POST "$MEMORYLAYER_URL/v1/data-providers/$PROVIDER_ID/sync" \
-H "Authorization: Bearer $API_KEY"

Core behaviour: in core MemoryLayer, the local connector’s sync() is a no-op. The endpoint returns success with an empty synced_documents list, and the schedule cron is stored but never fired. MemoryLayer Enterprise turns these calls into real ingestion runs. The patterns above are still the right way to configure providers in core MemoryLayer, so the same records work unchanged in a deployment that can sync.