← Back to Technical blog

Technical article

Break Agentic BI Work into Deliverables: Query Validation and Dashboard Orchestration with HENGSHI

A business user asks for a dashboard showing sales trends and year-over-year comparisons for each province in East China over the past year. The request involves metric definitions, queries, charts, and a saved dashboard. A single step with no checkpoints makes failures hard to locate. Sending every small operation to the model increases round trips, state transfer, and repeated work. Choose the task size based on what the team needs to deliver.

Nov 19, 2026Technical blogHENGSHI11 min read
Agentic BIHENGSHI CLI

Article body

Full article

A business user asks for a dashboard showing sales trends and year-over-year comparisons for each province in East China over the past year. The request involves metric definitions, queries, charts, and a saved dashboard. A single step with no checkpoints makes failures hard to locate. Sending every small operation to the model increases round trips, state transfer, and repeated work. Choose the task size based on what the team needs to deliver.

HENGSHI Data Agent can interpret questions, break them into queries, and assist with metric and dashboard creation. HENGSHI CLI provides programmatic access to data integration, HQL and HE queries, dashboards, and elements. The accompanying skills describe execution order and verification. Teams can divide work around actual HENGSHI resources and query results, giving each stage inputs and outputs they can inspect, then let an Agent or external workflow carry the work forward.

Founded in 2016, HENGSHI pioneered a new generation of Agentic BI for the era of Data+AI. Its integrated portfolio brings together the HENGSHI SENSE enterprise analytics platform, HENGSHI JARVIS super digital employees, the HENGSHI CLI execution engine, and HENGSHI BOX, a control hub for private deployments. With a decade of BI experience, HENGSHI supports software vendors across industries through its Powered by Hengshi ecosystem. It provides integrated, end-to-end AI analytics within trusted private environments for operations management and data-driven decision-making at enterprise groups in manufacturing, finance, retail, government, and other sectors.

1. Identify the deliverables and decide what to validate independently

A deliverable worth validating can be a verified query result or a business definition, as well as a new dataset, metric, or dashboard. If an existing metric can answer an ad hoc question, there is no need to create a duplicate dataset just to add a stage. Reuse an existing dashboard when it already meets the goal.

StageInput and outputWhat to verify
Definitions and resourcesBusiness question to dataset, metric, period, and authorization scopeThe data is accessible and the definition answers the question
Calculation and analysisConfirmed conditions to query results, comparisons, and breakdownsValues, grain, periods, and filters agree
Dashboard creationValidated analysis to charts, filters, and notesThe saved configuration uses the agreed definitions
Delivery verificationSaved objects to a usable resultThe objects can be read again and the intended users can access them

These stages are a guide. A simple aggregation may need one query. Add steps when the task requires new models, complex calculations, or multiple deliverables. Split work where it adds independent verification value. Every extra tool call has a cost.

2. Use HENGSHI assets and semantics to hand work from one stage to the next

2.1 Apply business definitions to the calculation

HENGSHI metrics can carry aggregation expressions. Business metrics can also define dimensions, time axes, and filters, and several metrics can reuse a shared grain. Confirm these settings before passing query results to dashboard creation so the definition carries through each stage.

Year-over-year analysis also depends on comparable periods, complete months, the right date field, and a consistent set of entities. Clarify whether “past year” means the last twelve months, the previous calendar year, or a fiscal year. Map “each province in East China” to the agreed region and province fields.

2.2 Pass resource references and conditions forward

Data Agent can use page and conversation context. HENGSHI CLI can read applications and datasets and query data. Keep actual resource references, metric definitions, dates, filters, execution identity, and completed objects available to later steps. These are useful handoff details to maintain in your workflow. Individual interfaces may use different state protocols.

3. Verify the query before building the dashboard

The HENGSHI CLI entry point is hbi. The following example follows the documented workflow for checking identity, listing resources, and running a small query. Replace <app-id>, <dataset-id>, and amount with the actual resources and field your account is authorized to use.

hbi auth status --output json
hbi app list --area personal-area --root --output json
hbi dataset list --app <app-id> --output json
hbi data-model query --app <app-id> --dataset <dataset-id> "SUM({amount})"

The final command demonstrates a sum. For the sales dashboard, also configure the province dimension, region filter, reporting period, and comparison period and validate a sample. Resolve calculation and scope questions before building charts.

After the query passes, use the applicable dashboard and element commands or the product’s authoring interface. Check the charts, filters, layout, and explanations individually after creating the dashboard container.

4. Sequence dependencies and parallelize work with stable inputs

Year-over-year comparisons depend on the time definition. Charts depend on usable data and dimensions. Write down these prerequisites before deciding which tasks can run independently. HENGSHI provides query and resource operations. Design queues, parallelism, and recovery around the Agent, workflow, and deployment you actually use. A list of available operations alone cannot establish that the platform handles all of the scheduling automatically.

DependencySuggested execution orderWhat to check
Define the time axis and compare periodsConfirm the axis, then query both periodsBoth periods use the same business event and comparable scope
Read independent metricsRun in parallel when inputs are stable and capacity permitsIdentity, data freshness, and workload remain suitable
Create several chartsAgree on the dashboard and shared filters firstObject references, filter behavior, and layout work together
Change shared models or permissionsExecute in a defined order and verifyDependent steps still use valid objects and permissions

Parallel reads consume shared resources, so issuing more queries at once can increase contention. If data refreshes between queries, the results may reflect different snapshots. Record the data conditions during execution and compare their consistency before aggregating results.

5. Measure the cost of task granularity on real work

Elapsed time includes model calls, tool round trips, computation, queueing, retries, and human review. Serial waits accumulate. In parallel flows, look at the critical path and shared resource contention. Adding the duration of every step would overstate elapsed time when work overlaps, and a fixed number of milliseconds cannot describe every call.

MeasureWhat to recordHow to use it
Correctness and reworkWhere definitions, queries, authoring, or delivery failedAdd checks where failures recur
Repeated workRepeated field discovery, queries, and resource creationPass forward valid outputs and resource references
Waiting and resourcesModel time, query time, queueing, and concurrencyCombine overly small steps or parallelize suitable work
CostModel usage, compute, and human reviewChoose the model and automation scope appropriate to the task

HENGSHI CLI can return structured output such as JSON and YAML. Its skills describe when to read resources, how to choose commands, and when to preview changes. Record comparable runs to see how changes to the workflow affect correctness and delivery cost.

6. Check state before reusing, retrying, or rebuilding

A saved query result is reusable while the definitions, authorization, data, and time conditions still apply. If a write returns an uncertain result, read the target state before retrying.

  1. Query or definition failure. Locate the data, expression, time, or permission issue and verify affected results after correcting it.
  2. Chart configuration failure. Check the dashboard, dataset, element settings, and references. Retain analysis results that are still valid.
  3. Write timeout. Determine whether the object was created or updated before retrying. Record its identifier and operation state where needed.
  4. Delivery failure. Confirm the analytics asset was saved, then handle distribution separately. A failed message does not imply the analysis was lost.

For commands with dry-run support, inspect the proposed changes before executing them. A successful preview does not mean the object was saved. Read the object again or open the page after the write and check its contents. Plan for partial recovery while accounting for writes that do not support automatic rollback.

7. Worked example: an East China sales trend dashboard

Consider a hypothetical enterprise building a dashboard for provincial sales trends and year-over-year comparisons with existing order data and revenue metrics.

  1. Confirm the reporting year, revenue definition, region and province fields, and execution account’s access. Reuse the existing model and metrics.
  2. Query the two periods. Sample several months and provinces to check totals, refund rules, and filters. Correct the calculation when these checks fail.
  3. Use validated data and conditions for the trend chart, year-over-year table, and filters. Add notes on period and metric definitions.
  4. Save and reopen the dashboard. Check charts, filters, and the visible data range with an intended user account.
  5. Record outputs and unfinished work. Reuse valid results for presentation or filter edits and recalculate when a metric or source changes.

HENGSHI Data Agent, metrics, CLI, and authoring tools cover the steps from interpreting the question to delivering a usable asset. Structuring the task around verifiable outputs helps the team assess correctness, reuse, and cost from recorded runs.

HENGSHI SENSE

Resources, ecosystem, and implementation stories

Explore how teams design and ship analytics with HENGSHI.

Request a trial

Enterprise deployment, embedded delivery, and trial requests can all be handled quickly.