Skip to content

Administration Overview

MemoryLayer Enterprise adds an administration API for managing platform users, applications, and cross-workspace resources, and uses Aether for API tokens, authentication, and authorization. All admin operations are REST endpoints under /v1/. The admin dashboard provides a web UI on top of them.

The core server ships with open authentication and authorization by default (any caller is treated as a privileged local user), which suits local development and single-user self-hosting. The /v1/users, /v1/applications, and /v1/admin/* endpoints described here exist only in Enterprise.

Authentication

Enterprise defaults to Aether authentication (MEMORYLAYER_AUTHENTICATION_SERVICE=aether). Clients send an API key to the Aether auth proxy that fronts MemoryLayer:

Authorization: Bearer <your-api-key>

The proxy validates the key and forwards the verified identity to MemoryLayer as trusted X-Auth-* headers (tenant, user, API key ID, principal type, scopes, and workspace access level). Requests that reach MemoryLayer without a tenant header are rejected with 401. API keys are issued through the token endpoints.

Set MEMORYLAYER_REQUIRE_SECURE_AUTH=1 in production so the server refuses to start if authentication or authorization has been overridden back to the open default services.

Tenant and Workspace Isolation

MemoryLayer Enterprise uses a two-level isolation model:

  • Tenant — The top-level organizational boundary. Users and applications belong to a tenant, and requests are scoped to the tenant identified by the auth proxy.
  • Workspace — A logical grouping within a tenant for memories, sessions, documents, and datasets. In Enterprise, workspaces are never created implicitly; create them with POST /v1/workspaces.

API keys can be scoped to specific workspaces using wildcard patterns (e.g., project-* matches project-alpha and project-beta).

Authorization

Every request is checked against a resource (memories, documents, datasets, users, applications, admin, …), an action (read, write, delete), and, where applicable, the target workspace. With Aether authorization, the caller’s numeric workspace access level must meet the level required for that resource and action:

LevelNameGrants
10READRead and list (any resource’s read action)
20READWRITECreate and update memories, sessions, documents, and datasets
30MANAGEDeletes, and writes to resources without an explicit rule (for example users, applications, collections)
40ADMINAll admin actions, including /v1/admin/*, /v1/tiering/*, and /v1/tokens
50SUPERADMINReserved for system-level operations

Administration Areas

AreaEndpoint PrefixDescription
User Management/v1/usersCreate, list, update, and delete platform users
Application Management/v1/applicationsRegister applications, bind them to workspaces, and attach skills, MCP servers, and tools
API Keys/v1/tokensCreate and manage API tokens with workspace scoping (stored in Aether)
Admin Dashboard/v1/adminWeb dashboard, cross-workspace statistics, resource listings, and maintenance actions

Common Response Patterns

List endpoints accept limit and offset. Error responses use a standard format:

{
"detail": "Description of the error"
}

Standard HTTP status codes are used throughout:

CodeMeaning
200Success
201Resource created
202Accepted (background work enqueued)
204Success, no content (delete operations)
400Invalid request
401Authentication failed
403Authorization denied
404Resource not found
500Internal server error
502 / 503 / 504Aether error, unavailable, or timeout (token endpoints)

Audit Trail

Create, update, and delete operations on users, applications, collections, and other enterprise resources, as well as admin reads, are recorded in the PostgreSQL audit log (MEMORYLAYER_AUDIT_SERVICE=postgresql). Audit events capture the tenant, workspace, acting user, resource type, resource ID, and action. The dashboard’s Audit Log page browses these events.

Quick Start

  1. Obtain an admin-level API key from an existing administrator or your Aether deployment.
  2. Set the key in your environment: export ML_API_KEY="your-api-key".
  3. Verify access by calling the admin stats endpoint.
  4. Create users and applications as needed.
  5. Issue scoped API keys for your applications and CI pipelines.