diff --git a/charts/agent-controller/charts/agent-orchestrator/templates/deployment.yaml b/charts/agent-controller/charts/agent-orchestrator/templates/deployment.yaml index b2837fce..e4dcf7de 100644 --- a/charts/agent-controller/charts/agent-orchestrator/templates/deployment.yaml +++ b/charts/agent-controller/charts/agent-orchestrator/templates/deployment.yaml @@ -67,6 +67,17 @@ spec: - name: AGENT_CALLER_TOOL_TOP_K value: {{ .Values.config.callerToolTopK | quote }} {{- end }} + {{- if .Values.config.agentEngine }} + # Which agent loop runs a turn (docs/adr/0036). Unset or + # "langgraph" keeps the in-process graph; "temporal" forwards to + # the temporal-engine subchart, which must also be enabled. + - name: AGENT_ENGINE + value: {{ .Values.config.agentEngine | quote }} + {{- end }} + {{- if .Values.config.temporalEngineUrl }} + - name: AGENT_TEMPORAL_ENGINE_URL + value: {{ .Values.config.temporalEngineUrl | quote }} + {{- end }} {{- if .Values.config.callerToolTtlSeconds }} - name: AGENT_CALLER_TOOL_TTL_SECONDS value: {{ .Values.config.callerToolTtlSeconds | quote }} diff --git a/charts/agent-controller/charts/agent-orchestrator/values.yaml b/charts/agent-controller/charts/agent-orchestrator/values.yaml index 1475fa77..b8b25d54 100644 --- a/charts/agent-controller/charts/agent-orchestrator/values.yaml +++ b/charts/agent-controller/charts/agent-orchestrator/values.yaml @@ -58,6 +58,20 @@ config: callerToolTopK: "" callerToolTtlSeconds: "" callerToolPruneIntervalSeconds: "" + # Which agent loop runs a turn (docs/adr/0036). Empty or "langgraph" keeps + # the in-process graph, which is the default and the behaviour this app has + # always had. "temporal" forwards each turn to the temporal-engine subchart + # instead — which must also be enabled, and which needs a reachable Temporal + # cluster. + # + # Process-wide rather than per-request: the two engines keep conversation + # state in different places (a Redis session record vs. workflow state), so + # alternating between them mid-conversation would lose whichever one it left. + agentEngine: "" + # Base URL of the temporal-engine gateway Service. Required when + # agentEngine is "temporal"; the app refuses to start without it rather + # than silently falling back to the other engine. + temporalEngineUrl: "" # Base URL Job pods use to reach the callback receiver. Leave empty to # default to the in-cluster callback Service DNS name (ADR 0006). callbackBaseUrl: "" diff --git a/charts/agent-controller/values.yaml b/charts/agent-controller/values.yaml index 7607b59b..a7982018 100644 --- a/charts/agent-controller/values.yaml +++ b/charts/agent-controller/values.yaml @@ -19,6 +19,21 @@ agent-orchestrator: # openwebui.openaiBaseApiUrl below and the in-cluster callback URL both # depend on `agent-orchestrator-invoke` / `agent-orchestrator-callback`. fullnameOverride: agent-orchestrator + config: + # Route turns to the Temporal engine (docs/adr/0036). + # + # BOTH halves are required and neither does anything alone: the + # `temporal-engine` subchart below deploys the worker and gateway, and this + # tells the orchestrator to use them. Setting only one is a no-op in either + # direction — which is deliberate, so the engine can be deployed and watched + # before any turn depends on it. + agentEngine: temporal + # NOTE: this Service name is `-temporal-engine-gateway`, so it is + # coupled to the release being named `agent-controller`. The + # agent-orchestrator subchart avoids that with `fullnameOverride` (see + # above) for exactly this reason; temporal-engine should get the same + # treatment as a follow-up, at which point this becomes a stable name. + temporalEngineUrl: http://agent-controller-temporal-engine-gateway:8080 # Common overrides live under here, e.g.: # image: { tag: latest } # qdrant: { enabled: true } @@ -40,10 +55,11 @@ core-controller: # --------------------------------------------------------------------------- # The Temporal-workflow agent engine (charts/temporal-engine, docs/adr/0036). # -# OFF by default, and enabling it is TWO steps on purpose: +# ON as of docs/adr/0036's rollout. Enabling is TWO independent steps, and +# this is the first: # 1. temporal-engine.enabled=true -- deploy worker + gateway # 2. agent-orchestrator.config.agentEngine=temporal -# -- route turns to it +# -- route turns to it (above) # # Step 1 alone changes no behaviour, which is what makes the rollout # reversible: the engine can be deployed, watched, and rolled back before any @@ -51,10 +67,15 @@ core-controller: # /invoke, identity, RBAC, credentials, both launchers) stays in # agent-orchestrator either way. # +# TO ROLL BACK: clear agent-orchestrator.config.agentEngine above. That alone +# returns every turn to the in-process LangGraph loop; leaving this subchart +# enabled costs two idle pods and nothing else. Rolling back the subchart too +# is the slower, optional second step. +# # Assumes a reachable Temporal cluster; no server is bundled. # --------------------------------------------------------------------------- temporal-engine: - enabled: false + enabled: true # Common overrides live under here, e.g.: # temporal: { address: temporal-frontend.temporal.svc:7233 } # qdrant: { host: agent-controller-qdrant, collectionPrefix: te- }