Embed Agents in Super Apps
Overview
Embed an agent in a Guandata BI Super App so members can ask questions without leaving the app. For example, open an assistant on a sales analysis page to query sales performance and explore its causes.
This workflow uses organization API access: configure access once for the organization, then select an agent by Agent ID in each app. Conversations run with the signed-in BI user's permissions. No separate credential is needed for each agent. For a third-party backend credential restricted to one agent, see Configure API Access.
Prerequisites
- Super Apps must be available in the target BI environment, and the organization BI environment must be configured in DecideX.
- The target BI environment must run version 8.2 or later and be updated to a build that supports agent access. Contact Guandata support to confirm the required build.
Configure Organization Access
If agent access is already enabled in the target BI environment, proceed to Prepare the Agent and SDK.
-
As the DecideX organization owner, open external access in Settings > System Integrations. Enter an access name and create it.

-
Generate a new token in the access-token area. Copy it immediately and store it securely for the BI administrator. The plaintext token appears only once.

-
As a BI administrator, open agent access under Data Apps > Super App. Open its configuration and supply the following settings, then enable and save:
NoteIf the agent-access option is missing, check the prerequisites.
- The target DecideX instance address, matching the instance that issued the organization token.
- The organization access token as the calling credential.
- A per-minute request limit appropriate to the workload.

Prepare the Agent and SDK
-
Publish the agent and grant app users access. In BI's Super App agent-access page, find it in the current user's available-agent list and copy its Agent ID. If missing, check the BI environment, account, and agent permissions.
-
Return to the agent's configuration in DecideX. Open its API access documentation from the channel-entry area. You only need the documentation; do not create another API access entry.

-
Download both the SDK and documentation and keep them for the next step. Follow the downloaded integration documentation when building the app, using the Agent ID copied in step 1.

Embed the Agent
Choose an embedding form based on the page layout and intended use:
- Floating assistant (
BiAgentChatDock): Expands on demand within the page. - Inline chat (
BiAgentChat): Appears in a fixed area of the page.
Either form can be built with either workflow below.
To incorporate page filters, read and pass the actual filter state through buildContext. The SDK does not automatically detect region, month, or other filters. Passing context does not expand the user's data permissions.
Build Through a DecideX Conversation
-
Start a conversation and identify the Super App to modify. For a new app, describe its page, dataset, and filters. For example: “Create a sales analysis app from the sales-detail dataset. Show monthly sales and allow filtering by region and month.”
-
Upload the SDK and documentation in the same conversation. Provide the Agent ID, assistant placement, and page information to pass. For example:
Add a floating assistant to the bottom-right of the sales analysis page. Use the attached DecideX SDK and replace the Agent ID with the actual ID. Pass the page's current region and month selections with each question.

-
After the app is built and published, open its link from the response and verify access with a business member account.

Build with Codex or Another Coding Tool
-
Open the Super App project in your coding tool. For a new project, prepare the local environment and publishing account using Super App Quick Start.
-
Put the SDK and documentation in a directory the tool can read. Ask it to install the SDK using the current instance's example, embed the component, and pass the actual Agent ID. For example:
Embed a chat panel on the right of the sales overview page using the actual Agent ID. Use BiAgentChat as documented. Pass the selected region through buildContext.

-
Build, package, and publish to the target BI environment. Local preview verifies layout; verify identity, conversations, and permissions in the published app.

Verify the Integration
Sign in to the target BI environment as an actual business member and open the published app:
- Questions and follow-ups: Open the assistant or inline chat, send a simple question, and check the response. Follow up in the same conversation to verify continuity.
- Page filters: If
buildContextis configured, change filters and ask again. Check that the agent uses the current values. If not, verify that the app reads the latest state for every send. - Permissions: Test accounts with different agent and BI data permissions. Authorized members should access only their permitted agents and data. Unauthorized members must not gain access.
If a conversation cannot start, first check the instance address, credential, and enabled state in BI's agent-access configuration. Then check the current account's agent permissions and BI environment configuration.