Skip to content

feat(dashboard): read-only Agents view for delegation agent_profiles - #36147

Closed
davidgut1982 wants to merge 7 commits into
NousResearch:mainfrom
davidgut1982:feat/dashboard-agent-profiles-view
Closed

feat(dashboard): read-only Agents view for delegation agent_profiles#36147
davidgut1982 wants to merge 7 commits into
NousResearch:mainfrom
davidgut1982:feat/dashboard-agent-profiles-view

Conversation

@davidgut1982

@davidgut1982 davidgut1982 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

What

Adds a read-only "Agents" page to the dashboard that displays delegation agent_profiles from config.yaml. Lists each profile as a card showing: name, model, toolset chips, resolved tool count, max_iterations, system-prompt preview (expandable), validation badge, and a copy-able delegate_task(profile=...) snippet. Includes search, model/toolset filtering, and a "Live now" panel showing currently-running delegated sub-agents. Uses existing backend /api/agent-profiles endpoint.

Files modified: hermes_cli/web_server.py (read-only endpoints), web/src/pages/AgentsPage.tsx (new), web/src/lib/api.ts (client + types), web/src/App.tsx (routing), tests/test_agent_profiles_endpoint.py (new).

Why

Delegation profiles are invisible in the dashboard (visible only as raw YAML on Config page). Operators cannot verify their delegation config is loaded correctly without manually reading config files or checking logs. This page provides observability into the routing setup.

Tests

pytest tests/test_agent_profiles_endpoint.py -v

8 tests pass: list shape, missing-prompt-file warning, no false-positive warnings, absent-key empty, load-error safe, detail full prompt, detail 404, active fallback.

Platforms tested

Linux (CT/LXC environment, Python 3.13)

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard comp/tui Terminal UI (ui-tui/ + tui_gateway/) tool/delegate Subagent delegation labels Jun 1, 2026
@davidgut1982
davidgut1982 force-pushed the feat/dashboard-agent-profiles-view branch 5 times, most recently from 06b0130 to cebd0b7 Compare June 6, 2026 03:00
davidgut1982 and others added 7 commits June 7, 2026 02:22
…egate_task

Implements NousResearch#9459. Allows named agent profiles in config.yaml with per-profile
model, toolsets, max_iterations, and system_prompt overrides. The profile=
parameter in delegate_task() selects a profile as the baseline for a child
agent; explicit call parameters override profile values.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ride

Pyright flags direct attribute assignment on AIAgent for undeclared attrs.
Replace `child.ephemeral_system_prompt = _profile_prompt` with setattr()
to match the read-side pattern (getattr) already used at line 1265 and
suppress the one new type error introduced by the agent_profiles feature.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…opy; type validation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When delegate_task is called with a named agent_profile, MCP toolsets
declared in the profile now resolve from global mcp_servers config
rather than being filtered against the parent agent's loaded tools.

Previously, if the orchestrator restricted its own MCP context (via
no_mcp or simply not loading domain servers), child agents spawned with
profile toolsets like ["mcp-fastmail"] received empty tool lists
silently. The intersection logic in _build_child_agent() treated
parent-loaded tools as the upper bound for all children.

This fix adds a profile_name parameter to _build_child_agent(). When
set, _is_mcp_toolset_name() gates MCP toolsets through unconditionally;
non-MCP toolsets still require parent membership (security boundary
preserved). delegate_task() passes the resolved per-task profile name
through to _build_child_agent() at every call site.

Fixes the child-tool-loss failure mode described in issue NousResearch#32668.
Three regression tests added to test_delegate_toolset_scope.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Surfaces the delegation personas defined under `agent_profiles:` in
config.yaml — the named sub-agents that `delegate_task(profile=...)` can
target. They were previously invisible in the dashboard (viewable only as
raw YAML on the Config page).

Strictly READ-ONLY display: no create/edit/delete, and no platform/channel
binding (that routing design is still being decided upstream). Distinct from
the existing Profiles page, which manages multi-instance HERMES_HOME profiles.

Backend (hermes_cli/web_server.py):
- GET /api/agent-profiles — list (name, model, provider, toolsets,
  max_iterations, description, tool_count, conservative validation warnings,
  system_prompt preview). Returns {"agent_profiles": []} when the key is
  absent or on any error (never raises).
- GET /api/agent-profiles/active — wraps list_active_subagents() defensively;
  {"active": []} fallback when unavailable. Registered before /{name}.
- GET /api/agent-profiles/{name} — detail incl. full system prompt; 404 if
  unknown.
- tool_count is null when toolsets can't be resolved (never fabricated);
  validation only flags an unreadable system_prompt_file (mcp-*/dynamic
  toolsets are not mislabeled "unknown").

Frontend:
- web/src/pages/AgentsPage.tsx — roster cards (model, toolset chips,
  tool_count, max_iterations, prompt preview + expand-to-full), search +
  model/toolset filters, validation badges, copy-delegate_task() snippet,
  and a "Live now" panel polling /active.
- Wired route, nav entry, and api client + types in App.tsx and lib/api.ts.

Tests (tests/test_agent_profiles_endpoint.py): 8 passing — list shape,
missing-prompt-file warning, no false-positive warnings, absent-key empty,
load-error safe, detail full prompt, detail 404, active fallback.

Note: agent_profiles is currently a fork-local config key (from the unmerged
delegation-profiles work); on an upstream build without it the view is simply
empty. Frontend not compile-checked in this environment (no node); tsc/vite
build runs at deploy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Use shared Card/Badge/Button/Input primitives + theme tokens instead of
ad-hoc classes. Replace hardcoded text-green-600 valid badge with
<Badge tone=success>; warnings use tone=warning. Match Profiles-page
header idiom (small muted H2 + Bot icon + count). tsc + vite clean; QA'd
across Cyberpunk/Hermes-Teal/Ember/Rose themes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Replace @/components/ui/card, @/components/ui/input, and
  @/components/NouiTypography with their correct @nous-research/ui
  paths (matching the pattern used by all sibling pages)
- Remove invalid size="sm" prop from <Badge> (BadgeProps has no size)
- Add explicit React.ChangeEvent<HTMLInputElement> type to Input
  onChange handler to resolve TS7006 implicit-any error

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@davidgut1982
davidgut1982 force-pushed the feat/dashboard-agent-profiles-view branch from cebd0b7 to 07a4d5f Compare June 7, 2026 02:23
@alt-glitch alt-glitch added comp/dashboard Web dashboard / control panel UI (dashboard/, landing) and removed comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/dashboard Web dashboard / control panel UI (dashboard/, landing) P3 Low — cosmetic, nice to have tool/delegate Subagent delegation type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants