Data Agents Within Enterprise Boundaries: Architecture and Selection Guide
Building a Data Agent that keeps data within enterprise-controlled environments requires more than private deployment. This article compares three implementation approaches and explains how semantic layers, deterministic execution, validation, inherited permissions, and audit trails make conversational analytics suitable for production. It also outlines selection criteria and a phased implementation process for organizations with strict security and compliance requirements.
Data Agents connect natural-language interaction with enterprise data retrieval, analysis, and explanation. Business users can ask questions without first writing SQL, waiting for reports, and interpreting the results manually.
Large language models lower the barrier to asking questions, but they also introduce risks earlier in the workflow. A model working directly with underlying database schemas can misinterpret business definitions and produce results that cannot be reconciled or verified. Sending data outside the enterprise network can cross security and compliance boundaries.
For government-owned enterprises and organizations in finance, energy, manufacturing, and other security-sensitive sectors, keeping data within a controlled environment is a prerequisite, not an optional feature. The question therefore shifts from “Can we build it?” to “Where does the data reside, who executes the queries, and can the results be trusted?”
1. Data Boundaries Must Be Built Into the Architecture
Traditional analytics workflows are lengthy and require specialist skills, often taking days or weeks. Conversational data access shortens that process but introduces two distinct risks.
The first is semantic risk. A metric may have different business definitions, reporting windows, and dimensional constraints. If a model bypasses established metric and dimension definitions, it may generate SQL that looks reasonable but cannot be reconciled with official reports.
The second is boundary risk. Sending sample records, table schemas, or query results to an external inference service expands the data exposure surface.
Keeping data within enterprise boundaries requires model services, semantic assets, compute engines, and audit logs to remain in an enterprise-controlled environment. Deployment should use internal networks or private infrastructure, with traffic kept off the external public internet and permissions aligned with existing data systems.
The architecture should reuse established network segmentation, identity management, and auditing. Introducing AI should not create a separate, uncontrolled channel for data access.
2. Three Common Implementation Approaches
The main differences between implementation approaches are deployment, data boundaries, and trust mechanisms—not whether the interface supports chat.
Approach 1: An Enterprise Data Agent Platform
This approach adds intelligence to an existing analytics environment rather than replacing it.
A typical implementation runs on-premises or in private infrastructure, keeping both data and model calls within the controlled boundary. Instead of converting natural language directly into unrestricted SQL, it first maps questions to a constrained domain-specific language (DSL) or metric expression. A semantic layer aligns metrics and dimensions, and a deterministic compute engine executes the query.
The model handles intent understanding and planning. The semantic layer and execution engine handle calculation accuracy and traceability.
Permissions inherit existing row-level, column-level, subject-area, and role-based controls. Established metric definitions, datasets, and analytics assets can be reused, avoiding a separate warehouse migration or a second set of business definitions solely for AI.
Approach 2: General-Purpose Conversation Orchestration With External or Partially Managed Models
This approach is quick to start and can work well for a proof of concept. However, data boundaries often depend on operational assurances that data will not be sent to cloud services. Queries are commonly generated directly by the model as SQL or scripts.
Without a semantic layer and deterministic execution engine, metric-definition errors and hallucinations are harder to intercept systematically. Permissions, auditing, and lineage must also be added separately.
For tightly regulated environments, this approach is generally better suited to experimentation than to serving as the primary production architecture.
Approach 3: A Custom Middleware Layer
Organizations can build their own semantic layer, validators, and execution sandbox, using the model only as a planner.
This provides flexibility but carries substantial engineering and governance costs. Teams must continuously maintain terminology dictionaries, DSL grammar, regression tests, and permission mappings.
It is best suited to organizations with strong enterprise data platform and platform engineering capabilities.
When selecting an approach, establish deployment and network requirements first. Then compare query mechanisms, validation and permissions, and finally the cost of reusing existing assets. If the data-boundary requirement is not met, other capabilities are unlikely to compensate during compliance review.
3. Why Models Should Not Query Raw Tables Directly
The weakness of unrestricted natural-language-to-SQL is not simply whether a model can write a JOIN. The deeper issue is that enterprise semantics are not fully captured by table schemas.
Table names, field names, legacy compatibility fields, and metrics that share a name but differ in meaning can all lead a model to choose the wrong reporting window, filter, or deduplication rule.
A more reliable division of responsibility is:
- The model identifies intent and develops a plan.
- The middleware produces a valid, executable, auditable domain statement.
- The engine calculates results using published business definitions.
Domain statements should reference only registered metrics, dimensions, filters, and datasets within the user’s authorized scope. Invalid fields, unauthorized subject areas, and unpublished metric definitions should fail during compilation rather than produce a plausible-looking number.
The query workflow can be divided into seven stages:
- Intent recognition and slot filling.
- Terminology and synonym alignment.
- DSL generation and static validation.
- Restriction to the authorized data scope.
- Deterministic execution.
- Result plausibility checks.
- Attachment of source information and metric definitions.
Probabilistic models can support the earlier stages, but validation and execution must be deterministic. This preserves the natural-language experience while anchoring calculations in version-controlled semantic assets.
4. Trust Requires Three Layers of Validation and Traceability
Trust must be implemented through checks and evidence, not asserted in product messaging.
Terminology Alignment
Business terms must map to a unique metric identifier. For example, “revenue,” “sales revenue,” and “tax-inclusive revenue” need to be resolved against governed definitions rather than assumed to be interchangeable.
When the intended meaning is ambiguous, the agent should ask for clarification or decline to answer.
DSL Validation
Statements must pass compilation and policy checks covering syntax, types, valid combinations of aggregations and dimensions, time macros, and permission scope.
Result Plausibility
Empty result sets, abrupt changes in magnitude, zero denominators, and inconsistent year-over-year or period-over-period comparison windows should trigger warnings or block the answer. The response should identify possible definition or reporting-window issues.
Every result should include:
- Data provenance: the dataset, filters, and time range used.
- Metric definitions: the formula, tax treatment, and whether returns are deducted.
- A traceable path: navigation from the answer to the semantic object and then to the underlying tables, with drill-down limited by permissions.
Audit records should capture the requester, the rewritten DSL statement, the semantic version used, execution time, and export activity. These records support internal audits and regulatory reviews.
An intelligent answer without an evidence trail has limited value in production.
5. Permissions, Asset Reuse, and Implementation Costs
A Data Agent should inherit identity, row-level and column-level access controls, masking, and approval workflows from the existing analytics or data platform. It should not introduce a separate set of “chat permissions.”
Otherwise, users may retrieve through conversation details they cannot access in reports.
Reusable assets include governed warehouse subject areas, metric platforms, semantic models, standard dimensions, and established analysis paths. Better reuse reduces the need for the model to guess which tables to query, shortens deployment time, and limits disputes over metric definitions.
Cost assessment should include:
- Private inference infrastructure or internal model services.
- Staff time for semantic governance.
- Regression testing and evaluation dataset development.
A polished chat demo is not an adequate basis for estimating production costs.
For enterprises with mature BI and metric governance, upgrading the existing environment is generally preferable to rebuilding it. Organizations with few semantic assets should establish metric definitions and permissions before introducing conversational access. Otherwise, keeping data inside the network merely keeps incorrect queries inside the network as well.
6. Selection and Implementation Recommendations
Begin by documenting the constraints: data classification, whether any data may leave the controlled boundary, whether models must run on the internal network, and audit retention requirements.
Then evaluate candidate architectures in this order:
- Query controls: Do queries pass through a semantic layer and deterministic engine? Can arbitrary SQL be prohibited?
- Validation and lineage: Are these built into the product, rather than enforced only through prompt instructions?
- Permission inheritance: Does the agent natively reuse existing access controls?
- Asset reuse: Can established metrics and reporting assets be reused?
For the pilot, choose a subject area with stable metric definitions and clear permissions. Build a gold-standard question-and-answer set, then run regression evaluations for answer accuracy, refusal rate, unauthorized-access blocking rate, and consistency with approved metric definitions.
In production, include the agent in formal change management. Semantic releases, model changes, and prompt updates must all be reversible.
A Data Agent that keeps data within enterprise boundaries places the language model inside the enterprise’s semantic and governance framework as a planner. It does not send enterprise data into a model as training material or external context.
Deployment belongs within the controlled network, calculation belongs in a deterministic engine, permissions belong in the existing access-control system, and evidence belongs with every answer. This is how conversational analytics moves from a demonstration to an auditable production capability. For organizations with explicit security requirements, that order should not be reversed.
