Alibaba Cloud Model Studio lets you share or publish applications to different platforms in multiple ways, making it easy to integrate AI capabilities into your business. This topic uses an agent application as an example to demonstrate how to share the application as a webpage, integrate it with DingTalk and WeChat, publish it as a reusable component, and interact with it in real time using audio and video.
Prerequisites
You have built and published an agent application. For more information, see Create an agent application.
Share or publish a Model Studio application
-
Go to the Application Management page in the Model Studio console. On the card for the target agent application, click Publish.
-
Agent applications support the following five sharing or publishing methods.
Share an application using the Official Webpage or UI Application
Permissions for accessing shared applications
-
Who can access? The application creator (Alibaba Cloud account), RAM users, and other Alibaba Cloud users who have the link.
-
Billing: All costs incurred through the shared link are charged to the UID of the application creator.
-
Official Webpage
Currently, sharing through the official webpage is supported only for agent applications, not for workflow applications
-
To the right of Official Webpage, click Create to deploy the web application. The default validity period is 7 days.
-
To track the number of tokens consumed by the web application, click Monitor to enable the service. Then, click Enable Application Observation.
Enable Application Observation, you can go to the Monitor page to Disable Observation.
After the application is published, the page displays a green Published label and a shareable link with an expiration time. You can adjust the link's validity period from the 7-day validity drop-down list. To take the webpage offline, click Unpublish Webpage.
-
Click the
icon on the right to copy the web application link. You can then share the link with other users. Any Alibaba Cloud user with the link can access this application. -
Click to stop the web application service.
-
-
Mobi sharing channel
-
To the right of UI Application, click View to go to the UI Designer interface.
-
For more information about how to edit and publish the application interface, see UI Design.
-
Go to the UI Designer page in the Model Studio console. Hover over the published UI and click Environment Deployment.
-
You can share the Application Address with other users. Any Alibaba Cloud user who has the link can access this application. Click Deactivate to stop the application service.
In the Application Environment Information dialog box, the Development Environment has a Published status and an available application address. The Production Environment has an Unpublished status, and its application address is not available.
-
Publish an application through DingTalk
-
On the Publish to Platform tab of the agent application, click Authorize first on the right side of the DingTalk Robot card.
If you have already granted authorization, skip to step 3.
-
In the Authorization dialog box, select Select to agree, and then click Confirm Authorization.
ImportantIf this is the first time you are creating an application for the WeChat or DingTalk channel on the Model Studio platform, you must authorize AppFlow from Alibaba Cloud Computing Co., Ltd. to provide automated application integration services. This includes the following two authorizations:
-
Authorize the service-linked role (SLR) to be associated with AppFlow.
-
Authorize the API key to be encrypted and transmitted to AppFlow to call applications on the Model Studio platform.
-
-
To the right of the DingTalk Robot card, click Create. In the Select API Key step of the Configure DingTalk panel, select an existing API key from the list and click Next Step. To create or manage keys, you can click Manage API Keys or Create API Key in the upper-right corner.
If no API keys are available, click Create API Key. After you create a key, select it. You can also click Manage API key to go to the My API Keys page to manage your API keys.
-
In the Configure Message step of the Configure DingTalk panel, configure the DingTalk Template ID, DingTalk Client ID, and DingTalk Client Secret parameters. Then, click Confirm.
-
After the DingTalk application is created, go to the Publish Channel tab of the Model Studio application and copy the Webhook Address. You can share this Webhook Address with target users.
Users who have the Webhook Address can configure a robot for the DingTalk application and add it to group chats to answer user questions.
Publish an application through WeChat
If you have already granted authorization when you created the DingTalk robot, you do not need to grant it again. For information about the authorization process, see the corresponding steps in Publish an application through DingTalk.
-
On the Publish to Platform tab of the agent application, click Create on the right side of the WeChat Official Account card.
-
In the Select API Key step of the Configure WeChat panel, select the target API key and click Next Step.
If no API keys are available, you can click Create API Key. After you create a key, select it. You can also click Manage API key to go to the My API Keys page to manage your API keys.
-
In the Configure Message step of the Configure WeChat panel, select the target WeChat credential, and then click Confirm.
-
After the WeChat Official Account AI Robot is created, go to the Publish Channel tab. The WeChat Official Account card displays a Created status, which indicates that the WeChat customer service QR code is generated. Hover over the
icon to view the QR code. You can share this QR code with target users. To test the feature, click the Scan to Use button and scan the QR code with WeChat.
Publish an application as a component
-
On the Publish Channel tab of the agent application, hover over Component, and click Create on the right.
-
Configure the component information and click Confirm Publish.
Parameter Name
Description
Component Name
Enter a custom name. Use a name that has a clear meaning. For example, Weather Analysis Agent.
Component Description
A brief description of the component's features and scenarios. Use natural language for the description. For example, Used to analyze weather information for a city.
After the component is published, when you reference it in an Agent Application, the LLM automatically determines whether to call the component based on its description and the context. When you reference the component in a workflow application, the component description only explains the component's features and does not affect the workflow's execution.
Input Information
Alias
To avoid identical parameter names, you need to give each parameter an alias. When the component is called, the caller can only see the parameter's alias.
Parameter Description
A description of the parameter's content.
-
When you reference the component in an agent and the parameter passing method is Model Recognition, the LLM automatically fills in the parameter content based on the parameter description.
-
In other cases, this description is only for informational purposes.
Whether Required
Set as needed.
Visibility
Specifies whether the component exposes this parameter externally. This is used to hide unnecessary parameters. For example, if a component uses a text model, you need to hide the image input parameter.
Passing Method
Business Pass-through:
-
When you reference the component in an agent, the value is provided by the component's user.
-
When you reference the component in a workflow, the value is provided by an ancestor node.
Model Recognition:
-
When you reference the component in an agent, the LLM automatically infers and fills the value from the context based on the parameter description.
-
When you reference the component in a workflow, even if the parameter's Passing Method is set to Model Recognition, the application does not automatically infer the parameter value. You must explicitly provide an input value for the parameter from an ancestor node, just as you would for Business Pass-through.
Default Value
Set as needed.
-
-
After the component is published, you can reference it in an agent application or a workflow application.
Note-
Avoid nested calls: If application A calls application B, and application B calls application A, the application enters a recursive loop, which makes the feature unavailable.
-
Avoid multi-level calls: If application A calls application B, and application B calls application C, the application has a maximum runtime limit. Multi-level calls can easily cause timeout errors.
Reference a component in an agent application
-
On the Application Management page in Alibaba Cloud Model Studio, when you create an agent application, select the component in the Skills section.
You can select only published agent components.
Click the + icon next to Agent and make your selection in the Select Agent panel that appears.
-
After configuration, enter a question related to the component's feature to test the result.
If the referenced component contains parameters that require Business Pass-through, you can manually configure the Input Variable Configuration during testing or pass the parameters using the
biz_paramparameter in an API call.
Reference a component in a workflow application
-
On the Application Management page in Alibaba Cloud Model Studio, when you create a workflow application, drag the Component node onto the canvas, and then select a component.
You can select published agent components or workflow components.
-
After configuration, enter a question related to the component's feature to test the result.
-
Publish an application using real-time audio and video interaction
Only image-and-text conversational applications in Model Studio are supported. This includes agent applications and workflow applications.
-
On the AI Real-time Interaction tab of the agent application, click Voice Interaction/Video Interaction, and then click Configure on the right side of the page.
-
In the View API-KEY configuration wizard, select the target API key and click OK.
-
In the upper-right corner, click
to generate a temporary QR code for testing. Scan the code with WeChat, DingTalk, or a browser on your mobile phone to test the interaction.The QR code is valid for 24 hours. You can also click Copy Link to share the experience link directly.
-
After testing, click Publish > Confirm Publish. After the application is published, go to the Publish Channel tab. Enable Intelligent Media Services, authorize the SLR, and then create an interactive agent.
Real-time audio and video interaction applications support two publishing channels:
-
Scan QR code for H5/App: Click Generate Sharing Link, set the Token Validity Period, and then click Confirm.
In the Share and Experience dialog box, two options are available. For the H5 Experience, you can scan the QR code with WeChat or DingTalk, or copy the link and open it in a mobile browser. For the APP Experience, you must scan the code in AI Agent > Custom Agent > Authorization Token. When you install the application on an iOS device, you must go to Settings > General > VPN & Device Management, find the trust profile for Taobao, and select Trust.
-
SDK Integration: Click SDK Integration. You can choose Quick Integration to quickly deploy and run the audio and video interaction service. You can also choose Developer Integration to extend more advanced features based on your business needs.
Quick Integration supports the Web, iOS, and Android platforms. The page provides a Share ID that you can update by clicking Regenerate. Add the installation code to the
<body>section of your webpage and enter the Share ID to run the application without AppServer debugging. This method is for testing only. Developer Integration is based on the AICallKit SDK and provides two integration options: with UI solution and without UI solution.
-