Support OCI/catalog and URL references as sub-agents and handoffs#1946
Merged
dgageot merged 1 commit intodocker:mainfrom Mar 6, 2026
Merged
Conversation
|
❌ PR Review Failed — The review agent encountered an error and could not complete the review. View logs. |
Allow sub_agents and handoffs in agent configs to reference external agents from OCI registries (e.g. agentcatalog/pirate) or URLs, in addition to locally-defined agent names. - Add IsExternalReference() to distinguish OCI/URL refs from local names - Update validateConfig to allow external refs in both sub_agents and handoffs - Add resolveAgentRefs() in teamloader to load external agents on demand - Cache external agents by reference string to avoid duplicate loads - Add recursion depth limit (max 10) to prevent circular reference loops - Keep external agents separate from local agents to prevent name collisions - Add example config and comprehensive tests Closes docker#1604 Assisted-By: cagent
7d43c46 to
71e95db
Compare
rumpl
approved these changes
Mar 6, 2026
Member
Author
|
/review |
|
❌ PR Review Failed — The review agent encountered an error and could not complete the review. View logs. |
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.
Allow
sub_agentsandhandoffsin agent configs to reference external agents from OCI registries (e.g.agentcatalog/pirate) or URLs, in addition to locally-defined agent names.Changes
pkg/config/resolve.go: AddIsExternalReference()to distinguish OCI/URL refs from local agent names (requires/for OCI refs)pkg/config/config.go: UpdatevalidateConfigto allow external refs in bothsub_agentsandhandoffs, and add validation for handoff references (previously unvalidated)pkg/teamloader/teamloader.go: AddresolveAgentRefs()to resolve agent references — local names are looked up directly, external refs are loaded vialoadExternalAgent(). External agents are cached by reference string in a separate map to avoid duplicate loads and prevent name collisions with local agents. Recursion depth is capped at 10 to prevent circular reference loops.agent-schema.json: Updatesub_agentsandhandoffsdescriptions to document external reference supportexamples/sub-agents-from-catalog.yaml: New example demonstrating mixed local and catalog sub-agentsTests
sub_agentsandhandoffsIsExternalReferenceunit testsCloses #1604