Article body
Full article
When enterprises connect Dify, Coze, or their own agents to BI, they usually want a continuous process spanning data retrieval, analysis, dashboard delivery, and business follow-up. That process must preserve business definitions, time ranges, and execution identities across calls. It must also distinguish query results, saved assets, and later business-processing states to deliver outcomes that can be verified and reused.
HENGSHI Data Agent provides question understanding, analytical queries, and assisted authoring. APIs, SDKs, and embedding support different integration levels, while HENGSHI CLI offers programmatic entry points for BI operations such as queries, dashboards, and element configuration. External processes can reuse HENGSHI data models and metrics, organize analysis and asset creation, and connect to their business systems. Explicit calling identities, target objects, and result readback at each stage make actual completion easier to establish.
Founded in 2016 for the Data+AI era, HENGSHI has pioneered a new generation of Agentic BI. Its enterprise analytics platform, HENGSHI SENSE, works with the HENGSHI JARVIS digital employee, the HENGSHI CLI execution engine, and HENGSHI BOX, a privately deployed control hub, to form an integrated service portfolio. With a decade of BI expertise and its “Powered by Hengshi” ecosystem strategy, HENGSHI empowers software vendors across industries and provides enterprise groups in manufacturing, finance, retail, government, and other sectors with integrated AI analytics for business management and intelligent decisions, built on trusted data within their private environments.
1. Divide responsibilities between business workflows and analytical tasks
External agents can manage cross-system objectives, such as receiving a business-analysis request, gathering missing information, and coordinating approvals and tickets. HENGSHI handles BI capabilities including datasets, metrics, queries, analysis, and visualization. Both can involve intent understanding, but operate with different contexts and task scopes.
| Task | HENGSHI capabilities | External process priorities |
|---|---|---|
| Business questions | Data Agent understands analytical questions and breaks down queries | Collect business objectives and decide when to enter analysis |
| Data calculations | Query and analyze under configured models, metrics, and permissions | Pass the correct context and retain results and status |
| Analytics delivery | Assist chart and dashboard authoring and expose programmatic resource operations | Organize review and determine saving targets and delivery methods |
| Result distribution | Native subscriptions can push dashboards and other content on a schedule | Coordinate cross-system approvals, tickets, and follow-up execution when needed |
Integration therefore need not translate every natural-language request into a low-level query before handing it to HENGSHI. Conversational tasks can use the relevant Agent capabilities; tasks with fixed definitions and clear output can use existing metrics or data interfaces. Select a path according to actual interface contracts and deployment capabilities.
2. Choose APIs, SDKs, and CLI according to the delivery objective
Different integration methods address different interaction and execution needs. HENGSHI offers iframes, a JS SDK, and APIs. Its CLI organizes operations such as data integration, queries, dashboards, element configuration, and permissions into callable commands.
| Integration method | Suitable objectives | What to confirm |
|---|---|---|
| iframe / JS SDK | Present analytics pages, dashboards, or related interactions in business systems | Embedding scope, session authentication, page context, and user experience |
| API | Call exposed query, analysis, or resource capabilities from a server | Actual parameters, results, identities, and error handling |
| CLI + skills | Let agents or scripts perform reviewable, repeatable BI operations | Instance and identity, resource location, supported commands, and before/after verification |
| Native subscriptions / Webhook | Distribute existing dashboard content on a schedule or immediately | Push identity, recipient mapping, data scope, and delivery records |
APIs and CLI should not be reduced to “data only” and “resources only.” Their actual coverage depends on the version and its command and interface documentation. SDK returns should not be assumed to be standard configurations for arbitrary third-party chart libraries; external interfaces must follow the actual contract.
For agent execution, HENGSHI CLI skills turn context reading, capability selection, execution order, and verification into reusable processes. They let agents perform BI operations through stable entry points and reduce ad hoc guesses about interfaces and object relationships.
3. Establish identity for every call; filters cannot replace permissions
After an external user enters the analysis process, establish whose identity executes subsequent calls. Calls as an end user should follow that user’s permissions. Calls as a service identity require a predefined account scope and suitable scenarios. Names, tenants, or roles supplied in a chat are not trusted authorization evidence.
HENGSHI APIs support authentication through ClientID, Secret, AccessToken, and related mechanisms. Explicitly configured Sudo capabilities can execute calls as other platform users. Trusted backend services should manage credentials, user mapping, and delegation permissions. Support for passing user information does not prove end-user authorization is complete.
“Analyze only East China” expresses business scope; “the current identity can access only East China data” expresses authorization. Establish both separately.
Validate data permissions under actual access modes. HENGSHI applications support different data access and authorization configurations; do not assume every interface automatically adds the same row and column rules. For example, derived datasets should not be assumed to inherit every source dataset’s row permissions. Before launch, validate visible results for actual users, datasets, and calling methods.
4. SQL and HQL are execution tools; consistent definitions are central to governance
Programmatic integration does not require excluding SQL or HQL. HENGSHI CLI supports HQL / HE queries and data previews, and metrics encode calculations in expressions. Governance should address whether an external process bypasses approved models and metrics and creates another temporary definition.
For example, an external agent answering “this month’s cash revenue” might sum order totals. A successful query would still fail to reuse the enterprise’s cash-receipts definition. Prefer locating confirmed metrics and datasets. If a new calculation is necessary, validate expressions, granularity, time conditions, and sample results before deciding whether to make it reusable.
External processes can retain business questions, resource references, time ranges, effective filters, execution identities, and result states for later dashboard creation or business review. These are context conventions in an integration design, not evidence that all HENGSHI interfaces accept one universal request structure.
5. Hypothetical design: from business questions to follow-up actions
A hypothetical retailer wants weekly business analysis in an existing agent workflow. The following design illustrates responsibilities when connecting Dify, Coze, or a custom orchestration layer. Configure connectors and parameters for the actual products and deployed versions.
- Collect the question and confirm scope. A user asks to examine last week’s East China revenue change and identify stores requiring attention. The external process confirms the reporting period, resolves trusted identity, and locates available HENGSHI applications and datasets.
- Hand analysis to HENGSHI. Use the appropriate analytics entry point, reuse the confirmed revenue metric, compare periods, and analyze by store. Return requests for missing information when refund data is absent, time meaning is unclear, or access is unauthorized.
- Create reviewable deliverables. Use dashboard authoring or resource operations as needed and retain metric definitions, time ranges, and chart configuration. A temporary answer can instead deliver query results and explanation; not every request needs a new dashboard.
- Choose native distribution or external orchestration. Use HENGSHI subscriptions for recurring dashboard pushes. Let the external process coordinate systems when approval, tickets, or responsibility assignment is needed first. Confirm recipients and the data scope of generated content before sending.
- Verify completion. Read target objects again or open their pages to confirm dashboards were saved with the expected data and filters. Then check subscription records or external receipts. Business users confirm explanations and follow-up actions.
HENGSHI subscriptions support email, WeCom, Feishu, DingTalk, Webhook, and other methods, including schedules and delivery records. They require corresponding service or channel configuration. Verify recipient identity, content-generation identity, and pushed data scope against actual settings.
6. Deliver reliably by recognizing actual execution states
Read queries, authoring, authorization, and message distribution have different consequences and should not share one retry policy. Enterprises can adopt the following handling patterns, implementing error recognition and state queries according to the actual interfaces.
| Situation | Suggested process response |
|---|---|
| Ambiguous question or missing definition | Clarify or build the definition before repeating an incomplete request |
| Invalid authentication or insufficient permissions | Stop identity-dependent calls and check authorization and configuration |
| Query timeout or temporary network failure | Use bounded retries while retaining time and filter conditions |
| Write timeout with an unknown outcome | Read the target object first to avoid duplicate creation |
| A plan was generated or dry-run passed | Distinguish rehearsal from execution; do not mark the result saved |
| Query succeeded but distribution failed | Retain the analysis and handle distribution separately, confirming receipt |
HENGSHI CLI provides dry-run for supported operations to inspect plans and rehearse changes. It does not replace execution and result readback. External orchestration can retain its task identifiers and key call states alongside HENGSHI audit logs and delivery records to connect the cross-system process.
HENGSHI makes existing enterprise models, metrics, analysis, and dashboards available for agents and business systems to reuse. External platforms organize business workflows, while HENGSHI supplies analytical execution and delivery with defined semantics and permission boundaries. Explicit context and actual states connect the two, turning individual calls into maintainable enterprise analytics processes.