You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ai-stack): Hermes-Agent + Open WebUI Quadlets on shared ai-net bridge
Integrates the deploy-aistack.sh reference flow (Open WebUI -> Hermes-
Agent -> Ollama -> GPU) declaratively into MiOS as Quadlets. Existing
AI-related containers (mios-ai / LocalAI, mios-ollama, mios-searxng)
join the new ai-net bridge alongside their existing mios.network
membership, so the agent gateway can address them by container name
without leaving the bridge. Architectural Law 5 (UNIFIED-AI-REDIRECTS)
unaffected: every AI URL still resolves to localhost.
Topology:
browser -> mios-webui (host:3030) -> mios-hermes (host:8642)
-> mios-ollama (mios-ollama:11434)
-> GPU (CDI)
agent's web_search tool -> mios-searxng:8080 (on ai-net)
agent alt backend -> mios-ai:8080 (LocalAI, on ai-net)
Port choice (3030 for Open WebUI, NOT 8080):
The upstream deploy-aistack.sh maps Open WebUI to host :8080. That
port is taken on MiOS by mios-ai (LocalAI's OpenAI-compatible /v1
endpoint) -- the canonical Architectural-Law-5 surface that aichat /
system prompts / agent SDKs all reference. Moving LocalAI off 8080
would break every existing client. So WebUI gets host :3030 instead;
internal port stays 8080 to match upstream defaults. Documented in
the Quadlet's [Container] header.
New files:
* etc/containers/systemd/ai-net.network -- 10.90.0.0/24 bridge
(one octet beyond mios.network's 10.89.0.0/24).
* etc/containers/systemd/mios-hermes.container -- Hermes-Agent
gateway, dual-network (ai-net + mios.network), publishes :8642.
Exec=gateway run; bypasses upstream's interactive `setup` wizard
by pre-seeding /etc/mios/hermes/config.yaml at build time.
* etc/containers/systemd/mios-webui.container -- Open WebUI,
dual-network, publishes :3030. ENABLE_OLLAMA_API=false so all
chat traffic flows through Hermes (keeps tool-use / history /
rate-limit decisions in one place).
* usr/lib/systemd/system/mios-hermes-firstboot.service +
usr/libexec/mios/mios-hermes-firstboot -- generates a 64-char
API_SERVER_KEY into /etc/mios/hermes/api.env on first boot via
`openssl rand -hex 32`. Both mios-hermes (server side) and
mios-webui (client side, OPENAI_API_KEY) read the same file via
Quadlet EnvironmentFile= so the auth pair stays in sync without
operator copy-paste.
* usr/share/mios/hermes/config.yaml -- vendor Hermes config:
backend = mios-ollama:11434, model = qwen2.5-coder:7b (matches
MIOS_AI_MODEL), web_search tool wired at mios-searxng:8080,
operator override file at /etc/hermes/config.local.yaml.
* usr/lib/tmpfiles.d/mios-hermes.conf -- /etc/mios/hermes (0750),
/var/lib/mios/hermes (0750), copy-if-absent vendor config.yaml.
* usr/lib/tmpfiles.d/mios-webui.conf -- /var/lib/mios/webui (0750).
Multi-network'd existing units:
* etc/containers/systemd/mios-ai.container
* etc/containers/systemd/mios-searxng.container
* usr/share/containers/systemd/ollama.container
Each now lists Network=mios.network AND Network=ai-net.network so
they're addressable by container name from BOTH bridges.
Identity (next two slots in 810-829 service range):
* mios-hermes UID/GID 820 (sysusers.d/50-mios-services.conf)
* mios-webui UID/GID 821 (sysusers.d/50-mios-services.conf)
Wiring:
* usr/share/mios/mios.toml -- new [hermes] and [webui] sections
with endpoint / backend / model fields, sitting alongside [ai]
and [search].
* usr/share/mios/env.defaults -- MIOS_HERMES_{VERSION,IMAGE,PORT,
USER,UID,GID} and MIOS_WEBUI_{VERSION,IMAGE,PORT,USER,UID,GID}
for shell-side consumers.
* automation/lib/globals.{sh,ps1} -- mirror env.defaults: user/uid/
gid + port + URL + unit name + container image ref.
* usr/libexec/mios/mios-dashboard.sh -- "Hermes" and "WebUI" rows
in the Self-replication-loop endpoint section, plus mios-hermes
and mios-webui entries in the Quadlet status table.
* usr/lib/systemd/system-preset/90-mios.preset -- enable mios-
hermes-firstboot.service / mios-hermes.service / mios-webui.
service.
.gitignore:
* Add explicit !/etc/containers/systemd/ai-net.network whitelist
line (the existing mios* glob doesn't catch it, and we keep the
literal "ai-net" name for cross-deploy interop with the upstream
deploy-aistack.sh script).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments