Skip to content

Commit e4cc034

Browse files
committed
feedback of all-hands-bot
1 parent 12d4aea commit e4cc034

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

sdk/guides/agent-file-based.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ Place agent files in these directories, scanned in **priority order** (first mat
9999
Put agents shared across all your projects in `~/.agents/agents/`. Put project-specific agents in `{project}/.agents/agents/`.
100100
</Tip>
101101

102-
## Built-in Sub-Agents
102+
## Built-in Agents
103103

104-
The `tools` package ships with built-in sub-agents as Markdown files in `openhands/tools/preset/subagents/`.
104+
The `openhands-tools` package ships with built-in sub-agents as Markdown files in `openhands/tools/preset/subagents/`.
105105
They can be registered via `register_builtins_agents()` and become available for delegation tasks.
106106

107107
By default, all agents include `finish` tool and the `think` tool.
@@ -121,7 +121,7 @@ In CLI mode, the `default` agent (with browser tools) is replaced by the `defaul
121121

122122
Call `register_builtins_agents()` to register all built-in sub-agents. This is typically done once before creating a conversation:
123123

124-
```python icon="python"
124+
```python icon="python" focus={3-4, 6-7}
125125
from openhands.tools.preset.default import register_builtins_agents
126126

127127
# Register built-in sub-agents (default, explore, bash)
@@ -132,10 +132,9 @@ register_builtins_agents(cli_mode=True)
132132
```
133133

134134
<Warning>
135-
Registration order matters when you programmatically register agents with the same name as a built-in.
136-
`register_builtins_agents()` uses `register_agent_if_absent()`, which silently skips names that are already taken,
137-
so if you register your custom agents **before** calling `register_builtins_agents()`, your agents win.
138-
If you call `register_builtins_agents()` first, a subsequent `register_agent()` with a conflicting name will raise a `ValueError`.
135+
Registration order is critical when programmatically registering agents that share a name with a built-in agent. The system is designed to skip registration if a name is already taken. Therefore, if you register your custom agents before the built-in agents are loaded, your custom versions will take precedence.
136+
137+
Conversely, if the built-in agents are loaded first, they will take precedence, and any subsequent registration of a custom agent with the same name will be ignored.
139138
</Warning>
140139

141140

0 commit comments

Comments
 (0)