Skip to content

docs(sdk): remove stale agent-delegation (DelegateTool) guide#589

Merged
VascoSch92 merged 3 commits into
mainfrom
remove-agent-delegation-page
Jun 24, 2026
Merged

docs(sdk): remove stale agent-delegation (DelegateTool) guide#589
VascoSch92 merged 3 commits into
mainfrom
remove-agent-delegation-page

Conversation

@VascoSch92

@VascoSch92 VascoSch92 commented Jun 24, 2026

Copy link
Copy Markdown
Member

What

Removes the stale Sub-Agent Delegation guide (sdk/guides/agent-delegation.mdx) and repairs every reference to it.

Why

The page documents a public DelegateTool API that no longer exists in software-agent-sdk@main — every code block on it is broken, and the delegation feature has moved to TaskToolSet:

  • from openhands.tools.delegate import DelegateTool → no such symbol (delegate/__init__.py exports only DelegateAction, DelegateObservation, ConfirmationHandler, DelegateExecutor, DelegationVisualizer).
  • register_tool("DelegateTool", DelegateTool) / Tool(name="DelegateTool") → no such registered tool.
  • class CustomDelegateTool(DelegateTool).create(max_children=...) → no such class/method (max_children=5 now lives on DelegateExecutor.__init__).
  • The "ready-to-run example" embeds a copy of 25_agent_delegation.py that uses DelegateTool, but the real file now uses TaskToolSet.

Full analysis in #588.

Changes

  • Delete sdk/guides/agent-delegation.mdx and its docs.json nav entry

  • task-tool-set.mdx: remove the TaskToolSet vs DelegateTool comparison table and the parallel-delegation <Tip>

  • Repoint the delegation cross-links in agent-acp.mdx, agent-settings.mdx, agent-tom-agent.mdx, iterative-refinement.mdx, parallel-tool-execution.mdx to the surviving task-tool-set guide

  • agent-file-based.mdx: rewrite the Using with Delegation section and the ready-to-run example off the removed DelegateTool API to TaskToolSetTool(name=TaskToolSet.name) (the tool auto-registers on import, so register_tool(...) is dropped). File-based agents register into the same subagent registry the task tool resolves subagent_type against, so they work with TaskToolSet directly. Section now links to the task-tool-set guide. (Addresses the review on this section.)

  • AGENTS.md / .agents/skills/code-review.md: drop agent-delegation.mdx from the file-naming examples

  • llms context files (llms.txt / llms-full.txt): per review, scrubbed the committed overrides so the deleted guide stops shipping to LLM consumers, and mirrored the agent-file-based.mdx DelegateToolTaskToolSet code-block fixes into llms-full.txt. Done as a targeted edit (remove the listing + the embedded section, mirror the source link repoints / table / Tip / code blocks) rather than a full make llms run, to avoid bundling ~217 lines of unrelated pre-existing drift from other pages (left to the weekly check-llms-files sync job). Verified the result is byte-identical to generator output for these changes.

No /sdk/guides/agent-delegation links remain in any .mdx, so mint broken-links stays green.

The Sub-Agent Delegation guide documented a public DelegateTool API that
no longer exists in software-agent-sdk@main; the feature moved to
TaskToolSet. Delete the page and repair every reference to it:

- Remove sdk/guides/agent-delegation.mdx and its docs.json nav entry
- Drop the "TaskToolSet vs DelegateTool" table and the parallel-delegation
  Tip from task-tool-set.mdx
- Repoint cross-links in agent-acp, agent-file-based, agent-settings,
  agent-tom-agent, iterative-refinement and parallel-tool-execution to the
  TaskToolSet guide
- Drop agent-delegation.mdx from the naming examples in AGENTS.md and
  .agents/skills/code-review.md

llms.txt/llms-full.txt are left to the weekly check-llms-files sync job.
agent-file-based.mdx still contains broken DelegateTool code (tracked in
the issue); only its dead links were repaired here.

Refs #588
@mintlify

mintlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
all-hands-ai 🟢 Ready View Preview Jun 24, 2026, 7:01 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

all-hands-bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review complete.

This review was performed through OpenHands Cloud Automation. You can log in and view the conversation here.

all-hands-bot

This comment was marked as outdated.

Targeted edit of the committed llms.txt / llms-full.txt overrides so the
deleted DelegateTool guide stops shipping to LLM consumers (review on #589):

- Remove the Sub-Agent Delegation listing from llms.txt
- Remove the embedded agent-delegation page section from llms-full.txt
- Mirror the source repoints (cross-links to task-tool-set, drop the
  "TaskToolSet vs DelegateTool" table and the parallel-delegation Tip)

Done as a targeted edit rather than a full `make llms` run to avoid pulling
in unrelated pre-existing drift from other pages, which is left to the
weekly check-llms-files sync job. Verified the result is byte-identical to
generator output for the agent-delegation change.
@VascoSch92

Copy link
Copy Markdown
Member Author

Good catch — fixed in 991fd69. The committed llms.txt / llms-full.txt overrides were still publishing the deleted guide, which defeats the purpose.

I went with the "equivalent targeted edit" option rather than a full python3 scripts/generate-llms-files.py, because a clean regeneration here also pulls in ~217 lines of unrelated pre-existing drift from other pages (e.g. the Analytics description changed from "Get started with LLM observability…" to "Deploy Laminar for trace analysis…"). That drift is the weekly check-llms-files.yml sync job's responsibility; folding it into this deletion PR would muddy the diff.

The targeted edit:

  • removes the Sub-Agent Delegation listing from llms.txt
  • removes the embedded agent-delegation page section from llms-full.txt
  • mirrors the source .mdx repoints (cross-links → task-tool-set, drops the TaskToolSet vs DelegateTool table and the parallel-delegation <Tip>)

To confirm it's equivalent to a real regeneration for this change, I ran the generator onto copies and diffed: the agent-delegation/DelegateTool content is byte-identical to generator output, and the only remaining difference is the unrelated drift above. There are now zero agent-delegation references anywhere in the tree (.mdx, .json, .txt, .md).

Re-requesting review.

all-hands-bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review complete.

This review was performed through OpenHands Cloud Automation. You can log in and view the conversation here.

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Taste Rating: Good taste — this is a focused deletion of a stale guide plus the necessary navigation, cross-link, and committed LLM-context cleanup.

Source Verification

Documentation Claim Verified? Source Evidence
The deleted DelegateTool guide documented a public API surface that is no longer exported. openhands.tools.delegate exports DelegateAction, DelegateObservation, ConfirmationHandler, DelegateExecutor, and DelegationVisualizer, but not DelegateTool: https://github.com/OpenHands/software-agent-sdk/blob/22408f65ffcc3115b4982b03af8a2422bb3ed16e/openhands-tools/openhands/tools/delegate/__init__.py#L3-L17
TaskToolSet is the current registered sub-agent task toolset and exposes prompt, subagent_type, and resume. TaskAction defines those fields: https://github.com/OpenHands/software-agent-sdk/blob/22408f65ffcc3115b4982b03af8a2422bb3ed16e/openhands-tools/openhands/tools/task/definition.py#L37-L54 and TaskToolSet is registered on import: https://github.com/OpenHands/software-agent-sdk/blob/22408f65ffcc3115b4982b03af8a2422bb3ed16e/openhands-tools/openhands/tools/task/definition.py#L198-L262
The replacement links point users toward an active example-based guide. The SDK example imports TaskToolSet and configures it as the tool on the main agent: https://github.com/OpenHands/software-agent-sdk/blob/22408f65ffcc3115b4982b03af8a2422bb3ed16e/examples/01_standalone_sdk/41_task_tool_set.py#L16-L20 and https://github.com/OpenHands/software-agent-sdk/blob/22408f65ffcc3115b4982b03af8a2422bb3ed16e/examples/01_standalone_sdk/41_task_tool_set.py#L69-L72
The stale /sdk/guides/agent-delegation route is no longer referenced by this docs repo's tracked files. Verified locally with git grep -n "agent-delegation" at PR head; it returns no matches.
The committed LLM context overrides no longer publish the deleted guide. Regenerated llms.txt / llms-full.txt in a temporary clone; the generated files also have no agent-delegation references. The remaining generator diff is unrelated pre-existing Laminar/analytics drift, matching the PR author's explanation.
Internal link safety for the docs site. The PR check Check Internal Links (Mintlify) is passing on this head.

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟢 LOW
    Docs-only deletion and link cleanup. The main risk was stale committed LLM outputs continuing to ship the removed page; this head now addresses that, and the remaining generator drift is unrelated to this PR's scope.

VERDICT:
Worth merging: The previous blocking issue is addressed, the stale guide is removed from nav and LLM-context outputs, and the replacement links target the current TaskToolSet documentation.

KEY INSIGHT:
For this repository, removing a page is complete only when docs.json, cross-links, and the committed llms overrides all stop surfacing it.

This review was generated by an AI agent (OpenHands) on behalf of the user through OpenHands Automation. View conversation

Comment thread sdk/guides/agent-file-based.mdx Outdated
## Using with Delegation

File-based agents are designed to work with the [DelegateTool](/sdk/guides/agent-delegation). Once registered, the orchestrating agent can spawn and delegate tasks to them by name:
File-based agents are designed to work with the DelegateTool. Once registered, the orchestrating agent can spawn and delegate tasks to them by name:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still accurate?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — it wasn't. Fixed in 44f916c: this section (and the ready-to-run example below it) now use TaskToolSet instead of the removed DelegateTool. register_file_agents() registers file-based agents into the same subagent registry the task tool resolves subagent_type against, so they work with the task tool directly — no register_tool() needed (it auto-registers on import). Mirrored the same edits into llms-full.txt.

@enyst enyst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we might have a leftover, please see inline comment

The "Using with Delegation" section and the ready-to-run example in
agent-file-based.mdx still imported the removed DelegateTool API
(`from openhands.tools.delegate import DelegateTool`,
`register_tool("DelegateTool", ...)`, `Tool(name="DelegateTool")`),
so both code blocks were broken.

File-based agents registered via `register_file_agents()` land in the
same subagent registry the task tool resolves `subagent_type` against,
so they work directly with the TaskToolSet. Repoint the prose and both
code blocks to `Tool(name=TaskToolSet.name)` (the tool auto-registers on
import, so the `register_tool` call is dropped) and link the section to
the surviving task-tool-set guide.

Mirror the identical edits into the committed llms-full.txt override so
the stale DelegateTool code stops shipping to LLM consumers.
@VascoSch92

Copy link
Copy Markdown
Member Author

@enyst Thanks :-) I fixed it.

@VascoSch92 VascoSch92 merged commit 04324e0 into main Jun 24, 2026
5 checks passed
@VascoSch92 VascoSch92 deleted the remove-agent-delegation-page branch June 24, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(sdk): agent-delegation.mdx (DelegateTool guide) is stale — remove it; DelegateTool deprecated in favor of TaskToolSet

3 participants