
An example of AI Agent Widget
Overview:
This guide explains how to publish an AI Agent and embed it into your module page on Learning Mall Core.
Part 1: Publish the Agent in XIPU AI Agent
After you have finished configuring and testing your Agent, click Publish Configuration in the top-right corner.
Enter a version number and a short description, then click OK.



After enabling and configuring Web SDK, click Publish to channel in the upper-right corner.
The publishing request may require approval. If you see Submitted for Publishing, please wait until the publishing process has been approved and completed before continuing.

Once Web SDK is available, click Embedded settings next to Web SDK. You will see the JavaScript configuration used for embedding the Agent.
In the generated code, find:
appKey
appKey: "dab6qk1b9rs0jsk5l2mg"
Copy only the App Key value.
You do not need to copy the complete JavaScript code.

Part 2. Add the Agent to your Learning Mall Module
Open your module page in Learning Mall Core.
From the list of available blocks, select: XIPU AI Agent. The new Agent block will appear on the right-hand side of your module page.

Open the action menu for the XIPU AI Agent block and select: Configure XIPU AI Agent block

Paste the App Key copied from XIPU AI Agent into: AI Agent App Key. Then click Save changes.

Part 3: Check the Agent
After saving the configuration, turn Edit mode off. You should now see a small Agent icon on the module page and click the icon to open the Agent interface. You can send a test message to confirm that the Agent loads and responds correctly.

If the Agent does not load, or the Agent interface appears blank, please check the browser's site permissions.
In Chrome:
This permission may be required for the embedded AI Agent to communicate correctly with the XIPU AI Agent service.

Article Number: 431
Author: Thu, Sep 3, 2026
Last Updated: Thu, Sep 3, 2026
Author: Knowledge Base Administrator
Online URL: https://knowledgebase.xjtlu.edu.cn/article/how-to-add-an-ai-agent-widget-to-your-module-page-431.html