|
Improve subagent system: isolated tools, custom prompts, context transfer, timeout
AgentProfile: - New fields: subagent_tools, subagent_planning_enabled, subagent_system_prompt - loader.py: loads subagent_tools/subagent_planning_enabled from config.json, reads optional subagent_system_prompt.txt per profile Profiles: - Each profile now has a dedicated subagent_tools list (focused subset, no admin tools) - subagent_planning_enabled: false (configurable per profile) - New subagent_system_prompt.txt per profile with executor-focused instructions run_ephemeral: - Uses profile.subagent_tools instead of enabled_tools - Builds subagent context without persona or profiles block (focused executor) - Injects subagent_system_prompt after profile.system_prompt - Accepts context_transfer: priming exchange injected before task message - Wall-clock timeout (default 5 min) checked per iteration - Returns (result_text, completed: bool) instead of bare string - Optionally runs planning phase if profile.subagent_planning_enabled spawn_agent: - Removed briefing param; task is now fully self-contained - Added system_prompt param: custom injected prompt for this specific task - Auto-reads parent scratchpad context_transfer section via get_section() - Result prefixed with [STATUS: completed|limit_reached] - Timeout 300s scratchpad: - Added get_section(session_id, section) helper for cross-session reads Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
|---|
|
|
| manuals/spawn_agent.md |
|---|
| navi/core/agent.py |
|---|
| navi/profiles/base.py |
|---|
| navi/profiles/developer/config.json |
|---|
| navi/profiles/developer/subagent_system_prompt.txt 0 → 100644 |
|---|
| navi/profiles/loader.py |
|---|
| navi/profiles/secretary/config.json |
|---|
| navi/profiles/secretary/subagent_system_prompt.txt 0 → 100644 |
|---|
| navi/profiles/server_admin/config.json |
|---|
| navi/profiles/server_admin/subagent_system_prompt.txt 0 → 100644 |
|---|
| navi/tools/scratchpad.py |
|---|
| navi/tools/share_file.py |
|---|
| navi/tools/spawn_agent.py |
|---|