Deployment Architecture
Questions this doc answers
- Which
RM_DEPLOYMENT_MODEshould I choose? - How does Reflect Memory enforce private network boundaries and model egress policies?
- What guardrails exist for allowed model hosts, webhooks, and SSO in self-hosted deployments?
Deployment modes table
| Mode | Ownership | Network boundary | Model egress | Public webhooks | Typical guardrails |
|---|---|---|---|---|---|
| hosted | Reflect Memory cloud | public | optional | allowed | Standard rate limits, telemetry, SOC 2 API |
| isolated-hosted | Dedicated runtime/DB per tenant | managed/public | configurable | restricted (per tenant) | Same infra plus tenant-level logging |
| self-host | Your VPC/air-gapped network | private | disabled by default | blocked | RM_ALLOWED_MODEL_HOSTS, RM_REQUIRE_INTERNAL_MODEL_BASE_URL, RM_DISABLE_MODEL_EGRESS |
Resolve deployment config
resolveDeploymentConfig() centralizes the runtime flags:
RM_DEPLOYMENT_MODE→"hosted" | "isolated-hosted" | "self-host"(defaulthosted)RM_DISABLE_MODEL_EGRESS→ favorstrueinself-hostRM_REQUIRE_INTERNAL_MODEL_BASE_URL→ ensures internal models are reachableRM_ALLOWED_MODEL_HOSTS→ comma-delimited whitelist enforced viaenforceModelHostPolicyRM_ALLOW_PUBLIC_WEBHOOKS→ defaults tofalsein air-gapped modeRM_SSO_*→ toggles OIDC authentication; missingJWKS,ISSUER, orAUDIENCE✅ fails startup
Validation is strict: self-host mode with requireInternalModelBaseUrl requires a non-empty allowedModelHosts. SSO enables per-tenant JWKS validation and email claim resolution for user lookups.
Network boundary enforcement
Every deployment config exposes networkBoundary ("public" vs "private"). Self-host defaults to "private". In addition:
requireInternalModelBaseUrlforces every external LLM call to be proxied through your internal gateway.allowedModelHostsensures only approved models (e.g.,llama.local,ollama.company,vicuna.private) can be reached.disableModelEgressdefaults to true forself-host, preventing outbound connections unless explicitly lifted.
Pilot & upgrade flow
- Scope call → determine
mode, SSO/JWKS,allowedModelHosts, compliance requirements. - Deploy pilot container/Helm chart with
RM_TENANT_ID,RM_SSO_*,RM_ALLOWED_MODEL_HOSTS,RM_AGENT_KEY_*. - Connect AI tools via MCP (agent keys) or REST (API key).
- After pilot, flip
RM_REQUIRE_INTERNAL_MODEL_BASE_URL/RM_DISABLE_MODEL_EGRESStoggles as needed, then monitor audit trail + usage events for compliance.