Aether Transport
MemoryLayer can run as a standalone HTTP service or behind Aether, a service-mesh transport that provides mTLS-secured connectivity, identity-aware request routing, on-behalf-of (OBO) delegation, and cross-datacenter orchestration. Aether is completely optional — everything in memorylayer-server works over plain HTTP without it — but turning it on collapses a lot of authentication, secret-management, and multi-DC plumbing into a single layer that the application code does not have to reason about.
Aether is a separate product. See aetherlayer.ai for the full overview, deployment guides, and operator documentation.
Why You Might Want It
Without Aether, running MemoryLayer at scale means assembling these pieces yourself:
- TLS termination and certificate rotation between every pair of services that talk to each other
- An identity provider that issues JWTs or OIDC tokens, plus the verification logic on every server
- An on-behalf-of (OBO) mechanism so an application can call MemoryLayer as a specific end user without sharing the user’s credentials
- A secret-distribution channel for API keys, OAuth refresh tokens, and DB credentials across machines / datacenters
- A way to colocate GPU-hungry services (embeddings, OCR) in one DC while keeping the API surface in another
- A durable task queue + scheduler so long-running, retryable work (ingestion, enrichment, decay, summarization) survives process restarts
- A fine-grained agent permission model so the same
act_as/on_behalf_oftoken only grants the scopes the user actually authorized
With Aether, the transport layer carries all of that:
| Concern | Aether brings |
|---|---|
| mTLS everywhere | Each service holds its own short-lived certificate; the sidecar negotiates the channel |
| Authenticated identity | X-Aether-Subject-* headers are signed by the mesh and trusted by the server |
| OBO delegation | X-Aether-Grant-ID + X-Aether-Authority-Mode let an upstream agent service call MemoryLayer as an end user with audit trail |
| Service discovery | Services register as sv::memorylayer::default, sv::memorylayer-embed::default, etc.; callers target the topic, not an IP |
| Cross-DC routing | GPU embed peers can live anywhere on the mesh; the core server reaches them with the same call shape it uses locally |
| Token issuance | /v1/tokens proxies to the Aether gRPC token service so issuance / revocation are platform-managed |
| Durable task execution + scheduling | Aether provides a durable task queue and scheduler that the rest of the platform (MemoryLayer included) plugs into for retryable, restart-safe work — ingestion jobs, enrichment passes, decay sweeps, RPG sync follow-ups, etc. |
| Agent permissions | Mesh-issued grants carry scoped permissions that downstream services consume directly, so “what is this agent allowed to do on this user’s behalf” is one verifiable decision, not a per-service ACL audit |
If you only ever run one MemoryLayer process on localhost, none of this matters and plain HTTP is the right call. If you are deploying across hosts, datacenters, or stitching MemoryLayer into a larger agent platform, Aether dramatically shrinks the surface you have to operate.
Distributed Agent Systems
Aether is designed for the multi-agent case from the ground up: each agent (planner, coder, reviewer, retriever, …) runs as a separately-deployable service that registers a topic, holds a mesh certificate, and is reachable by every other agent in the system through the same proxy_http_async / proxy_grpc_async primitives. That gives you:
- Inter-agent calls without bespoke RPC plumbing — one agent invoking another looks the same as one agent calling MemoryLayer.
- OBO across hops — a user’s grant flows from the top-level agent down through every agent it delegates to, with each hop verifiable.
- Coordinated durable work — the task scheduler lets a fan-out / fan-in workflow span agents and survive any single agent restarting.
- Pluggable agent placement — run light agents on a small box, GPU-bound agents on a beefier one, and the wire shape never changes.
MemoryLayer is what makes those agents share memory. Once every agent in the system reaches MemoryLayer over Aether using the same OBO grant chain, you get a single coherent, identity-aware memory store across the whole agent fleet — recall in agent B sees what agent A remembered, scoped to the right user, without any of the individual agents having to think about identity, transport, or persistence. That combination — Aether for orchestration + identity, MemoryLayer for shared distributed memory — is the most powerful way to run multi-agent systems we are aware of, and is the primary deployment pattern we recommend for production agent platforms.
How MemoryLayer Uses Aether
MemoryLayer integrates with Aether at four points; any subset of them can be enabled independently.
1. REST-over-Aether front door
When an AetherServiceConnection is present at startup, the FastAPI app attaches itself to the connection and serves the same REST surface (/v1/memories, /v1/sessions, etc.) over Aether’s ProxyHttpRequest envelopes. Clients that already speak Aether reach the server through sv::memorylayer::default instead of opening a TCP socket.
This is additive: the plain-HTTP front door on MEMORYLAYER_SERVER_PORT continues to work for local development and direct curl access.
2. Aether-aware authentication
Setting MEMORYLAYER_AUTHENTICATION_SERVICE=aether swaps in AetherAuthenticationService, which reads the mesh-signed identity headers:
| Header | Meaning |
|---|---|
X-Aether-Subject-Type | Caller principal type (User, Application, etc.) |
X-Aether-Subject-ID | Caller principal ID |
X-Aether-Grant-ID | OBO grant token (when an upstream service is delegating) |
X-Aether-Authority-Mode | OBO authority mode (e.g. act_as, on_behalf_of) |
Because the headers are mesh-signed, the server does not need its own JWT verifier or IdP integration. The core server’s default authentication service (open auth) remains the option for local development.
3. Embed-server transport switch
The core server’s connection to memorylayer-embed-server has two transports:
# Default: plain HTTPexport MEMORYLAYER_EMBED_TRANSPORT=httpexport MEMORYLAYER_EMBED_SERVER_URL=http://embed-host:61051
# Aether meshexport MEMORYLAYER_EMBED_TRANSPORT=aetherexport MEMORYLAYER_EMBED_AETHER_TARGET=sv::memorylayer-embed::defaultIn aether mode, the core server issues proxy_http_async calls through the shared AetherServiceConnection against the configured topic. This is what enables cross-DC GPU placement under mTLS — the embed peer can be anywhere on the mesh that publishes sv::memorylayer-embed::*, and the application code does not change.
See Embed Server for the embed-side configuration.
4. Token issuance via Aether gRPC
The core server’s /v1/tokens endpoints proxy create / list / revoke calls to the Aether token gRPC service; the core server does not issue tokens locally. The routes are always mounted, but without a configured Aether connection they return 503 Service Unavailable.
Configuration Reference
| Variable | Default | Description |
|---|---|---|
MEMORYLAYER_AETHER_SERVICE_CONNECTION | aether-service | Aether service-connection provider. The Aether client library is a core dependency, so the provider is always loaded, but it stays inactive unless at least one AETHER_* variable below is set. |
AETHER_GATEWAY_ADDR | localhost:50051 | Aether gateway gRPC address. |
AETHER_API_KEY / AETHER_API_KEY_FILE | — | API key (or a file containing it) for Aether operations. Required once Aether is configured, unless AETHER_AUTH=none. |
AETHER_AUTH | — | Set to none for local development to skip the API key requirement. |
AETHER_SERVICE_SPECIFIER | hostname | Service specifier, typically the node or host name. |
AETHER_TLS_ENABLED, AETHER_TLS_CA_CERT, AETHER_TLS_CLIENT_CERT, AETHER_TLS_CLIENT_KEY | — | TLS settings for the gateway connection. |
AETHER_WORKSPACE | _system | Default Aether workspace for outbound messages and KV scoping. |
AETHER_TASKS_ENABLED | true | Route background tasks through Aether’s durable scheduler when connected. |
MEMORYLAYER_AETHER_REST_FRONT_DOOR | in_process | How the REST surface is exposed over Aether: in_process (in-process terminator), disabled, or sidecar. |
MEMORYLAYER_AETHER_TERMINATOR_OBO_POLICY | require_resolver | OBO policy for the in-process terminator: require_resolver rejects unvalidated on-behalf-of requests; allow_partial lets them through with wire-derived headers only. |
MEMORYLAYER_AETHER_TERMINATOR_HEADER_MODE | strict | Header handling for the in-process terminator: strict or passthrough. |
MEMORYLAYER_AUTHENTICATION_SERVICE | default | Set to aether to use the mesh-signed identity headers for authentication. The default is open auth, suited to local development. |
MEMORYLAYER_EMBED_TRANSPORT | http | http for direct calls to the embed peer; aether to route through the mesh. |
MEMORYLAYER_EMBED_AETHER_TARGET | sv::memorylayer-embed::default | Aether service topic to target when EMBED_TRANSPORT=aether. |
MEMORYLAYER_EMBED_SERVER_URL | http://localhost:61051 | Used only when EMBED_TRANSPORT=http. |
The Aether Python client (scitrera-aether-client) is installed with memorylayer-server. When no AETHER_* variable is set, the server logs that Aether is not configured and runs standalone: the REST-over-Aether front door, the gRPC token API, and the task back-channel stay inactive, and there is no credential warning. As soon as any AETHER_* variable is set, the server treats Aether as intended and fails fast on missing credentials. The same build therefore runs with or without Aether, controlled only by environment variables.
Deployment Topology
┌────────────────────────────────────────────────────────────────────────┐│ Aether mesh ││ ││ ┌──────────────────┐ ┌──────────────────────┐ ││ │ memorylayer │ │ memorylayer-embed │ ││ │ -server │ ──────► │ -server (GPU peer) │ ││ │ sv::memorylayer │ proxy_ │ sv::memorylayer- │ ││ │ ::default │ http_ │ embed::default │ ││ └──────────────────┘ async └──────────────────────┘ ││ ▲ ││ │ ProxyHttpRequest envelopes (REST-over-Aether) ││ │ ││ ┌──────────────────┐ ┌──────────────────────┐ ││ │ Agent / SDK │ │ Aether gRPC token / │ ││ │ client │ │ identity service │ ││ └──────────────────┘ └──────────────────────┘ ││ │└────────────────────────────────────────────────────────────────────────┘Each box is a separately-deployed process; they all hold short-lived mesh certificates and reach each other through service topics rather than IPs. The same memorylayer-server binary that runs without Aether on a developer’s laptop runs inside this topology unchanged — only environment variables change.
The official memorylayer-embed-server Docker image runs the Aether proxy-sidecar as PID 1 in supervisor mode by default; the embed FastAPI on 127.0.0.1:61051 has no Aether knowledge of its own. Set EMBED_SERVER_RUN_SIDECAR=false to run the embed server as plain HTTP for local development.
When Not to Use Aether
Aether is a serious operational commitment. Skip it when:
- You are running a single-machine local development setup
- You don’t need cross-datacenter routing or OBO delegation
- You are happy managing your own API keys (or running the core server with open auth) and exposing the HTTP port directly
- You don’t have an existing Aether deployment to plug into
Plain HTTP + MEMORYLAYER_EMBEDDING_PROVIDER=openai / google / a local embed peer covers most self-hosted production deployments without the mesh.
Related Pages
- aetherlayer.ai — Aether product site (architecture, deployment, operator docs)
- Embed Server — how the embed peer integrates with Aether transport
- Server Configuration — complete env-var reference
- Architecture — where Aether fits in the system diagram