Introduction
How anfra provides the foundation for building governed BI apps
What is anfra?
anfra is an open source framework to build trusted, custom, interactive BI (business intelligence) apps such as dashboards, reports, slides and data sheets. You and your AI agents build the app with your own HTML, JavaScript, and charting libraries, and the anfra SDK connects it to a governed semantic foundation with consistent, reusable metrics and trusted business context.
anfra's semantic foundation provides powerful analytics interactions: filtering, drill-downs, and period comparisons for your app, out of the box, along with built-in provenance and lineage to help users understand where their data comes from and how metrics are calculated.
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.
anfra is built to implement 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.
Why anfra?
Traditional BI tools make it easier to trust the numbers, but often limit teams to fixed dashboard layouts and interactions. On the other hand, coding agents can build custom dashboard apps with HTML and JavaScript easily, but wiring each view to the warehouse — and getting filters, drill-downs, and comparisons right — is easy to get wrong and hard to reuse. In addition, these custom apps do not provide enough information to verify their accuracy, or to trace where a number comes from or what it means.
anfra is built to solve this tension: leveraging the freedom provided by AI coding agents, while maintaining the trust that governed BI tools provide. Agents build the app however you want it to look and behave, while anfra handles the parts that have to be right every time:
- Correct numbers, by construction. Every query in the app comes from governed metrics and dimensions, not hand-written SQL. Revenue means the same thing on every dashboard, in every report, and in every agent answer.
- Interactions that just work. Filters, drill-downs, and period comparisons come from the semantic layer, so they work the same way across every view, no matter who or what built it.
- Apps you can verify. Every chart and number links back to its metric definition, its underlying query, and its source data, so reviewers and business users can check an answer instead of taking it on faith.
- Work you can reuse. Because apps use shared definitions instead of one-off queries, the next app, report, or agent session starts from what the team has already built and validated.
In short, you get the flexibility of custom code and the trust of a governed BI tool, without picking one over the other.
What anfra provides
anfra gives data teams a shared foundation for agentic workflows:
- A self-served data analytics workflow for business users. Custom interactive dashboards, reports, analysis that can be built right from business users' favorite AI interface.
- A semantic user interface structure. Queries, controls, and the mappings between them enable standardized, inspectable BI apps.
- A governed source of truth. Metrics, dimensions, relationships, and business context live in reusable, version-controlled files that you own.
- 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 AI 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.