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
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | Application ID; generated (prefixed app_) when omitted |
name | string | Yes | Application name (must not be empty) |
description | string | No | Human-readable description |
app_type | string | No | Free-form type label, conventionally generic, chat, agent, or tool (default: generic) |
enabled | boolean | No | Whether the application is active (default: true) |
config | object | No | Application-level configuration |
metadata | object | No | Arbitrary key-value metadata |
default_skill_names | string[] | No | Skills attached by default in every bound workspace |
default_mcp_server_names | string[] | No | MCP servers attached by default |
default_tool_names | string[] | No | Tool 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
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
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
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.
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
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
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.
| Field | Default | Description |
|---|---|---|
enabled | true | Whether 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_mode | merge | merge combines bound skills with the application defaults; replace uses only the bound skills |
mcp_override_mode | merge | Same, for MCP servers |
tool_override_mode | merge | Same, for tool names |
Remove from a Workspace
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
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:
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
| Method | Path | Description |
|---|---|---|
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}/skills | List 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-servers | List bound MCP server IDs |
PUT | /v1/workspaces/{workspace_id}/applications/{app_id}/tools | Replace 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:
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}'