[nu-demo] service_agent.nu is missing — hero_agent not installable via service_install_all #135

Closed
opened 2026-04-23 23:15:54 +00:00 by mik-tf · 1 comment
Owner

Symptom

Fresh install has no AI chat backend. The AI Assistant island shows:

HTTP 404: Socket ui.sock not found for hero_agent

because hero_agent is never installed or started.

Root cause

hero_agent has an --start/--stop CLI that self-registers with hero_proc, but hero_skills has no service_agent.nu module. It is therefore not included in packages.nu::service_install_all, and there is no standard way to bring it up via the nu orchestrator.

Demo workaround (applied 2026-04-23)

git clone https://forge.ourworld.tf/lhumina_code/hero_agent ~/hero/code0/hero_agent
cd ~/hero/code0/hero_agent
cargo build --release
hero_agent --start

Proper fix

Add service_agent.nu to hero_skills/tools/modules/services/, matching the pattern of service_aibroker.nu. Include it in packages.nu::service_install_all.

IMPORTANT: the action env must include BOTH OPENROUTER_API_KEY AND OPENROUTER_API_KEYS (plural is what hero_agent's config.rs reads — see companion issue). Without that, chat fails with 401.

Filed 2026-04-23 nu-shell demo bring-up. Signed-off-by: mik-tf

## Symptom Fresh install has no AI chat backend. The AI Assistant island shows: ``` HTTP 404: Socket ui.sock not found for hero_agent ``` because hero_agent is never installed or started. ## Root cause hero_agent has an `--start`/`--stop` CLI that self-registers with hero_proc, but hero_skills has no `service_agent.nu` module. It is therefore not included in `packages.nu::service_install_all`, and there is no standard way to bring it up via the nu orchestrator. ## Demo workaround (applied 2026-04-23) ``` git clone https://forge.ourworld.tf/lhumina_code/hero_agent ~/hero/code0/hero_agent cd ~/hero/code0/hero_agent cargo build --release hero_agent --start ``` ## Proper fix Add `service_agent.nu` to `hero_skills/tools/modules/services/`, matching the pattern of `service_aibroker.nu`. Include it in `packages.nu::service_install_all`. IMPORTANT: the action env must include BOTH `OPENROUTER_API_KEY` AND `OPENROUTER_API_KEYS` (plural is what hero_agent's `config.rs` reads — see companion issue). Without that, chat fails with 401. Filed 2026-04-23 nu-shell demo bring-up. Signed-off-by: mik-tf
Author
Owner

Fixed in hero_skills commit 60375f4 (feat(skills): wire action env vars + new service_agent module).

Verification:

  • hero_skills/tools/modules/services/service_agent.nu exists (full install/start/stop lifecycle).
  • Registered in packages.nu:
    • use service_agent.nu (line 32)
    • install entry (line 89)
    • start entry (line 219)
  • Action env maps singular OPENROUTER_API_KEY → plural OPENROUTER_API_KEYS for hero_agent (service_agent.nu:59,76), and also forwards GROQ_API_KEY.
  • Default AIBROKER_API_ENDPOINT routes through HERO_ROUTER_ADDRESS:HERO_ROUTER_UI_PORT (TCP HTTP — reqwest cannot speak Unix sockets).

Note: the issue body called for forwarding both OPENROUTER_API_KEY and OPENROUTER_API_KEYS. The current implementation reads the canonical singular env var and forwards under the plural name hero_agent expects. Proper singular fallback inside hero_agent itself remains tracked separately under home#136.

Signed-off-by: mik-tf

Fixed in hero_skills commit 60375f4 (`feat(skills): wire action env vars + new service_agent module`). Verification: - `hero_skills/tools/modules/services/service_agent.nu` exists (full install/start/stop lifecycle). - Registered in `packages.nu`: - `use service_agent.nu` (line 32) - install entry (line 89) - start entry (line 219) - Action env maps singular `OPENROUTER_API_KEY` → plural `OPENROUTER_API_KEYS` for hero_agent (`service_agent.nu:59,76`), and also forwards `GROQ_API_KEY`. - Default `AIBROKER_API_ENDPOINT` routes through `HERO_ROUTER_ADDRESS:HERO_ROUTER_UI_PORT` (TCP HTTP — reqwest cannot speak Unix sockets). Note: the issue body called for forwarding both `OPENROUTER_API_KEY` and `OPENROUTER_API_KEYS`. The current implementation reads the canonical singular env var and forwards under the plural name hero_agent expects. Proper singular fallback inside hero_agent itself remains tracked separately under home#136. Signed-off-by: mik-tf
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/home#135
No description provided.