Skip to content

Application Management

Applications represent the software systems that interact with MemoryLayer. Each application belongs to a tenant, can be bound to one or more workspaces with per-workspace overrides, and can declare default skills, MCP servers, and tools. A workspace binding resolves those defaults into the application’s capability bundle for that workspace.

Reads require applications:read; creates, updates, and bindings require applications:write; deletes require applications:delete. The examples use $MEMORYLAYER_URL for your deployment’s API endpoint.

Application Fields

FieldTypeRequiredDescription
idstringNoApplication ID; generated (prefixed app_) when omitted
namestringYesApplication name (must not be empty)
descriptionstringNoHuman-readable description
app_typestringNoFree-form type label, conventionally generic, chat, agent, or tool (default: generic)
enabledbooleanNoWhether the application is active (default: true)
configobjectNoApplication-level configuration
metadataobjectNoArbitrary key-value metadata
default_skill_namesstring[]NoSkills attached by default in every bound workspace
default_mcp_server_namesstring[]NoMCP servers attached by default
default_tool_namesstring[]NoTool names attached by default (resolved by plugins at runtime)

Skill, MCP server, and tool names must be 1—64 characters of lowercase letters, digits, and single hyphens, and may not start or end with a hyphen.

Create an Application

Terminal window
curl -X POST "$MEMORYLAYER_URL/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},
"default_skill_names": ["triage-ticket"],
"default_tool_names": ["search-kb"]
}'

Returns 201 Created with the full application object.

List Applications

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

limit defaults to 50 (max 200). Response:

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

Get an Application

Terminal window
curl "$MEMORYLAYER_URL/v1/applications/app_a1b2c3d4e5f6a7b8" \
-H "Authorization: Bearer $ML_API_KEY"

Update an Application

Send only the fields to change. Omitted fields are left unchanged. id cannot be changed.

Terminal window
curl -X PUT "$MEMORYLAYER_URL/v1/applications/app_a1b2c3d4e5f6a7b8" \
-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 "$MEMORYLAYER_URL/v1/applications/app_a1b2c3d4e5f6a7b8" \
-H "Authorization: Bearer $ML_API_KEY"

Returns 204 No Content on success.

Workspace Bindings

An application is made available in a workspace by binding it. Binding again updates the existing binding.

Bind to a Workspace

Terminal window
curl -X POST "$MEMORYLAYER_URL/v1/applications/app_a1b2c3d4e5f6a7b8/workspaces/ws-production" \
-H "Authorization: Bearer $ML_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"config_overrides": {"max_memories_per_session": 2000},
"tool_names": ["search-orders"],
"tool_override_mode": "merge"
}'

Returns 201 Created with the binding.

FieldDefaultDescription
enabledtrueWhether the application is enabled in this workspace
config_overrides{}Workspace-specific configuration overrides, returned with the binding for the application to apply
tool_names—Workspace-level tool names
skill_override_modemergemerge combines bound skills with the application defaults; replace uses only the bound skills
mcp_override_modemergeSame, for MCP servers
tool_override_modemergeSame, for tool names

Remove from a Workspace

Terminal window
curl -X DELETE "$MEMORYLAYER_URL/v1/applications/app_a1b2c3d4e5f6a7b8/workspaces/ws-production" \
-H "Authorization: Bearer $ML_API_KEY"

Returns 204 No Content.

List Applications in a Workspace

Terminal window
curl "$MEMORYLAYER_URL/v1/workspaces/ws-production/applications" \
-H "Authorization: Bearer $ML_API_KEY"

Capability Bundles

Fetch an application together with its workspace binding and, optionally, its resolved capabilities:

Terminal window
curl "$MEMORYLAYER_URL/v1/workspaces/ws-production/applications/app_a1b2c3d4e5f6a7b8?expand=skills,mcp,tools" \
-H "Authorization: Bearer $ML_API_KEY"

The response contains application, workspace_binding, and — for each requested expand key — skills, mcp_servers, and tool_names. In merge mode, skills and MCP servers are resolved against the workspace’s own entries that match the application defaults by name, plus any explicitly bound ones; in replace mode only the bound ones are returned.

Bind Individual Capabilities

MethodPathDescription
POST / DELETE/v1/workspaces/{workspace_id}/applications/{app_id}/skills/{skill_id}Bind or unbind a skill
GET/v1/workspaces/{workspace_id}/applications/{app_id}/skillsList bound skill IDs ({"ids": [...]})
POST / DELETE/v1/workspaces/{workspace_id}/applications/{app_id}/mcp-servers/{mcp_id}Bind or unbind an MCP server
GET/v1/workspaces/{workspace_id}/applications/{app_id}/mcp-serversList bound MCP server IDs
PUT/v1/workspaces/{workspace_id}/applications/{app_id}/toolsReplace the binding’s tool_names ({"tool_names": [...]})

Skills and MCP servers must exist in the workspace before they can be bound.

Multi-Workspace Patterns

Shared application, per-workspace config — Create one application and bind it to multiple workspaces with different config_overrides and capability overrides. This keeps the application definition in one place while allowing environment-specific behavior (for example, lower limits in staging).

Disable per workspace — Bind again with enabled: false to turn an application off in one workspace without deleting the binding:

Terminal window
curl -X POST "$MEMORYLAYER_URL/v1/applications/app_a1b2c3d4e5f6a7b8/workspaces/ws-staging" \
-H "Authorization: Bearer $ML_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled": false}'