Compare commits

...

4 Commits

Author SHA1 Message Date
Xingyao Wang 5bc6100694 Merge branch 'main' into enable-subagent-task-tool 2026-04-25 10:42:15 -04:00
openhands 3121e03029 refactor: pass enable_sub_agents through get_default_tools()
Remove direct TaskToolSet import and manual append. Instead pass
the user setting to get_default_tools() which now handles the
conditional inclusion internally.

Co-authored-by: openhands <openhands@all-hands.dev>
2026-04-25 14:35:49 +00:00
openhands 90b5993c31 feat: gate sub-agent TaskToolSet behind enable_sub_agents setting
Instead of unconditionally appending TaskToolSet to the tools list,
check user.agent_settings.enable_sub_agents (default: False). This
allows sub-agent delegation to be rolled out gradually — users opt
in via their Settings page, and the feature is off by default.

Requires SDK >= next release (adds enable_sub_agents to LLMAgentSettings).

Co-authored-by: openhands <openhands@all-hands.dev>
2026-04-24 22:49:40 +00:00
openhands a08580f991 feat: enable sub-agent delegation via TaskToolSet in app server
Add TaskToolSet to the default tools list so that the main agent can
delegate tasks to built-in sub-agents (bash-runner, code-explorer,
general-purpose, web-researcher) during conversations.

The sub-agent infrastructure is already fully implemented in the SDK:
- TaskToolSet and TaskManager handle sub-agent lifecycle
- Built-in sub-agent definitions are registered in the agent_server
- Sub-agents inherit the parent's LLM config and run in-process

The only missing piece was including the task tool in the app server's
default tool set.

Co-authored-by: openhands <openhands@all-hands.dev>
2026-04-24 20:12:27 +00:00
@@ -1304,7 +1304,10 @@ class LiveStatusAppConversationService(AppConversationServiceBase):
plan_path = self._compute_plan_path(project_dir, git_provider)
tools = get_planning_tools(plan_path=plan_path)
else:
tools = get_default_tools(enable_browser=True)
tools = get_default_tools(
enable_browser=True,
enable_sub_agents=user.agent_settings.enable_sub_agents,
)
# --- build AgentSettings and create agent ---------------------------
from fastmcp.mcp_config import MCPConfig