Agents

TOTVS Redesigns Data Architecture for AI Agents

Brazilian tech giant TOTVS is overhauling its data infrastructure using semantic ontologies and low-latency databases to prepare enterprise systems for token-hungry AI agents.

InfoQ AI3 days agoAgents
Image: InfoQ AI

Brazilian software giant TOTVS, whose systems process roughly 25 percent of Brazil's gross domestic product, is redesigning its data architecture to support enterprise-grade AI agents. Fabiane Nardon, the company's head of data intelligence, revealed how the firm is moving away from traditional transactional databases and data lakes, which were never optimized for the rapid, unpredictable queries of large language models. Instead, TOTVS is implementing a data mesh architecture that treats Model Context Protocol (MCP) tools as governed data products.

To resolve semantic ambiguities that confuse AI agents, TOTVS is reviving Semantic Web standards like Resource Description Framework (RDF) and Web Ontology Language (OWL). In a test using ChatGPT, providing an OWL ontology allowed the model to correctly classify a server as a cloud service rather than hardware. This structured approach is backed by research; Nardon cited a 2024 study showing that an ontology-based semantic layer boosted LLM response precision by 40 percent. By linking MCP tools to specific data products, TOTVS can feed only the relevant portion of an ontology into an agent's context window, minimizing token overhead.

The company's data platform operates across three distinct latency tiers. A high-latency layer uses Apache Spark for batch processing Parquet files, while a medium-latency tier relies on Google BigQuery. To serve fast-moving AI agents, TOTVS built a low-latency layer using Postgres and DuckDB. This setup triggers atomic stored procedures in Postgres to run data transformation pipelines in milliseconds or seconds, ensuring agents access fresh, clean data without overwhelming transactional systems.

For practitioners, this architecture changes how AI security and integration are handled. Rather than letting LLMs write raw database queries, which invites prompt injection, TOTVS uses parameterized MCP tools with embedded security. The system propagates user identities via OAuth tokens, ensuring agents only retrieve data the specific user is authorized to see. This shift forces developers to move from generic database-access tools to highly governed, business-specific data products.

This is our own summary of reporting by InfoQ AI

More in Agents