LGPD and AI: self-hosted LLMs that keep personal data in Brazil
Brazilian companies are putting LLMs on top of customer data: service chats, credit files, health records, legal documents. Under the LGPD, every external AI service in that path is another processor, and often an international transfer that needs its own legal mechanism.
SynapCores runs SQL, vector search, graph, in-database ML and local LLM inference as one self-hosted engine in your data centre or a cloud region in Brazil, so the AI pipeline does not need to send data abroad.
Not legal advice. This page describes technical controls; confirm your obligations with your DPO (encarregado) and counsel.
Short answer
The LGPD allows international transfers only under Article 33 mechanisms, which since ANPD Resolution 19/2024 usually means standard contractual clauses for each provider. Running inference and retrieval on infrastructure in Brazil avoids creating those transfers for AI. With SynapCores, embeddings, semantic search and generation run on a local model, so documents and prompts stay in the country.
No international transfer for AI
A local GGUF model or your own Ollama runs inference. No foreign LLM API is needed.
One agent of processing
Database, vectors, graph, ML and LLM in one system you operate, instead of a chain of AI vendors.
Erasure that reaches the vectors
Data and embeddings live in the same tables, so a deletion request covers both.
Reviewable AI decisions
Every agent run is chained into a tamper-evident ledger, which helps with Article 20 review requests.
What the LGPD asks of an AI pipeline
- Art. 6 principles: purpose, necessity and security apply to data sent to a model as much as to data in a database.
- Art. 33 international transfers: allowed only to adequate countries or under mechanisms such as standard contractual clauses. ANPD Resolution CD/ANPD 19/2024 set the rules and the clauses.
- Art. 37–38 records and impact report: controllers keep records of processing and may be asked for a data protection impact report (RIPD). Every AI vendor adds rows to both.
- Art. 46 security: technical and administrative measures to protect personal data, from design through operation.
- Art. 18 rights and Art. 20 automated decisions: data subjects can request deletion, and can ask for review of decisions made solely by automated processing.
- Art. 52 sanctions: fines of up to 2% of revenue in Brazil, capped at R$50 million per infraction.
International transfers: remove them instead of documenting them
A typical RAG stack sends documents to an embeddings API, vectors to a hosted vector database and prompts to an LLM API. If any of those run outside Brazil, each one is an Article 33 transfer that needs a mechanism, a contract and a line in the RIPD.
| LGPD question | Typical cloud AI stack | SynapCores in Brazil |
|---|---|---|
| Art. 33 transfers | Embeddings, vector store and LLM often abroad | Inference and retrieval run on infrastructure in Brazil |
| Processors (operadores) | One per AI vendor, plus sub-processors | One self-hosted system you operate |
| Art. 18 deletion | Copies in vendor logs and vector indexes | One DELETE removes the row and its embedding |
| Art. 20 review | Decision trail spread across vendors | Agent runs in a hash-chained ledger in your database |
| Art. 46 security | Several environments to secure | One engine, one network boundary |
Banks, fintechs and insurers: CMN Resolution 4.893
Financial institutions authorised by the Central Bank of Brazil must follow CMN Resolution 4.893/2021 for data processing, storage and cloud services, including notifying the regulator about relevant contracts and assessing services provided abroad. Self-hosting the AI layer on infrastructure you already govern keeps it inside your existing cloud and security policy, rather than adding a new foreign service to notify and assess.
Reference setup: an AI stack that stays in Brazil
SynapCores ships native Linux binaries and a Docker image that run in your data centre or on VMs in a São Paulo cloud region. The default provider loads a quantised GGUF model in-process through llama.cpp, and Ollama works as an alternative. Portuguese-capable open-weight models run the same way.
gateway.toml: local inference, telemetry off
# /etc/synapcores/gateway.toml
# Option 1: in-process GGUF model via llama.cpp (default, fully offline)
[query.ai_service]
provider = "native"
model = "llama-3.2-1b-instruct-q4_k_m"
embedding_model = "minilm"
# Option 2: a local Ollama on the same host or network
# [query.ai_service]
# provider = "ollama"
# base_url = "http://localhost:11434"
# model = "llama3.2"
# Anonymous install telemetry is opt-out; switch it off for air-gapped sites
[telemetry]
enabled = falseSemantic search over customer data, inside the database
-- Embeddings are computed by the local model, inside the database
CREATE TABLE policies (
id INT PRIMARY KEY,
clause TEXT,
embedding VECTOR(384)
);
INSERT INTO policies (id, clause, embedding)
VALUES (1, 'Personal data is processed only within the EU.',
EMBED('Personal data is processed only within the EU.'));
-- Semantic search: no external embeddings API, no export to a vector SaaS
SELECT id, clause,
COSINE_SIMILARITY(embedding, EMBED('cross-border transfer')) AS score
FROM policies
ORDER BY score DESC
LIMIT 5;LGPD and AI: frequently asked questions
Does the LGPD forbid sending data to foreign AI providers?
+
No, but it only allows international transfers under Article 33 mechanisms, which usually means standard contractual clauses under ANPD Resolution 19/2024 for each provider. Self-hosting inference in Brazil avoids creating those transfers for AI.
Is the AI bill (PL 2338/2023) relevant?
+
Brazil's AI bill passed the Senate in December 2024 and continues in the Chamber of Deputies. Its drafts emphasise risk assessment, transparency and human oversight. Keeping AI decisions in an auditable ledger next to the data prepares you for those requirements whatever the final text says.
Which models can we use in Portuguese?
+
Any GGUF model for the in-process provider and any model served by your own Ollama, including open-weight models with strong Portuguese support, plus a local embedding model for EMBED().
Does SynapCores send our data anywhere?
+
No customer data. By default an anonymous install heartbeat (installation ID, version, OS) is sent; it never contains SQL, schemas, prompts, embeddings or rows, and can be turned off with [telemetry] enabled = false or DO_NOT_TRACK=1.
AI on Brazilian data, kept in Brazil
Install the free Community Edition on a server in Brazil today, or talk to us about Enterprise for financial, healthcare and public-sector deployments.