Skip to content

Application Management

Applications represent the software systems that interact with MemoryLayer. Each application belongs to a tenant and can be associated with one or more workspaces, optionally with per-workspace configuration overrides.

Application Fields

FieldTypeRequiredDescription
namestringYesApplication name (must not be empty)
descriptionstringNoHuman-readable description
app_typestringNoType classification: generic, chat, agent, or tool (default: generic)
enabledbooleanNoWhether the application is active (default: true)
configobjectNoApplication-level configuration
metadataobjectNoArbitrary key-value metadata

Create an Application

Terminal window
curl -X POST https://api.memorylayer.ai/v1/applications \
-H "Authorization: Bearer $ML_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Support Agent",
"description": "Customer support chatbot",
"app_type": "agent",
"config": {
"max_memories_per_session": 500
}
}'

Returns 201 Created with the full application object including the generated id (prefixed with app_).

List Applications

Terminal window
curl https://api.memorylayer.ai/v1/applications?limit=50&offset=0 \
-H "Authorization: Bearer $ML_API_KEY"

Response:

{
"applications": [
{
"id": "app_a1b2c3d4e5f6g7h8",
"tenant_id": "tenant_abc",
"name": "Support Agent",
"description": "Customer support chatbot",
"app_type": "agent",
"enabled": true,
"config": {"max_memories_per_session": 500},
"metadata": {},
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-01-15T10:30:00Z"
}
],
"total_count": 1
}

Get an Application

Terminal window
curl https://api.memorylayer.ai/v1/applications/app_a1b2c3d4e5f6g7h8 \
-H "Authorization: Bearer $ML_API_KEY"

Update an Application

Send only the fields to change. Omitted fields are left unchanged.

Terminal window
curl -X PUT https://api.memorylayer.ai/v1/applications/app_a1b2c3d4e5f6g7h8 \
-H "Authorization: Bearer $ML_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Updated support agent v2",
"config": {"max_memories_per_session": 1000}
}'

Delete an Application

Terminal window
curl -X DELETE https://api.memorylayer.ai/v1/applications/app_a1b2c3d4e5f6g7h8 \
-H "Authorization: Bearer $ML_API_KEY"

Returns 204 No Content on success.

Workspace Associations

Applications can be linked to workspaces with optional configuration overrides. This allows a single application definition to behave differently across workspaces.

Associate with a Workspace

Terminal window
curl -X POST https://api.memorylayer.ai/v1/applications/app_a1b2c3d4e5f6g7h8/workspaces/ws-production \
-H "Authorization: Bearer $ML_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"config_overrides": {
"max_memories_per_session": 2000
}
}'

The config_overrides object merges with the application’s base config at runtime, allowing workspace-specific tuning without duplicating the application.

Remove from a Workspace

Terminal window
curl -X DELETE https://api.memorylayer.ai/v1/applications/app_a1b2c3d4e5f6g7h8/workspaces/ws-production \
-H "Authorization: Bearer $ML_API_KEY"

List Applications in a Workspace

Terminal window
curl https://api.memorylayer.ai/v1/workspaces/ws-production/applications \
-H "Authorization: Bearer $ML_API_KEY"

Multi-Workspace Patterns

Shared application, per-workspace config — Create one application and associate it with multiple workspaces using different config_overrides for each. This keeps the application definition DRY while allowing environment-specific behavior (e.g., lower limits in staging, higher in production).

Disable per workspace — Set enabled: false in the workspace association to temporarily remove an application from a workspace without deleting the association:

Terminal window
curl -X POST https://api.memorylayer.ai/v1/applications/app_a1b2c3d4e5f6g7h8/workspaces/ws-staging \
-H "Authorization: Bearer $ML_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled": false}'