Bug Description
In Docker environments, Agent Zero uses two separate Python venvs:
/opt/venv — agent runtime (used by execute.py via sys.executable)
/opt/venv-a0 — framework runtime (used by hooks.py)
The execute.py script installs rlms using sys.executable, which resolves to /opt/venv/bin/python3. This means the dependency is only installed in the agent venv.
However, the RLM plugin's tool (tools/rlm.py) and extensions run inside the framework runtime (/opt/venv-a0), where the rlm module is not importable:
/opt/venv-a0/bin/python3 -c 'import rlm'
# ModuleNotFoundError: No module named 'rlm'
Impact
- Users install the plugin dependency via the UI (which runs
execute.py)
- The installation reports success (exit code 0)
- But the plugin fails at runtime when trying to import
rlm in the framework context
- The readiness check in
build_runtime_readiness() reports dependency_satisfied: false
Steps to Reproduce
- Run Agent Zero in Docker
- Install the RLM plugin
- Click the "Execute" button in the plugin UI to install dependencies
- Observe: installation succeeds,
execute_record.json shows exit_code: 0
- Verify:
/opt/venv-a0/bin/python3 -c 'import rlm' → ModuleNotFoundError
Root Cause
execute.py uses the skill template pattern:
result = subprocess.run(
[sys.executable, "-m", "pip", "install", ...],
)
sys.executable in execute.py is /opt/venv/bin/python3, so pip installs there. But hooks.py (which calls ensure_rlm_dependency()) runs in /opt/venv-a0.
The hooks.py install() function does call ensure_rlm_dependency(), but only when triggered by the plugin lifecycle (install/update). If the user only runs execute.py from the UI, the framework venv is never populated.
Suggested Fix
execute.py should install the dependency in both venvs in Docker environments. For example:
import shutil
import sys
from pathlib import Path
def main() -> int:
# Install in current venv (agent runtime)
_install_deps(sys.executable)
# In Docker, also install in framework venv
framework_python = Path('/opt/venv-a0/bin/python3')
if framework_python.exists() and str(framework_python) != sys.executable:
_install_deps(str(framework_python))
return 0
Alternatively, document in README that users in Docker must manually run the install command in both venvs.
Environment
- Agent Zero in Docker (Kali Linux container)
/opt/venv: Python 3.13 (agent runtime)
/opt/venv-a0: Python 3.12 (framework runtime)
- Plugin version: RLM 1.1
- rlms version: 0.1.1
Bug Description
In Docker environments, Agent Zero uses two separate Python venvs:
/opt/venv— agent runtime (used byexecute.pyviasys.executable)/opt/venv-a0— framework runtime (used byhooks.py)The
execute.pyscript installsrlmsusingsys.executable, which resolves to/opt/venv/bin/python3. This means the dependency is only installed in the agent venv.However, the RLM plugin's tool (
tools/rlm.py) and extensions run inside the framework runtime (/opt/venv-a0), where therlmmodule is not importable:Impact
execute.py)rlmin the framework contextbuild_runtime_readiness()reportsdependency_satisfied: falseSteps to Reproduce
execute_record.jsonshowsexit_code: 0/opt/venv-a0/bin/python3 -c 'import rlm'→ModuleNotFoundErrorRoot Cause
execute.pyuses the skill template pattern:sys.executableinexecute.pyis/opt/venv/bin/python3, so pip installs there. Buthooks.py(which callsensure_rlm_dependency()) runs in/opt/venv-a0.The
hooks.pyinstall()function does callensure_rlm_dependency(), but only when triggered by the plugin lifecycle (install/update). If the user only runsexecute.pyfrom the UI, the framework venv is never populated.Suggested Fix
execute.pyshould install the dependency in both venvs in Docker environments. For example:Alternatively, document in README that users in Docker must manually run the install command in both venvs.
Environment
/opt/venv: Python 3.13 (agent runtime)/opt/venv-a0: Python 3.12 (framework runtime)