From d4e58bc1052e18f2be895f55946f322260917fee Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Mon, 30 Mar 2026 17:10:19 -0300 Subject: [PATCH] atlasbot: wire comms runtime env for quick smart genius --- services/comms/atlasbot-deployment.yaml | 39 +++++++++++++++++++---- services/comms/scripts/comms_vault_env.sh | 14 ++++++++ 2 files changed, 47 insertions(+), 6 deletions(-) diff --git a/services/comms/atlasbot-deployment.yaml b/services/comms/atlasbot-deployment.yaml index b65aef08..d784e785 100644 --- a/services/comms/atlasbot-deployment.yaml +++ b/services/comms/atlasbot-deployment.yaml @@ -16,7 +16,7 @@ spec: labels: app: atlasbot annotations: - checksum/atlasbot-configmap: manual-atlasbot-101 + checksum/atlasbot-configmap: manual-atlasbot-102 vault.hashicorp.com/agent-inject: "true" vault.hashicorp.com/role: "comms" vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret" @@ -28,6 +28,15 @@ spec: vault.hashicorp.com/agent-inject-secret-bot-pass: "kv/data/atlas/comms/atlasbot-credentials-runtime" vault.hashicorp.com/agent-inject-template-bot-pass: | {{- with secret "kv/data/atlas/comms/atlasbot-credentials-runtime" -}}{{ index .Data.data "bot-password" }}{{- end -}} + vault.hashicorp.com/agent-inject-secret-bot-quick-pass: "kv/data/atlas/comms/atlasbot-credentials-runtime" + vault.hashicorp.com/agent-inject-template-bot-quick-pass: | + {{- with secret "kv/data/atlas/comms/atlasbot-credentials-runtime" -}}{{ index .Data.data "bot-quick-password" }}{{- end -}} + vault.hashicorp.com/agent-inject-secret-bot-smart-pass: "kv/data/atlas/comms/atlasbot-credentials-runtime" + vault.hashicorp.com/agent-inject-template-bot-smart-pass: | + {{- with secret "kv/data/atlas/comms/atlasbot-credentials-runtime" -}}{{ index .Data.data "bot-smart-password" }}{{- end -}} + vault.hashicorp.com/agent-inject-secret-bot-genius-pass: "kv/data/atlas/comms/atlasbot-credentials-runtime" + vault.hashicorp.com/agent-inject-template-bot-genius-pass: | + {{- with secret "kv/data/atlas/comms/atlasbot-credentials-runtime" -}}{{ index .Data.data "bot-genius-password" }}{{- end -}} vault.hashicorp.com/agent-inject-secret-seeder-pass: "kv/data/atlas/comms/atlasbot-credentials-runtime" vault.hashicorp.com/agent-inject-template-seeder-pass: | {{- with secret "kv/data/atlas/comms/atlasbot-credentials-runtime" -}}{{ index .Data.data "seeder-password" }}{{- end -}} @@ -76,23 +85,41 @@ spec: - name: ARIADNE_STATE_URL value: http://ariadne.maintenance.svc.cluster.local/api/internal/cluster/state - name: BOT_USER - value: atlasbot + value: atlas-smart + - name: BOT_USER_QUICK + value: atlas-quick + - name: BOT_USER_SMART + value: atlas-smart + - name: BOT_USER_GENIUS + value: atlas-genius - name: BOT_MENTIONS - value: atlasbot,aatlasbot,atlas_quick,atlas_smart + value: atlas-quick,atlas-smart,atlas-genius,atlas_quick,atlas_smart,atlas_genius - name: OLLAMA_URL value: http://ollama.ai.svc.cluster.local:11434 - name: OLLAMA_MODEL - value: qwen2.5:14b-instruct + value: qwen2.5:14b-instruct-q4_0 - name: ATLASBOT_MODEL_FAST + value: qwen2.5-coder:7b-instruct-q4_0 + - name: ATLASBOT_MODEL_SMART + value: qwen2.5:14b-instruct-q4_0 + - name: ATLASBOT_MODEL_GENIUS value: qwen2.5:14b-instruct-q4_0 - name: ATLASBOT_MODEL_DEEP - value: qwen2.5:14b-instruct + value: qwen2.5:14b-instruct-q4_0 - name: OLLAMA_FALLBACK_MODEL value: qwen2.5:14b-instruct-q4_0 - name: OLLAMA_TIMEOUT_SEC value: "600" + - name: ATLASBOT_QUICK_TIME_BUDGET_SEC + value: "15" + - name: ATLASBOT_SMART_TIME_BUDGET_SEC + value: "45" + - name: ATLASBOT_GENIUS_TIME_BUDGET_SEC + value: "180" + - name: ATLASBOT_OLLAMA_RETRIES + value: "0" - name: ATLASBOT_THINKING_INTERVAL_SEC - value: "120" + value: "30" - name: ATLASBOT_SNAPSHOT_TTL_SEC value: "30" - name: ATLASBOT_HTTP_PORT diff --git a/services/comms/scripts/comms_vault_env.sh b/services/comms/scripts/comms_vault_env.sh index 72319bce..9e04e038 100644 --- a/services/comms/scripts/comms_vault_env.sh +++ b/services/comms/scripts/comms_vault_env.sh @@ -7,6 +7,14 @@ read_secret() { tr -d '\r\n' < "${vault_dir}/$1" } +read_optional() { + if [ -f "${vault_dir}/$1" ]; then + tr -d '\r\n' < "${vault_dir}/$1" + else + printf '' + fi +} + export TURN_STATIC_AUTH_SECRET="$(read_secret turn-secret)" export TURN_PASSWORD="${TURN_STATIC_AUTH_SECRET}" @@ -14,6 +22,12 @@ export LIVEKIT_API_SECRET="$(read_secret livekit-primary)" export LIVEKIT_SECRET="${LIVEKIT_API_SECRET}" export BOT_PASS="$(read_secret bot-pass)" +export BOT_PASS_QUICK="$(read_optional bot-quick-pass)" +export BOT_PASS_SMART="$(read_optional bot-smart-pass)" +export BOT_PASS_GENIUS="$(read_optional bot-genius-pass)" +if [ -z "${BOT_PASS_QUICK}" ]; then BOT_PASS_QUICK="${BOT_PASS}"; fi +if [ -z "${BOT_PASS_SMART}" ]; then BOT_PASS_SMART="${BOT_PASS}"; fi +if [ -z "${BOT_PASS_GENIUS}" ]; then BOT_PASS_GENIUS="${BOT_PASS_SMART}"; fi export SEEDER_PASS="$(read_secret seeder-pass)" export CHAT_API_KEY="$(read_secret chat-matrix)"