Repository navigation
Description
Summary
When a conversation is started from an AgentProfile (agent_profile_id) instead of an inline agent_settings payload, the resolved OpenHands agent has no exec tools — no TerminalTool, FileEditorTool, or TaskTrackerTool. It gets only the built-ins (FinishTool, ThinkTool, and SwitchLLMTool when enabled). Public skills are likewise not loaded by default. The agent can't run shell commands or edit files.
This is the profile-launch path exercised by agent-canvas #1571 (and the SaaS cloud backend OpenHands/OpenHands#15060). It affects local agent-server, cloud, and eval identically, since all three build the agent purely from the stored profile fields.
Root cause (traced)
OpenHandsAgentProfile(openhands-sdk/openhands/sdk/profiles/agent_profile.py) has notoolsfield._build_openhands_settings(openhands-sdk/openhands/sdk/profiles/resolver.py) never setstools, so the resolvedOpenHandsAgentSettings.toolsdefaults to[].OpenHandsAgentSettings.create_agent()(openhands-sdk/openhands/sdk/settings/model.py:1116) doestools=self.tools(i.e.[]) and only addsinclude_default_tools = [FinishTool, ThinkTool](+SwitchLLMTool).- Exec tools (
TerminalTool/FileEditorTool/TaskTrackerTool) live inopenhands-toolsand are attached only when the caller passes them inagent_settings.tools. On the profile path there is no such caller — agent-canvas sendsagent_profile_idXORagent_settings, so itsgetAgentTools()list is dropped. - Similarly, skill discovery is gated on
skill_refs; a profile withskill_refs=[]gets no public skills.
Agent-server resolution entry point: openhands-agent-server/openhands/agent_server/conversation_service.py:_resolve_agent_from_profile → resolve_agent_profile(...) → settings_config.create_agent().
Proposed fix
Make OpenHands profile resolution attach a default agent toolset when the profile doesn't specify one:
- In
_build_openhands_settings, defaulttoolsto the standard exec set —TerminalTool,FileEditorTool,TaskTrackerTool— and add the sub-agent tool set whenenable_sub_agentsis set (mirroring what a normalagent_settingslaunch carries). Consider making this overridable so a profile can still narrow/replace the toolset (e.g. an optionaltoolsfield onOpenHandsAgentProfile, defaulting to the standard set). - Default public-skill discovery on the profile path (so
skill_refsunset ⇒ public skills load), matching non-profile launches.
Client-owned enrichments that legitimately can't be reconstructed server-side (agent-canvas's canvas_ui tool and the dev RUNTIME_SERVICES system-message-suffix) are out of scope — those stay canvas-only and only apply on the agent_settings path.
Context / tracking
- Epic: [AgentProfile] Epic: first-class Agent Profiles (named launch setups) across SDK, agent-server, canvas, cloud #3713 (Agent Profiles)
- Consumer that surfaced this: feat(agent-profiles): Agent Profiles — Settings → Agent as the profile library (local + cloud) agent-canvas#1571 (a scoping comment there references this issue)
- Cloud backend: feat(enterprise): Agent Profiles on the cloud/SaaS backend (#15044) OpenHands#15060 (delegates to the same resolver)
Activity
fix(profiles): attach default exec tools on OpenHands profile resolution
fix(tools): default toolset at create_agent — SDK-owned names, profil…