Configure workspace service groups
Give a workspace a service group (the session-api and memory-api that its agents use to persist conversations and cross-session memory) and point agents at it.
An AgentRuntime selects a group by name with spec.serviceGroup (default default). The group’s endpoints come from the workspace’s status.services[].
Prerequisites
Section titled “Prerequisites”- A workspace. Managed services deploy into the workspace namespace.
- A reachable PostgreSQL instance with one database for session data and one for memory. Both can live on the same server.
Provision a managed service group
Section titled “Provision a managed service group”In managed mode (the default) the operator deploys session-api and memory-api for you.
-
Create the database Secrets in the workspace namespace. Each Secret has one key,
POSTGRES_CONN, holding a PostgreSQL connection string.Terminal window kubectl create secret generic customer-support-session-db \-n omnia-customer-support \--from-literal=POSTGRES_CONN='postgres://USER:PASSWORD@HOST:5432/sessions?sslmode=require'kubectl create secret generic customer-support-memory-db \-n omnia-customer-support \--from-literal=POSTGRES_CONN='postgres://USER:PASSWORD@HOST:5432/memory?sslmode=require'In production, create these Secrets from your secret manager (External Secrets, CSI driver) instead of from the command line.
-
Add the group to the
spec.serviceslist of your existing workspace:Terminal window kubectl edit workspace customer-supportspec:services:- name: default # AgentRuntimes reference this in spec.serviceGroupmode: managedsession:database:secretRef:name: customer-support-session-dbmemory:database:secretRef:name: customer-support-memory-dbproviderRef:name: memory-embedding # an embedding-role Provider in the namespaceA managed group must configure at least one of
sessionandmemory. The operator provisions only the services you configure. Memory requires an embedding Provider: amemoryblock withoutproviderRefprovisions no memory-api (see troubleshooting).
For each managed group, the operator creates in the workspace namespace:
- a session-api Deployment and Service named
session-<workspace>-<group>, on port 8080; - a memory-api Deployment and Service named
memory-<workspace>-<group>, on port 8080; - the ServiceAccounts and RoleBindings those pods need, including access to the database Secret.
Point agents at the group
Section titled “Point agents at the group”Set spec.serviceGroup on the AgentRuntime to a spec.services[].name. Omit it to use default.
apiVersion: omnia.altairalabs.ai/v1alpha1kind: AgentRuntimemetadata: name: support-bot namespace: omnia-customer-supportspec: serviceGroup: default # ...Use external services
Section titled “Use external services”Set mode: external to point a group at a session-api and memory-api that you run elsewhere. The operator creates no Deployments and publishes the URLs you supply:
spec: services: - name: default mode: external external: sessionURL: https://session.internal.example.com memoryURL: https://memory.internal.example.commemoryURL is required. sessionURL is optional. Both must start with http:// or https://. The operator does not health-check the endpoints, so an external group is ready as soon as you apply it.
Key the external services
Section titled “Key the external services”Each workspace pseudonymises users under its own key, which the operator derives from the install key and writes to the omnia-workspace-pseudonym-key Secret (data key) in the workspace namespace. An external session-api or memory-api serves exactly one workspace:
- Run it with that workspace’s key as
OMNIA_PSEUDONYM_HMAC_KEY. Agents, the operator and management-api state that workspace’s key fingerprint on every call. A service bound to another key refuses those calls with409 pseudonym_key_mismatch, so you cannot point a Workspace at another workspace’s session-api or memory-api. - One external session-api cannot serve several workspaces. Run one per workspace. Several of them, and the operator’s managed ones, may share a database: each binds its own namespace.
- Set
OMNIA_NAMESPACEon an external session-api to the workspace’s namespace. It binds its key under that namespace. Without it, the session-api binds under the namespace its pod runs in, or underdefaultoutside a cluster. Two session-apis that bind under the same namespace on one database collide: the second is refused at startup. - An external memory-api binds its key under the Workspace UID it resolves from
--workspace. Every workspace on one memory database must use the same embedding model, which the database records once.
Run a group without session-api
Section titled “Run a group without session-api”Omit sessionURL to run the group with no session-api:
spec: services: - name: default mode: external external: memoryURL: https://memory.internal.example.comAgents in the group start normally and write no sessions, messages, token usage or cost. The facade does not contact a session-api. The dashboard views that read session data (sessions, cost, provider calls, eval results) report “Session API not configured” for the workspace.
Add the per-workspace privacy service (Enterprise)
Section titled “Add the per-workspace privacy service (Enterprise)”Set spec.privacy to deploy a per-workspace privacy-api (consent, opt-out, the compliance audit hub and DSAR erasure). It needs its own database Secret with a POSTGRES_CONN key.
spec: privacy: database: secretRef: name: customer-support-privacy-dbprivacy-api serves its routes only when Enterprise is enabled on the install. Without a licence it runs in dev mode with every feature on. See Configure privacy policies and Manage user consent.
Verify
Section titled “Verify”-
Check that the Deployments have a ready replica:
Terminal window kubectl get deploy -n omnia-customer-supportYou see
session-customer-support-defaultandmemory-customer-support-default. -
Read the group status:
Terminal window kubectl get workspace customer-support -o jsonpath='{.status.services}'The
defaultentry hasready: true. ItssessionURLandmemoryURLhave the formhttp://<deployment>.<namespace>:8080.
A managed group is ready when every service it configures has a ready replica. The workspace condition ServicesReady is True when every group is ready.
Troubleshooting
Section titled “Troubleshooting”The workspace phase is Degraded
Section titled “The workspace phase is Degraded”ServicesReady is False. Its message names the group and the first failing condition:
kubectl describe workspace customer-supportIf a Deployment never becomes ready, read the session-api or memory-api pod logs. A wrong host, a missing database or failed authentication in POSTGRES_CONN stops the pod from starting.
The group is not ready because of a Provider
Section titled “The group is not ready because of a Provider”A group whose memory.providerRef or memory.gate.providerRef does not resolve to a valid Provider provisions no memory-api, and the group reports not ready. The group’s EmbeddingProviderReady or GateProviderReady condition gives the reason. The session-api keeps running.
A group that configures memory without memory.providerRef is treated the same way: EmbeddingProviderReady is False with reason ProviderNotConfigured, and no memory-api serves the group. Memory has no mode without embeddings. Set memory.providerRef to an embedding-role Provider to bring memory-api back. The operator deletes the group’s memory-api Deployment and Service. Its memories stay in the database, and memory-api returns on the same store once the Provider is set. A DSAR erasure in the workspace fails with memory held back for group <name> until then, since nothing can reach those memories.
An agent records nothing
Section titled “An agent records nothing”Read the facade and runtime logs for session store fallback or session-api URL resolution failed. The log names the service group and the reason. Check that the name in spec.serviceGroup appears in status.services[].
Related pages
Section titled “Related pages”- Workspace reference lists every
services[]field, includingredis,privacyPolicyRef,autoscaling,podOverridesandmemory.providerRef. - Manage workspaces covers namespace, RBAC and access control.
- Isolate workspace content covers shared storage.