Problem
OPSIIE ships an in-process multi-agent room implementation (room.py + /room handling in OPSIIE_0_3_80_XP.py). It works for basic “temporal nexus” sessions but diverges from the official arpahls/rooms framework that ARPA maintains for multi-agent orchestration.
What we have today (bundled)
| Area |
Current behavior |
| Entry |
/room nyx, g1: <theme> — regex ^/room\s+([^:]+):\s*(.+)$ |
| Agents |
opsie (always) + nyx, g1, kronos validated against AGENT_DISPLAY_NAMES |
| Backends |
OPSIE → Ollama (get_opsie_response / stream_room_response, hardcoded llama3); others → agentic_network.ask_model (OpenAI/Gemini HTTP) |
| Turn selection |
Query all agents, score with MiniLM + length/uniqueness heuristics (_select_best_response) |
| Memory |
In-process Chroma collection room_<slug> + conversation_history |
| Export |
Optional CSV under outputs/rooms/ on /close |
| UX |
Agent-colored terminal output, speak_agent_response for voice; direct address via agent <prompt> prefix |
Docs already point to arpahls/rooms as the standalone path (docs/COMMANDS.md, docs/ARCHITECTURE.md, docs/MODULES.md, README Related repos) but there is no code integration—two parallel implementations.
Session orchestration: round_robin, argumentative, dynamic (expertise-weighted routing)
- LiteLLM routing (
ollama/llama3, commercial APIs, local-first)
@AgentName forced turns, PASS mechanic, optional global orchestrator, human-in-the-loop
- Pydantic agent/session config, custom Python inference per agent
- Timestamped RAM history → Markdown / CSV export (tested via pytest + CI)
Goal
Use arpahls/rooms as the room engine inside OPSIIE while preserving the familiar operator surface:
- Keep
/room <agents>: <theme> and /close (or document a deliberate alias).
- Keep OPSIIE terminal colors and voice (
speak_agent_response, agent voice IDs).
- Map authenticated user identity from
kun.py (call_name, optional is_current_user) into the rooms user profile.
Avoid long-term duplication of orchestration logic in room.py.
Proposed integration (phased)
Phase 1 — Adapter behind existing /room UX (MVP)
- Add
rooms as an optional dependency (pip install from Git tag or PyPI if published) in requirements.txt (or requirements-rooms.txt extra).
- Add
opsie_rooms_adapter.py (name TBD) that:
- Parses the existing
/room command into a rooms session config (topic, agent list, turn mode default dynamic).
- Registers each OPSIE agent as a
custom_function (or LiteLLM model string where keys exist in .env):
opsie → wrapper around get_opsie_response / Ollama chat (same stack as main loop).
nyx / g1 / kronos → wrapper around ask_model(..., suppress_output=True) so existing API keys and personas stay in agentic_network.py.
- Reuses
get_agent_description() / get_agent_display_names() for personas and expertise lists.
- Replace
current_room = Room(...) with a thin OpsieRoomSession facade that delegates turns to rooms.session.Session and returns {agent, response} for the main loop to print/speak.
- On
/close, call rooms storage export (MD/CSV) and keep writing under outputs/rooms/ if we want path compatibility.
Phase 2 — Feature parity + cleanup
- Adopt
@AgentName addressing in room mode (document alongside legacy agent <prompt> or migrate).
- Expose session type / turn limit via optional flags:
/room dynamic nyx, g1: topic or rooms.yaml.
- Remove MiniLM load from
room.py (saves boot cost) once dynamic routing lives in rooms.
- Fix duplicate logging: today
get_best_response already calls add_conversation, but handle_user_query may add again—align with single source of truth in the adapter.
- Deprecate
room.py with a migration note in docs/COMMANDS.md.
Phase 3 — Optional deeper coupling
- Shared
.env / config for Ollama model names (see configurable Ollama issue) passed into LiteLLM as ollama/<model>.
- Optional bridge: append room transcript snippets to global mnemonic / Chroma (off by default; rooms is RAM-first by design).
- Document when to use OPSIIE
/room vs standalone python cli.py from arpahls/rooms.
Non-goals (initially)
- Replacing
agentic_network.py or /ask live agents.
- Forcing all OPSIE operators to install commercial API keys for room mode (OPSIE-only + local Ollama path should remain viable).
Acceptance criteria
Open questions
- Dependency packaging: git submodule vs
pip install git+https://github.com/arpahls/rooms@<tag>?
- Kronos in rooms: currently limited in
ask_model for non-live—skip in v1 or stub with clear message?
- Chroma per room: drop in favor of rooms RAM history, or optional sync layer?
- Config file:
rooms.yaml at repo root vs env-only for v1?
References
Problem
OPSIIE ships an in-process multi-agent room implementation (
room.py+/roomhandling inOPSIIE_0_3_80_XP.py). It works for basic “temporal nexus” sessions but diverges from the official arpahls/rooms framework that ARPA maintains for multi-agent orchestration.What we have today (bundled)
/room nyx, g1: <theme>— regex^/room\s+([^:]+):\s*(.+)$opsie(always) +nyx,g1,kronosvalidated againstAGENT_DISPLAY_NAMESget_opsie_response/stream_room_response, hardcodedllama3); others →agentic_network.ask_model(OpenAI/Gemini HTTP)_select_best_response)room_<slug>+conversation_historyoutputs/rooms/on/closespeak_agent_responsefor voice; direct address viaagent <prompt>prefixDocs already point to arpahls/rooms as the standalone path (
docs/COMMANDS.md,docs/ARCHITECTURE.md,docs/MODULES.md, README Related repos) but there is no code integration—two parallel implementations.What arpahls/rooms provides
Sessionorchestration:round_robin,argumentative,dynamic(expertise-weighted routing)ollama/llama3, commercial APIs, local-first)@AgentNameforced turns, PASS mechanic, optional global orchestrator, human-in-the-loopGoal
Use arpahls/rooms as the room engine inside OPSIIE while preserving the familiar operator surface:
/room <agents>: <theme>and/close(or document a deliberate alias).speak_agent_response, agent voice IDs).kun.py(call_name, optionalis_current_user) into the rooms user profile.Avoid long-term duplication of orchestration logic in
room.py.Proposed integration (phased)
Phase 1 — Adapter behind existing
/roomUX (MVP)roomsas an optional dependency (pip installfrom Git tag or PyPI if published) inrequirements.txt(orrequirements-rooms.txtextra).opsie_rooms_adapter.py(name TBD) that:/roomcommand into aroomssession config (topic, agent list, turn mode defaultdynamic).custom_function(or LiteLLM model string where keys exist in.env):opsie→ wrapper aroundget_opsie_response/ Ollama chat (same stack as main loop).nyx/g1/kronos→ wrapper aroundask_model(..., suppress_output=True)so existing API keys and personas stay inagentic_network.py.get_agent_description()/get_agent_display_names()for personas and expertise lists.current_room = Room(...)with a thinOpsieRoomSessionfacade that delegates turns torooms.session.Sessionand returns{agent, response}for the main loop to print/speak./close, call rooms storage export (MD/CSV) and keep writing underoutputs/rooms/if we want path compatibility.Phase 2 — Feature parity + cleanup
@AgentNameaddressing in room mode (document alongside legacyagent <prompt>or migrate)./room dynamic nyx, g1: topicorrooms.yaml.room.py(saves boot cost) once dynamic routing lives inrooms.get_best_responsealready callsadd_conversation, buthandle_user_querymay add again—align with single source of truth in the adapter.room.pywith a migration note indocs/COMMANDS.md.Phase 3 — Optional deeper coupling
.env/ config for Ollama model names (see configurable Ollama issue) passed into LiteLLM asollama/<model>./roomvs standalonepython cli.pyfrom arpahls/rooms.Non-goals (initially)
agentic_network.pyor/asklive agents.Acceptance criteria
/room nyx, g1: <theme>starts a session backed by arpahls/rooms, notroom.Room./closeends room mode and offers export (MD or CSV) without breaking OPSIIE mainconvo.docs/COMMANDS.md,docs/ARCHITECTURE.md,docs/MODULES.md, README updated;room.pymarked deprecated or removed.Open questions
pip install git+https://github.com/arpahls/rooms@<tag>?ask_modelfor non-live—skip in v1 or stub with clear message?rooms.yamlat repo root vs env-only for v1?References
room.py,OPSIIE_0_3_80_XP.py(/room,/close, room query block ~1996–2108)