The WebUI currently depends on Ares Agent Python source being importable at
runtime. In local installs this usually means a neighboring checkout; in the
multi-container Docker setup it means the WebUI reads the ares-agent-src
volume that the agent container also uses.
That source mount is a compatibility bridge, not the desired long-term contract. Even when mounted read-only on the WebUI side, it couples WebUI releases to Ares Agent internal module layout and makes the multi-container setup look more isolated than it really is.
ares-agent-src read-only into the
WebUI service by default.docker_init.bash prunes the agent source subtree from chown so read-only
mounts do not break startup.These are the current WebUI capabilities that still rely on Agent source or
ares_cli/agent modules being importable. Each item should eventually move
behind an explicit, versioned Agent API or a packaged library contract that does
not require mounting the live source checkout.
| WebUI capability | Current dependency | Desired API / contract | Notes |
|---|---|---|---|
| Browser chat execution | run_agent.AIAgent imported by api/streaming.py |
Run lifecycle API: start, observe, status, cancel, approval, clarify, final usage | Covered by the runtime-adapter migration in #1925, but still source-backed today. |
| Runtime event rendering | WebUI callbacks around Agent token/reasoning/tool events | Stable event envelope for tokens, reasoning, progress, tool lifecycle, approvals, clarify, errors, and final usage | The existing run-adapter RFC describes the browser-facing shape; Agent still needs a durable producer contract. |
| Profile list/create/delete/seed | ares_cli.profiles from api/profiles.py |
Profile management API with profile metadata, env/runtime context, seed/delete operations, and validation errors | WebUI has fallback filesystem handling for some operations, but feature parity follows Ares CLI internals. |
| Goal command state | ares_cli.goals from api/goals.py |
Goal CRUD/control API: get, save, pause/resume/clear, and status | Should preserve current /goal WebUI behavior without direct module import. |
| Slash command registry and plugin commands | ares_cli.commands and ares_cli.plugins from api/commands.py |
Command/plugin capability discovery API scoped by active profile | WebUI should render command help from a stable capability response. |
| Provider/auth/model catalogs | ares_cli.models, ares_cli.auth, and agent.credential_pool from api/config.py |
Provider registry, model catalog, auth status, OAuth/credential-pool status APIs | WebUI has static fallbacks, but exact parity and custom provider state come from Agent internals. |
| Redaction helper parity | agent.redact.redact_sensitive_text from api/helpers.py |
Redaction service/library contract with signature/version compatibility | WebUI keeps a fallback redactor because this import has changed before. |
| CLI/Gateway session bridge | Agent state.db schema and gateway metadata read by sidebar/session helpers |
Session listing/transcript/metadata API for non-WebUI-originated sessions | Direct SQLite/schema coupling should narrow over time, especially for messaging/email/gateway sessions. |
ares-agent-src stays read-only in
two- and three-container compose files.ARES_WEBUI_AGENT_DIR.