Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(agent-runtimes): offer Jarvis tools to Hermes directly

rubenluetke10-beep742b73dc5f39
diff --git a/jarvis/agent_runtimes/hermes.py b/jarvis/agent_runtimes/hermes.py
index ecf53d7b02..a38692c941 100644
--- a/jarvis/agent_runtimes/hermes.py
+++ b/jarvis/agent_runtimes/hermes.py
@@ -183,6 +183,10 @@ class HermesRuntime:
},
"skills": {"creation_nudge_interval": 0, "project_discovery": False},
"curator": {"enabled": False},
+ # Jarvis' tools are what make this a Jarvis agent: offered directly,
+ # never deferred behind Hermes' tool search, where smaller models
+ # fail to find them (seen live with a 9B model, 2026-10-06).
+ "tools": {"tool_search": False},
"auxiliary": {
"background_review": {"enabled": False},
"title_generation": {"enabled": False},
diff --git a/scripts/spikes/agent_runtimes_e2e.py b/scripts/spikes/agent_runtimes_e2e.py
index 59ef9ef1dd..c7634bc34e 100644
--- a/scripts/spikes/agent_runtimes_e2e.py
+++ b/scripts/spikes/agent_runtimes_e2e.py
@@ -14,6 +14,7 @@ from __future__ import annotations
import asyncio
import json
+import os
import sys
import tempfile
import uuid
@@ -27,9 +28,9 @@ from jarvis.agent_runtimes import base, driver # noqa: E402
from jarvis.agent_runtimes.acp import AcpTurn, frame_line # noqa: E402
from jarvis.agent_runtimes.base import RuntimeTurn # noqa: E402
from jarvis.agent_runtimes.model_map import ModelRoute # noqa: E402
+from jarvis.core.control_key import get_control_key # noqa: E402
from tests.fakes.fake_openai_server import MODEL_ID, FakeOpenAIServer # noqa: E402
-
_STDERR = Path(tempfile.gettempdir()) / "jarvis-runtime-e2e-stderr.log"
@@ -108,16 +109,39 @@ async def main(name: str) -> int:
with FakeOpenAIServer() as server:
key = "sk-e2e-" + uuid.uuid4().hex
route = ModelRoute("local-openai", MODEL_ID, server.base_url, "chat_completions", None)
+ # JARVIS_E2E_MCP=<url>|<agent id>: hand the runtime a running Jarvis'
+ # MCP server (a dev instance) and make the fake model call a real tool.
+ mcp = os.environ.get("JARVIS_E2E_MCP", "")
+ mcp_url, _, mcp_agent = mcp.partition("|")
+ agent_id = mcp_agent or "e2e-agent"
turn = RuntimeTurn(
- agent_id="e2e-agent",
+ agent_id=agent_id,
agent_name="Probe",
- session_id="society:e2e-agent",
+ session_id=f"society:{agent_id}",
workspace=workspace,
route=route,
resume=None,
auto_approve=True,
+ mcp_url=mcp_url or None,
+ control_key=get_control_key() if mcp_url else None,
+ )
+ opening = (
+ 'CALL_TOOL society_wiki_note {"kind": "memory", "target": "user", '
+ '"text": "Favourite food: lasagne (runtime e2e)"}'
+ if mcp_url
+ else "first message"
)
- first, io1 = await _run(name, turn, "first message")
+ first, io1 = await _run(name, turn, opening)
+ if server.requests:
+ offered = [
+ (t.get("function") or {}).get("name", "")
+ for t in server.requests[0].get("tools") or []
+ ]
+ print(" offered jarvis tools:", [n for n in offered if "jarvis" in n][:8])
+ print(" offered total:", len(offered), "tool_search" in offered)
+ calls = [e["payload"] for e in io1.events if e["kind"] in ("tool_call", "tool_result")]
+ for call in calls:
+ print(" ", {k: str(v)[-700:] for k, v in call.items() if k in ("name", "output")})
print("turn 1:", first.status, first.error, repr(first.result_text[:80]))
print(" vendor session:", first.vendor_session)
turn.resume = first.vendor_session
@@ -125,7 +149,7 @@ async def main(name: str) -> int:
print("turn 2:", second.status, second.error, repr(second.result_text[:80]))
history = len(server.requests[-1].get("messages", [])) if server.requests else 0
print(" model saw", history, "messages on turn 2")
- home = tmp / "agent_runtimes" / name / "e2e-agent"
+ home = tmp / "agent_runtimes" / name / agent_id
written = sorted(p.name for p in home.iterdir())
print(" runtime home:", written)
secret_leak = [
diff --git a/tests/unit/agent_runtimes/test_runtime_configs.py b/tests/unit/agent_runtimes/test_runtime_configs.py
index c8766bebc8..28cb76eb6b 100644
--- a/tests/unit/agent_runtimes/test_runtime_configs.py
+++ b/tests/unit/agent_runtimes/test_runtime_configs.py
@@ -89,6 +89,11 @@ def test_hermes_self_learning_extras_stay_off(tmp_path):
assert config["skills"]["creation_nudge_interval"] == 0
+def test_hermes_offers_jarvis_tools_directly(tmp_path):
+ """Never deferred behind Hermes' tool search (a 9B model missed them live)."""
+ assert HermesRuntime().config_for(_turn(tmp_path))["tools"]["tool_search"] is False
+
+
def test_hermes_approvals_follow_the_chat_stance_and_never_the_guardian(tmp_path):
runtime = HermesRuntime()
assert runtime.config_for(_turn(tmp_path))["approvals"]["mode"] == "off"