feat(dashboard): read-only Agents view for delegation agent_profiles - #36147
Closed
davidgut1982 wants to merge 7 commits into
Closed
feat(dashboard): read-only Agents view for delegation agent_profiles#36147davidgut1982 wants to merge 7 commits into
davidgut1982 wants to merge 7 commits into
Conversation
davidgut1982
force-pushed
the
feat/dashboard-agent-profiles-view
branch
5 times, most recently
from
June 6, 2026 03:00
06b0130 to
cebd0b7
Compare
…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
force-pushed
the
feat/dashboard-agent-profiles-view
branch
from
June 7, 2026 02:23
cebd0b7 to
07a4d5f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a read-only "Agents" page to the dashboard that displays delegation
agent_profilesfrom 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-abledelegate_task(profile=...)snippet. Includes search, model/toolset filtering, and a "Live now" panel showing currently-running delegated sub-agents. Uses existing backend/api/agent-profilesendpoint.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
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)