Skip to content

feat: make background_agents a standalone toolset#2033

Merged
rumpl merged 1 commit intodocker:mainfrom
dgageot:board/tell-me-when-the-tool-run-background-age-da00ac7d
Mar 10, 2026
Merged

feat: make background_agents a standalone toolset#2033
rumpl merged 1 commit intodocker:mainfrom
dgageot:board/tell-me-when-the-tool-run-background-age-da00ac7d

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Mar 10, 2026

Summary

Decouple background agent tools from the sub_agents check so they can be enabled independently via type: background_agents in the toolsets config.

Previously the four background agent tools (run_background_agent, list_background_agents, view_background_agent, stop_background_agent) were implicitly injected only when an agent had sub_agents configured. Now they are a proper toolset registered in the toolset registry, with their own instructions and schema validation — consistent with every other built-in toolset.

Changes

  • Register background_agents in the toolset registry, JSON schema, and config validator
  • Remove agenttool.NewToolSet() from the sub-agents conditional in teamloader
  • Add Handler.RegisterHandlers() to simplify runtime tool wiring
  • Remove redundant Handler.Tools() and bgAgentHandler wrapper
  • Add toolset instructions via the Instructable interface
  • Add documentation in the tools reference and multi-agent concepts pages
  • Add examples/background_agents.yaml demonstrating parallel delegation
  • Refactor runtime.go into focused files (loop.go, streaming.go, tool_dispatch.go)

@dgageot dgageot requested a review from a team as a code owner March 10, 2026 13:43
rumpl
rumpl previously approved these changes Mar 10, 2026
@docker-agent

This comment was marked as outdated.

@dgageot dgageot force-pushed the board/tell-me-when-the-tool-run-background-age-da00ac7d branch from 6ab9773 to 40520d0 Compare March 10, 2026 14:49
rumpl
rumpl previously approved these changes Mar 10, 2026
Decouple background agent tools from the sub_agents check so they can be
enabled independently via `type: background_agents` in the toolsets config.

Previously the four background agent tools (run_background_agent,
list_background_agents, view_background_agent, stop_background_agent)
were implicitly injected only when an agent had sub_agents configured.
Now they are a proper toolset registered in the toolset registry, with
their own instructions and schema validation — consistent with every
other built-in toolset.

Changes:
- Register "background_agents" in the toolset registry, schema, and validator
- Remove agenttool.NewToolSet() from the sub-agents conditional in teamloader
- Add Handler.RegisterHandlers() to simplify runtime tool wiring
- Remove redundant Handler.Tools() and bgAgentHandler wrapper
- Add toolset instructions via the Instructable interface
- Add documentation in the tools and multi-agent concept pages
- Add examples/background_agents.yaml demonstrating parallel delegation
- Refactor runtime.go into focused files (loop, streaming, tool_dispatch)

Assisted-By: docker-agent
@dgageot dgageot force-pushed the board/tell-me-when-the-tool-run-background-age-da00ac7d branch from 40520d0 to 3fe12f2 Compare March 10, 2026 16:08
@rumpl rumpl merged commit 8ad9626 into docker:main Mar 10, 2026
5 checks passed
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.

3 participants