Introduction
How Anfra provides the foundation for governed agentic analytics
Anfra is open, self-hosted infrastructure for agentic analytics: a way for humans and AI agents to produce trustworthy analysis together. It gives agents a governed interface to business data so they can work from shared definitions instead of guessing against raw warehouse schemas.
Anfra is CLI-first and built for analytics engineers and dbt users who already work with code, Git, and SQL. Teams define business meaning once, then make it available to agents, applications, and dashboards.
What is agentic analytics?
Agentic analytics is an operating model in which people delegate analytical work to AI agents while retaining judgment and control. An agent can clarify a business question, plan an investigation, gather relevant context, query governed data, explain its findings, and identify uncertainty.
This is broader than chat with your data or text-to-SQL. Those approaches focus on generating a query from a prompt. Real analytical work also requires business definitions, context, permissions, evaluation, and a reviewable reasoning path.
What Anfra provides
Anfra gives data teams a shared foundation for agentic workflows:
- A governed source of truth. Metrics, dimensions, relationships, and business context live in reusable, version-controlled files.
- A stable interface for agents. Agents work through high-level business concepts rather than rebuilding joins and metric logic in every query.
- An analytics-as-code workflow. Definitions can be reviewed, tested, and improved using the development practices your team already uses.
- A common system for every consumer. Agents, applications, and dashboards can use the same definitions instead of creating separate versions of the truth.
The result is an analytical environment designed to make agents:
- Trustworthy — answers use governed definitions and leave an auditable path from the question to the result.
- Capable — agents can reason with business concepts and reusable analytical building blocks, not just tables and columns.
- Efficient — shared definitions and deterministic query generation reduce repeated work, token usage, and inconsistent logic.
The architecture
A complete agentic analytics system needs five connected layers:
- Context layer — makes business and operational knowledge available when an analysis requires it, including definitions, goals, known data issues, and prior decisions.
- Semantic layer — defines governed metrics, dimensions, relationships, entities, and other business concepts, then translates requests into database queries.
- Evaluation system — tests whether agents select the right definitions, follow governance rules, execute valid queries, and support their conclusions.
- Learning system — turns feedback and repeated usage into better context, definitions, tests, and reusable analytical workflows.
- Consumption interfaces — give people and agents places to request, delegate, review, and continue analytical work.
Anfra connects these layers through a code-native project and a stable interface. Its semantic layer is the foundation: it gives every agent and application the same governed language for querying business data.
An Anfra semantic project uses four core building blocks:
- Data models map warehouse tables or SQL queries into dimensions and measures.
- Datasets combine related data models into governed, queryable views.
- Metrics define named, reusable calculations such as revenue or active users.
- Dimensions define how metrics can be grouped and filtered, such as by date, plan, or country.