feat(delegation): agent profiles for delegate_task (#9459)#18522
Conversation
Allow delegate_task to spawn subagents from named agent profiles
defined in agent_profiles (config.yaml). Profiles configure model,
toolsets, max_iterations, system prompt, and delegation credentials.
- _load_agent_profile() / _resolve_profile_system_prompt() helpers
- _build_child_agent() gains profile_cfg param
- delegate_task() gains profile param (top-level + per-task in batch)
- build_delegate_task_schema() injects live profile list into tool schema
- Orchestrator system prompts list available profiles for routing
- agent_profiles: {} added to config defaults and _KNOWN_ROOT_KEYS
- cli-config.yaml.example documents schema with 4 example profiles
- 34 unit tests covering all new code paths
Closes NousResearch#9459
|
Hey @w87x — we independently implemented the same feature in #32630 (now closed in favor of this one). Your implementation is more complete: the model_tools.py dynamic schema patch and orchestrator prompt injection are the right approach. We validated the pattern in production on our homelab Hermes instance — automatic intent routing via SOUL.md works cleanly with named profiles. We have 17 additional tests that cover some edge cases (max_iterations dead assignment at top-level call site, deepcopy isolation, int coercion on bad YAML values). Happy to contribute them here if useful. Let me know if you'd like a PR against your branch. |
|
Hey @w87x — great work on agent profiles. I implemented a complementary approach in #34754 and want to sync up rather than duplicate effort. Overlap: Where #34754 extends yours:
Config namespace question: Proposal:
What do you think is the cleanest path to one merged PR that covers both use cases? Tests: 35 new tests in #34754, all pass under scripts/run_tests.sh. Would also be happy to port our tests to whichever branch wins. |
Allow delegate_task to spawn subagents from named agent profiles defined in agent_profiles (config.yaml). Profiles configure model, toolsets, max_iterations, system prompt, and delegation credentials.
Closes #9459
What does this PR do?
Related Issue
Fixes #
Type of Change
Changes Made
How to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs