feat: make background_agents a standalone toolset#2033
Merged
rumpl merged 1 commit intodocker:mainfrom Mar 10, 2026
Merged
Conversation
rumpl
previously approved these changes
Mar 10, 2026
This comment was marked as outdated.
This comment was marked as outdated.
6ab9773 to
40520d0
Compare
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
40520d0 to
3fe12f2
Compare
aheritier
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Decouple background agent tools from the
sub_agentscheck so they can be enabled independently viatype: background_agentsin 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 hadsub_agentsconfigured. 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
background_agentsin the toolset registry, JSON schema, and config validatoragenttool.NewToolSet()from the sub-agents conditional in teamloaderHandler.RegisterHandlers()to simplify runtime tool wiringHandler.Tools()andbgAgentHandlerwrapperInstructableinterfaceexamples/background_agents.yamldemonstrating parallel delegationruntime.gointo focused files (loop.go,streaming.go,tool_dispatch.go)