
Models can write excellent SQL, yet only 1 in 5 data leaders trust AI-generated answers. Better models alone haven't closed the trust gap
The missing piece is the agent harness, the software layer around the model deciding what context it sees, which data each user can access, and how every answer gets checked and corrected
Building your own harness on an agent SDK gives you full control, but it leaves your data team owning definitions, permissions, verification, and evals indefinitely. For most teams, a purpose-built analytics harness is the faster path to trusted answers
PUBLISHED:
UPDATED:
Most data teams have already invested in AI context. You've probably built a semantic layer, documented your dbt models, or written a few skills for your AI assistant. Yet despite all of this work, our CDO survey found only 1 in 5 data leaders trust AI-generated answers.
The problem is context alone doesn't fix accuracy. Even well-prepared data teams keep running into three problems:
Too much context: In the Lost in the Middle study, researchers found models often miss details buried in the middle of long prompts. If your approved revenue definition sits halfway through a long context file, the model may overlook it and calculate revenue its own way.
Lost corrections: Say your agent joins on the wrong customer key or misses a business rule. Someone spots the mistake and fixes it in a Slack thread, but the fix never gets saved anywhere the agent can reuse, so the next person who asks gets the same wrong answer.
Unpredictable models: Writing down your definitions doesn't guarantee the model will use them correctly. It might pick the wrong one, or interpret the right one differently each time.
The good news is the right agent harness can solve every one of these problems. Below, we'll show you what a harness does, why analytics needs a specialized one, and which agent harness tools for analytics are worth your time.
What does an agent harness do?
A model can reason well on its own, but it can't remember across sessions, recover when a tool call fails, or tell you when it's guessing. An agent harness is the software layer around a model, controlling how it operates. It decides what context the model receives, which tools it can use, what actions it can take, and what happens to its output, turning raw reasoning into reliable, consistent answers.
Many of the AI tools your team already uses, like Claude Code, Claude Cowork, and OpenAI's Codex, have general-purpose harnesses. While their implementations differ, they all handle six core responsibilities:
Context management: Decides what goes into the model's context window, including instructions, files, skills, and retrieved documents. Filters out anything irrelevant, keeping the model focused on the task at hand.
Tool access: Connects the model to external capabilities such as search, code execution, databases, and APIs. When the model requests a tool, the harness executes the call and feeds the results back into the model.
Orchestration: Manages the agent's execution loop, breaking complex tasks into smaller steps and coordinating each action until the task is complete.
Guardrails and permissions: Controls what data the agent can access and which actions it can take. It also decides when the agent should stop and ask a person for approval.
Verification and error handling: Evaluates outputs, detects failures, and determines how to recover. Depending on the issue, it may retry an operation, correct an error, or request human or expert clarification
Memory and state: Tracks what has happened during a task, maintains intermediate progress, and carries relevant information across sessions so the agent doesn't have to start from scratch every time.
These six jobs let a general-purpose harness handle almost any task. Enterprise analytics, however, demands more.
Why analytics needs a specialized agent harness
Coding agents can write excellent SQL, so it's fair to ask why you'd need anything else. The answer lies in how analytics fails.
When a coding agent gets something wrong, the warning signs are obvious. Either the build breaks or a test goes red. Analytics failures are harder to catch. The query still runs and returns a plausible number, and the error goes unnoticed until someone makes a decision based on it.
Catching these silent AI failures takes a specialized harness. Here's what it does differently:

Answer verification: SQL can run flawlessly and still return the wrong number. A specialized harness checks every result against your approved metrics, business definitions, filters, and calculation logic before delivering an answer.
Consistent answers: The same question should return the same number for every user, session, and interface. The harness reuses verified query paths and applies the same logic everywhere, whether the question comes from chat, a Live App, or an external AI tool.
Per-user permissions: Coding agents usually run on a single set of credentials. An analytics harness applies row- and column-level security for each user, on every query and follow-up.
Cost control at scale: Rediscovering the schema on every question burns tokens and warehouse compute. Instead, the harness resolves context once from your enterprise context layer and reuses it, so cost per question drops as usage grows.
Reviewed learning: Unsupervised memory can make accuracy worse. When our benchmark tested AI agents on real-world analytics questions against a live data warehouse, one early round let Claude Code manage its own memory with no feedback on whether its answers were right. Its accuracy fell from 61% to 30%. A specialized harness avoids this by sending every correction for expert review and applying only the approved fixes.
Of everything a specialized harness does, the feedback loop is the most crucial piece. Context starts going stale the day you write it down. As tables change and metrics get redefined, your documentation falls out of sync with the business, and the agent keeps answering from outdated logic without any warning. A specialized harness feeds every reviewed correction back into your enterprise context layer, so accuracy keeps improving as your business changes.
Types of agent harness tools on the market
"Agent harness" is still a fairly new term, and vendors stretch it to cover a wide range of products. Coding agents, agent SDKs, multi-agent frameworks, and AI features inside BI tools all get called harnesses, even though each one does a very different job.
For instance, most data teams today pair a general-purpose harness or agent SDK with a self-managed semantic layer. This setup gets a pilot running fast, but each piece falls short on its own. The semantic layer only defines how metrics are calculated, and the harness wasn't built to pick the approved metric for an ambiguous question, enforce each user's permissions, or learn from reviewed corrections. These limits are part of why only 7% of businesses have managed to scale AI analytics.
The table below groups agent harness tools by what they were designed to do and shows which types fit analytics best:
Type of tool | What does it do | Best for | Examples |
General-purpose harness | Prebuilt coding agents and agentic apps built around a harness with access to files, code execution, search, and other tools | Coding, research, and knowledge work | Claude Code, Claude Cowork, OpenAI Codex |
Agent SDK | Code libraries giving you a ready-made agent harness to customize and build your own agents on | Engineering teams building custom agents | Claude Agent SDK, OpenAI Agents SDK, LangChain Deep Agents |
Agent framework | Open-source building blocks for defining agents, their roles and tools, and how multiple agents work as a team | Teams assembling multi-agent workflows | CrewAI, Microsoft Agent Framework, Google ADK |
Orchestration framework | Runtimes that coordinate agent workflows through graphs, state management, branching, and human approval steps | Engineers building complex agentic workflows | LangGraph |
BI and semantic layer agents | Analytics agents built inside AI/BI platforms that use existing data models, semantic layers, and governed sources to answer business questions | Teams already working in AI/BI platforms | Hex Threads, Cube AI Data Analyst |
Specialized analytics harness | Purpose-built harnesses managing enterprise context, enforcing per-user permissions, verifying results, and learning from reviewed corrections | Trusted, self-serve analytics across the business | WisdomAI Analytics Harness |
Comparing the top agent harness tools for enterprise analytics
Platform | What does it do | Grounding agents in enterprise context | Governance at query time | Verification and learning | Best fit |
WisdomAI | Agentic Analytics platform with a purpose-built Analytics Harness | Maps every question to approved metrics, business logic, and institutional knowledge from the Enterprise Context Layer | Row- and column-level security and domain permissions applied per user, on every surface | Verifies every result against approved context, asks clarifying questions when context is missing, and turns expert-reviewed corrections into updated context that improves future answers | Enterprises scaling governed, self-serve analytics to thousands of business users |
Claude Code, OpenAI Codex, and Gemini CLI | General-purpose coding agents from Anthropic, OpenAI, and Google, with SDKs for building custom agents on the same harnesses | Relies on context your team supplies through instruction files, skills, and MCP tools | Runs with the credentials of the connection it's given, so per-user row- and column-level security has to be built separately | Checks its own work within a session, but has no built-in loop for learning from whether answers were right | Analysts doing ad hoc analysis, or engineering teams building a custom agent |
Databricks Omnigent | Open-source meta-harness, with a managed version on Databricks, sitting above harnesses like Claude Code, Codex, and Pi | Carries skills and sessions across harnesses but doesn't define business metrics. The managed version integrates with Unity Catalog | Enforces policies on agent actions, while per-user row- and column-level security depends on the underlying data platform | Makes sessions shareable for review, while answer verification and learning depend on the underlying harness | Enterprises on Databricks needing one policy and sharing layer across several agent harnesses |
Cursor | AI code editor with a built-in agent harness that combines your rules, tools, and the model you choose | Relies on rules files, skills, and MCP servers your team configures | Runs with the credentials of whatever data connections each developer sets up | Iterates on its output inside the editor and terminal, but has no built-in check against approved definitions or loop for reviewed corrections | Analytics engineers working on SQL, dbt models, and pipelines in a code editor |
Hex | Collaborative analytics workspace whose agents run on a shared harness | Prioritizes endorsed tables, semantic models, and published projects | Combines Hex workspace roles with the underlying data connection's permissions | Backs every answer with an inspectable notebook, and published work becomes context for future answers | Data teams already running analysis and reporting in Hex |
Cube | Semantic layer with built-in AI agents for analysis | Queries governed metrics in the semantic layer through semantic SQL | Applies access policies from the semantic layer to agent queries | Keeps metric calculations consistent, but choosing the right metric is still up to the agent | Data teams that want one headless semantic layer serving BI tools, embedded apps, and agents |
Here's a closer look at each tool, along with the trade-offs a data team should weigh before committing.
1. WisdomAI: Purpose-built Analytics Harness for enterprise analytics
WisdomAI is an Agentic Analytics platform where anyone can ask a question in natural language and get trusted answers they can act on. At its core is a purpose-built Analytics Harness that sits between the model and your data. Before any answer reaches a user, the Analytics Harness grounds the agent in approved definitions, enforces that user's access rules, plans an efficient query, and verifies the result.
The Analytics Harness draws on the Enterprise Context Layer, a single governed home for your metric definitions, business rules, and institutional knowledge. When a user flags a wrong answer, the correction goes to the right domain expert for review. Once approved, the fix becomes part of the context behind every future answer, so accuracy improves the more your business relies on it.
How WisdomAI handles analytics
Question interpretation: Resolves ambiguous terms like revenue, region, or quarter against approved definitions before any SQL is written, and asks a clarifying question instead of guessing when context is missing or conflicting
Selective context loading: Pulls only the definitions, joins, and verified queries each question needs, so prompts stay lean, token costs stay low, and conflicting definitions never reach the model
Runtime governance: Enforces row- and column-level security and domain permissions for the person asking, on every query and follow-up. The same rules apply in chat, dashboards, agents, and external AI tools
Query planning and execution: Reuses query paths already proven correct instead of rediscovering the schema each time, cutting latency, tokens, and warehouse compute as usage grows
Feedback loop: Routes user corrections to the right domain expert, versions approved changes, and applies them everywhere at once
WisdomAI MCP: Extends the same governed harness to Claude, ChatGPT, Cursor, and other MCP clients, so answers match no matter where the question is asked.
Pros
Purpose-built for analytics, so definition selection, permissions, verification, and learning come built in instead of being separate engineering projects
Accuracy improves with use. In our benchmark, WisdomAI reached 93% accuracy after automated learning on the tested workload, answering 3x faster and at 3.4x lower cost per question than Claude Code
Builds on what your team already has, including dbt models, semantic layers, BI metadata, and query history, and supports open formats like Apache Ossie so your context stays portable.
Cons
Teams only needing a coding assistant for occasional SQL may not need a full governed analytics harness
Domain experts still need to review proposed definitions and corrections before they become shared context
2. Claude Code, OpenAI Codex, and Gemini CLI: General-purpose harnesses
Claude Code, OpenAI Codex, and Google's Gemini CLI are the leading first-party coding agents, and many data teams already use them to write SQL, explore schemas, and debug dbt models. Each vendor also offers a way to build custom agents on the same harness, such as the Claude Agent SDK and the OpenAI Agents SDK.
For analytics, these agents work best for analysts who want to inspect, validate, and refine the SQL they write. However, rolling them out to business users is a different story. Your team has to build a custom agent and own everything around it, including metric definitions, per-user permissions, answer checks, and a process for reviewing corrections. What starts as a push for self-serve analytics can quickly turn into a complex engineering project, adding to the data team's workload instead of reducing it.
How first-party harnesses handle analytics
Agent loop: Plans, writes, and runs SQL or Python, inspecting the output and iterating within a session
Context: Draws on instruction files (CLAUDE.md, AGENTS.md, GEMINI.md), skills, memory, and MCP tools your team sets up
Permissions: Runs with the credentials of whatever data connection it's given
Execution environment: Runs locally or in sandboxes. OpenAI's SDK separates the harness from compute so credentials stay away from model-generated code
Extensibility: Supports custom tools, guardrails, and subagents through each vendor's SDK
Pros
Strong reasoning and SQL generation in tools your analysts already know how to use
Flexible enough to connect to almost any data stack through MCP and custom tools
A great fit for exploratory, one-off analysis by technical users
Cons
Approved definitions sit in instruction files as guidance, and the model decides whether to follow them. When several tables or metrics look plausible, it can pick the wrong one without flagging it
Governance happens at the connection level, so per-user row- and column-level security has to be built separately
Without a built-in way to learn whether its answers were right, the agent can repeat the same mistakes across sessions and users
3. Databricks Omnigent: A meta-harness for teams running many agents
Omnigent is Databricks' open-source meta-harness. It sits above the agents your data team already uses, like Claude Code, Codex, Pi, or custom agents, and turns them into interoperable parts of a larger system.
This position sets it apart from the other tools on this list. Omnigent doesn't decide which metric a question needs or check whether a number is right. Instead, it gives teams running several agents one place to manage policies, control costs, and share work across harnesses.
How Omnigent handles analytics
Agent definitions: Lets you write one agent setup in a config file and reuse it across Claude Code, Codex, and other harnesses
Policies: Tracks what each agent does and enforces guardrails and permissions at the meta-harness layer, so the rules hold no matter what the prompt says.
Shared server: Uses one coordinator to hold sessions, messages, tool calls, artifacts, skills, and authentication for every interface
Managed governance: Integrates with Unity AI Gateway and Unity Catalog in the managed version, extending enterprise governance to every agent interaction
Pros
Lets teams swap harnesses and models without rebuilding agents
Enforces cost and permission policies in code, which is more reliable than prompt instructions
Gives teams already on Databricks a governed way to run several agents side by side
Cons
The managed version's sandbox routes model access and spend through Databricks, and it can't run in workspaces with strict network controls, so security-conscious teams face a trade-off before rolling it out
Its permissions govern agent actions, so per-user row- and column-level security still depends on the underlying data platform
Omnigent controls how agents run, but it doesn't define business metrics itself. Connecting the managed version to Unity Catalog gives agents governed metadata to draw on, but each harness still decides how to apply it, so two agents can return different numbers for the same question
4. Cursor: An IDE-based harness for analytics engineers
Cursor is an AI code editor, and many analytics engineers use it to write SQL, build dbt models, and maintain data pipelines. Its agent harness combines your instructions, its built-in tools, and your choice of model into one workflow.
Cursor is a strong fit for the people building your data stack, but it wasn't built for self-service analytics. Since business logic lives in rule files inside each project, different projects can drift into different versions of the same definitions over time. So opening it up to business users would mean building the missing pieces yourself, including a shared context layer, governance, and answer checks.
How Cursor handles analytics
Rules: Gives the agent standing instructions it reads in every conversation
Skills: Adds extra abilities the agent uses only when needed
Data connections: Connects to MCP servers, so the agent can look up a live database schema instead of only reading open files
Model choice: Lets developers pick the model for each task
Pros
Fits right into analytics engineering work, where SQL and dbt code already live
Works with several models, so you aren't tied to one vendor
Rules and data connections give the agent useful context about your schema
Cons
Rules are added to the model's prompt as guidance, and the model decides whether to follow them. When several tables or metrics look plausible, it can pick the wrong one without flagging it
Each project keeps its own rules, so two people can get different answers to the same question
The agent uses each developer's own data access, so security for business users has to be built separately
5. Hex: AI agents inside a collaborative workspace
Hex is a collaborative analytics workspace combining SQL and Python notebooks, data apps, and conversational analytics. Its agents run on a shared framework, acting as their harness, which controls what context they see, which tools they use, and how their work is shown back to users.
Hex also extends this governed experience beyond its own interface. Users can work with external agents like Claude, Codex, and Cursor, and bring their work back into Hex to publish and share it securely. Every project draws on governed context, so results trace back to the underlying SQL, business logic, and data sources.
How Hex handles analytics
Endorsed context first: Favors endorsed tables, semantic models, and published projects when answering questions
Workspace rules: Lets teams set Agent Workspace Rules to give agents high-level context about the business and when to use which data
Inspectable lineage: Maps every dependency and the full DAG behind a project, so anyone can trace any number on the page back to its source
Context Studio: Gives data teams one place to see which questions get asked, diagnose failures, and curate and test the context agents rely on
Pros
Analysts can open the notebook behind any conversational answer, which makes review quick
Every number is traceable, so even non-technical users can check where a figure comes from
Validated projects and apps become reusable context, so answers get better as teams build more in Hex
Cons
Endorsement steers the agent toward trusted sources. However, it doesn't verify each calculation, so the agent can still write wrong SQL against an approved table
If an endorsed project carries outdated logic, the stale logic can also flow into new answers until someone fixes the source
Lineage helps people review answers after the fact, but nothing checks each result against an approved definition before it reaches the user
6. Cube: A semantic layer with built-in analytics agents
Cube started as an open-source semantic layer connecting the data warehouse to every tool querying it. Over time, it's grown into an agentic analytics platform, with the semantic layer at the heart of its agents' harness.
Instead of letting the model write free-form SQL against raw tables, Cube routes every question through its governed model. The AI Data Analyst turns each natural-language question into semantic SQL, querying the same metrics and business logic Cube's dashboards and apps already use. With every interface drawing on one set of definitions, answers stay consistent wherever a question is asked.
How Cube handles analytics
Semantic queries: Limits the agent to metrics, dimensions, and joins defined in the semantic layer, so every calculation follows governed logic
Model maintenance: Includes an AI Data Engineer agent to help data teams build and update semantic models
Governance: Applies access rules from the semantic layer to agent queries, exactly as it does for dashboards and apps.
Embedding and agent-to-agent use: Runs agents inside external apps and serves insights to other AI agents.
Pros
Metrics are defined once in code and stay consistent across every BI tool, app, and agent querying Cube
An open-source semantic layer means definitions are portable and reviewable like any other code
A strong option for teams wanting one headless analytics layer behind many interfaces
Cons
The semantic layer guarantees a metric is calculated correctly once it's chosen. However, picking the right metric for an ambiguous question is still up to the agent
Coverage stops at the semantic model, so institutional knowledge outside it, like exceptions buried in Slack threads or unwritten analyst conventions, can fail to reach the agent
Cube doesn't advertise a built-in loop for learning from corrections. When a user flags a wrong answer, improvements depend on your team updating the model by hand
Should you just build your own analytics harness?
Having compared these tools, you might be tempted to build your own analytics harness. After all, you'd be able to control every piece, avoid vendor lock-in, and shape the system around your stack.
Before committing, though, look at the full scope of the work. An analytics harness is a set of interconnected systems, each needing its own design, testing, and maintenance. And once they're live, every schema change, new metric, and model upgrade creates more work. Here's what building and running your own would involve:
The system you’d build | What it involves | Why it’s harder than it looks | Ongoing maintenance |
Context store | Building a versioned home for definitions, business rules, and institutional knowledge | Context is fragmented across systems and people, and much of it is never written down. Capturing every nuance is close to impossible, so the agent always works from partial context, and the gaps stay invisible | Updating context with every schema change, dbt model update, and new business rule |
Per-user governance | Propagating each user's identity to the data warehouse and enforcing row- and column-level security across every query and follow-up | Interfaces often authenticate users differently, and each follow-up, subagent, and cached result adds another path where identity has to carry through. Miss even one checkpoint, and data access becomes inconsistent, putting sensitive data in front of users who were never meant to see it | Keeping permissions aligned as teams, roles, and interfaces change |
Verification | Checking whether each answer matches the approved definition, and asking for clarification when context is missing | A query can run cleanly and still return the wrong number, so checks have to confirm the result matches the approved definition, filters, and calculation logic. Without this validation, incorrect numbers can reach users and gradually erode trust in the entire system | Adding checks as new question types and edge cases appear |
Query reuse | Caching verified query paths and invalidating them when definitions change | Every cached query depends on several definitions, joins, and tables, and each change has to invalidate every cached path relying on it. Miss one, and the cache keeps serving outdated logic | Tracking which cached paths depend on which definitions |
Evals and regression tests | Building golden question sets and rerunning them on every model, prompt, or context change | Each golden answer has to be certified by the domain expert closest to the business, and the set has to reflect real-world questions, including the hard ones | Expanding the golden set and rerunning it with every change |
On top of these systems, you'd also need a feedback loop to route corrections to the right experts, version the approved fixes, and feed them back into context so every future answer reflects what your team has already learned.
Each piece is a project in its own right, and combined, they add up to a product your data team would have to staff and support indefinitely. Building makes sense if you have dedicated AI engineers ready to own it for the long haul. For most data teams, especially at growing companies, the picture looks different. They're already stretched thin, and a homegrown harness becomes one more system they have to keep running.
Choose a harness built for the job
General-purpose harnesses and agent frameworks are excellent at the jobs they were built for, and your engineers should keep using them. Enterprise analytics is different. The stakes are higher, the failures are harder to spot, and trust is slow to rebuild once it's lost. Your choice of harness decides whether self-serve analytics scales or stalls.
Make your AI analytics rollout a success. See WisdomAI in action.
Frequently asked questions
What does an agent harness include?
An agent harness is the software layer around an AI model. It runs the model's execution loop, manages its tools and context, enforces permissions and guardrails, and tracks state across multi-step tasks. An analytics harness adds components built for data work, such as selecting approved metric definitions, enforcing row- and column-level security for each user, and verifying results before they reach the business.
How is an agent harness different from a semantic layer or context layer?
A semantic layer defines how metrics are calculated. A context layer goes further, holding the business meaning a model can't infer from raw tables, including metric formulas, joins, rules, and institutional knowledge. The harness puts this knowledge to work at runtime, choosing which definitions apply to each question and making sure the agent uses them correctly for every user and every question.
Should we build our own analytics harness on an agent SDK?
It depends on how much your team can take on long term. An agent SDK, like the Claude Agent SDK or OpenAI Agents SDK, gives you a proven agent loop and full control over how it works. The catch is everything analytics needs on top of it becomes yours to build and maintain, including metric definitions, permissions, answer verification, and evals. For most data teams, a purpose-built analytics harness gets business users to trusted answers faster and keeps engineering time focused on the data itself.
How do you implement an agent harness?
A successful rollout grows one domain at a time. Here are the steps most data teams follow:
Gather your context: Document your metric definitions, business rules, and most common questions, and have the owner of each metric review them
Choose build or buy: Decide whether to build on an agent SDK or adopt a purpose-built analytics harness. Make the decision based on how much engineering time your team can commit long term
Test before rollout: Run the harness against a golden set of 30 to 50 real questions with certified answers, checking accuracy, consistency across repeat runs, and permissions for different user roles
Launch small: Start with one domain so issues surface early and stay contained
Set up the feedback loop: Route user corrections to experts for review, and apply only the approved fixes
Expand as accuracy holds: Bring on new teams and domains once results stay consistent
FEATURED RESOURCES
