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:
| Level | Name | Grants |
|---|---|---|
| 10 | READ | Read and list (any resource’s read action) |
| 20 | READWRITE | Create and update memories, sessions, documents, and datasets |
| 30 | MANAGE | Deletes, and writes to resources without an explicit rule (for example users, applications, collections) |
| 40 | ADMIN | All admin actions, including /v1/admin/*, /v1/tiering/*, and /v1/tokens |
| 50 | SUPERADMIN | Reserved for system-level operations |
Administration Areas
| Area | Endpoint Prefix | Description |
|---|---|---|
| User Management | /v1/users | Create, list, update, and delete platform users |
| Application Management | /v1/applications | Register applications, bind them to workspaces, and attach skills, MCP servers, and tools |
| API Keys | /v1/tokens | Create and manage API tokens with workspace scoping (stored in Aether) |
| Admin Dashboard | /v1/admin | Web 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:
| Code | Meaning |
|---|---|
200 | Success |
201 | Resource created |
202 | Accepted (background work enqueued) |
204 | Success, no content (delete operations) |
400 | Invalid request |
401 | Authentication failed |
403 | Authorization denied |
404 | Resource not found |
500 | Internal server error |
502 / 503 / 504 | Aether 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
- Obtain an admin-level API key from an existing administrator or your Aether deployment.
- Set the key in your environment:
export ML_API_KEY="your-api-key". - Verify access by calling the admin stats endpoint.
- Create users and applications as needed.
- Issue scoped API keys for your applications and CI pipelines.