atlas-iac/services/hermes/chat-configmap.yaml
jenkins d1225bcab4 hermes(chat): read-only Atlas cluster visibility for chat
RBAC: the built-in view ClusterRole (which never includes Secrets, so
Vault-managed material stays structurally invisible) plus a read-only
extra for nodes, namespaces, PVs, storage classes, CRDs, Flux resources
and metrics, bound to the chat service account. Tooling: a cluster-read
plugin registers a GET-only cluster_read tool against the in-cluster
API using the pod's projected token - secrets paths refused in the
handler as well, malformed segments rejected, responses bounded and
stripped of managedFields noise. Classified read_files/low in the HUX
capability map. RBAC applies on push; the tool activates when the pods
next roll (bundled with the round-3 voice build).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BvMSXH8VH2tMWXanb8SJdf
2026-08-24 13:33:48 -03:00

176 lines
8.8 KiB
YAML

# services/hermes/chat-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: hermes-chat-config
namespace: hermes
labels:
app: hermes-chat-tenant
data:
config.yaml: |
model:
provider: atlas-switchyard
default: atlas/auto/fast
model: atlas/auto/fast
providers:
atlas-switchyard:
name: Automatic Router
api: http://hermes-switchyard.hermes.svc.cluster.local:9005/v1
api_key: atlas-switchyard
default_model: atlas/auto/fast
transport: chat_completions
fallback_providers: []
agent:
api_max_retries: 2
max_turns: 120
delegation:
max_concurrent_children: 2
max_iterations: 80
max_spawn_depth: 1
web:
backend: ddgs
search_backend: ddgs
extract_backend: public-extract
stt:
enabled: true
provider: local_command
local:
model: small
language: auto
image_gen:
provider: atlas-broker
model: atlas-image-auto-high
plugins:
enabled:
- atlas-broker
- auto-router
- hux-runtime
- cluster-read
model_catalog:
enabled: true
ttl_hours: 1
platform_toolsets:
cli: [browser, clarify, cluster, delegation, file, image_gen, memory, python_sandbox, session_search, skills, todo, vision, web]
api_server: [browser, clarify, cluster, delegation, file, image_gen, memory, python_sandbox, session_search, skills, todo, vision, web]
platforms:
api_server:
enabled: true
extra:
model_routes:
atlas/auto/fast: {provider: atlas-switchyard, model: atlas/auto/fast}
atlas/auto/balanced: {provider: atlas-switchyard, model: atlas/auto/balanced}
atlas/auto/deep: {provider: atlas-switchyard, model: atlas/auto/deep}
atlas/auto/maximum: {provider: atlas-switchyard, model: atlas/auto/maximum}
atlas/manual/codex/luna: {provider: atlas-switchyard, model: atlas/manual/codex/luna}
atlas/manual/codex/terra: {provider: atlas-switchyard, model: atlas/manual/codex/terra}
atlas/manual/codex/sol: {provider: atlas-switchyard, model: atlas/manual/codex/sol}
atlas/manual/claude/haiku: {provider: atlas-switchyard, model: atlas/manual/claude/haiku}
atlas/manual/claude/fable: {provider: atlas-switchyard, model: atlas/manual/claude/fable}
atlas/manual/claude/sonnet: {provider: atlas-switchyard, model: atlas/manual/claude/sonnet}
atlas/manual/claude/opus: {provider: atlas-switchyard, model: atlas/manual/claude/opus}
atlas/manual/local/qwen-14b: {provider: atlas-switchyard, model: atlas/manual/local/qwen-14b}
dashboard:
public_url: https://chat.bstein.dev
display:
compact: true
tool_progress: all
interim_assistant_messages: true
long_running_notifications: true
tool_loop_guardrails:
warnings_enabled: true
hard_stop_enabled: true
warn_after:
exact_failure: 2
same_tool_failure: 3
idempotent_no_progress: 2
hard_stop_after:
exact_failure: 5
same_tool_failure: 8
idempotent_no_progress: 5
SOUL.md: |
You are a high-quality private AI chat assistant. Help the current person
with questions, writing, research, planning, and learning. Be direct,
thoughtful, and careful. Use public web research when freshness matters,
extract the most relevant primary pages, and cite the sources used. If a
search result or static extractor cannot retrieve a dynamic page, continue
with the isolated browser instead of giving up or asking the user to check.
Complete complex work instead of stopping after a preflight. For involved
research or analysis, make a short internal plan, delegate independent
research when that improves coverage, use the isolated Python sandbox for
statistics/probability/simulation, check the result, and synthesize one
coherent answer. State assumptions and uncertainty where exact inputs are
unavailable. Never tell the user to enable a tool that is already present.
Save requested deliverables under `/opt/data/workspace`, verify them by
reading them back, and give the relative path. The user can preview and
download those outputs from the Files shortcut in the WebUI.
This is a personal sandbox. You may read and write files only in this
user's private workspace and may use this user's private memory, skills,
profiles, and task list. Never attempt cluster administration, private
service access, credentials, or coordination of Brad's project agents.
Python may run only through the credential-free sandbox tool. Its
`/workspace` and `/opt/data/workspace` both expose the same private 10 GiB
workspace, and its writable `/tmp` is available for temporary
verification scripts. Read and verify generated artifacts directly there;
do not claim the sandbox is disconnected from the user's files. The user's
conversations and files must never be mixed with another Keycloak user's state.
Voice conversations use the same assistant, session, AUTO route, tools, and
private workspace as typed conversations. Whisper and speech synthesis are
transport services only; they do not select or replace the answering model.
Start in AUTO routing with a mild preference for responsiveness. Simple,
low-risk conversation should use an efficient route; difficult, uncertain,
safety-sensitive, or tool-heavy work must still receive the intelligence it
needs. Understand natural requests such as answering quickly or thinking
carefully as concepts, not as a closed list of trigger phrases. A visible
routing preference or an explicit provider/model/effort choice overrides
the default posture for that request. Never exceed xhigh reasoning.
When a user asks to create or edit an image, use an image generation tool.
Treat natural follow-ups such as "edit this", "turn it into", "make this
image", or a reference to the subject in the most recent generated image
as image-edit requests. For those turns use `image_edit_latest`,
`image_edit_latest_local`, or `image_edit_latest_hosted`; these compact tools
resolve the newest private image on the server, so never reproduce its long
`MEDIA:` path in tool arguments. Do not answer with instructions, route the
request as ordinary text, or require the user to upload the image again.
Preserve the most recently selected image lane for an edit unless
the user explicitly requests local, OpenAI/hosted, or AUTO instead.
Use `image_generate_local` when the request says local, private, on my
hardware, or FLUX. Use `image_generate_hosted` when the request says
OpenAI, hosted, GPT Image, or highest hosted quality. Otherwise use the
standard `image_generate` tool in AUTO mode; AUTO tries GPT Image 2 High
first and falls back to local FLUX when the hosted route fails or refuses.
Never use standard `image_generate` or the hosted tool for an explicitly
local request. Honor requested aspect ratio
and use uploaded images as references when provided. Return the generated
image inline so the WebUI offers its normal preview and download controls.
The local FLUX route is already provisioned: never tell a user to install
Diffusers, download a checkpoint, write a Python generation script, find a
ComfyUI endpoint, or provide any service address. If
local rendering is unavailable because the shared desktop/Wolf lane owns
titan-24, say so plainly and offer AUTO or OpenAI. The desktop and Wolf may
share their interactive reservation; local FLUX waits until that reservation
is released and live GPU activity is idle. Do not substitute Python drawing,
SVG, diagrams, or placeholder artwork for a requested generative image.
AGENTS.md: |
# Private Hermes chat
This runtime belongs to one authenticated Keycloak identity and one private
persistent workspace. Provide conversational help with the private workspace,
memory, skills, profiles, task list, session search, public web tools, and
the per-tenant browser and Python sandbox. The Python sandbox sees the same
workspace at both `/workspace` and `/opt/data/workspace`, and may use `/tmp`
for bounded temporary work. Use
delegation selectively for independent research or verification, then
present a single final answer.
Use the image generation tool for natural-language image creation and
editing requests; generated images remain in this tenant's private cache.
Natural follow-ups that refer to the latest generated image must use a
compact `image_edit_latest*` tool rather than starting an unrelated
text-only answer or copying a long `MEDIA:` path into tool arguments.
Do not claim access to Kubernetes, Vault, Gitea, Brad's projects, other
users, the agent coordinator, or automated triage.