You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Tech Debt] Unify sub-agent declarations with generic resource descriptors #1241
I searched the issues and found no existing issue for this refactoring.
Description
Internal sub-agents currently have a dedicated Java InternalSubagentProvider and a different Python serialized-resource representation. Provider serialization, runtime ownership detection, and setup construction therefore need sub-agent-specific branches. SubagentSetup also extends SerializableResource even though runtime setups are reconstructed from configuration.
Align sub-agent declarations with the existing resource model:
Keep addResource / add_resource, ordinary ResourceDescriptors, and generic resource providers.
Provide Java/Python InternalSubagent.builder() helpers that return a descriptor containing the child Agent, description, and input schema. Normalize the direct-Agent registration shorthand at the API boundary.
Compile the Agent in the plan layer, retain cycle detection and resource-name scopes, and carry the compiled workflow as JSON data under plan.
Construct InternalSubagentSetup through the generic provider and the normal descriptor/context constructor. Make SubagentSetup a Resource; external sub-agents must be declared with descriptors instead of setup instances.
Preserve internal execution, nested calls, failure results, and Python task lifecycle forwarding. Cover descriptor metadata and plan JSON in both language directions.
The generic ResourceDescriptor should remain unchanged; child-plan compilation belongs in the plan layer. This refactoring does not add Python-to-Java external sub-agent invocation support or change the JDK requirements for Java internal calls.
Related: #1134. Cross-language external invocation remains tracked separately in #1141.
Activity