
LGPD and Artificial Intelligence for Companies: What to Do
A practical guide to LGPD and artificial intelligence for companies: purpose, legal basis, data minimization, transparency, data subject rights and records.
Want to apply this in your company?
Book a call with Juan →LGPD and Artificial Intelligence for Companies: What to Do
Brazil's data protection law, the LGPD, applies to any use of AI that handles personal data. There is no exception for the technology. In practice, a company needs a clear purpose, a legal basis, only the data it actually needs, honest notice to the people involved, solid security, and a way to honor data subject rights. What changes with AI is that data passes through more steps and more vendors, so mapping the data flow matters more. This article is operational guidance and does not replace legal advice.
Key takeaways
- The LGPD applies whenever an AI agent, assistant or model receives, queries or generates something using personal data, even if it is only a WhatsApp conversation.
- Each flow needs a specific purpose and a recorded legal basis. Consent is one option, not the only one.
- Data minimization is the cheapest risk control: the AI should see only what the task requires, and only for a limited time.
- Data subjects have rights (access, correction, deletion, information, review of automated decisions), and a company can only honor them if it knows where the data lives.
- Vendor contracts, access control, operation records and human oversight are part of compliance, not extras.
Does the LGPD apply to every use of AI with personal data?
Yes. The law covers any operation involving personal data: collecting, storing, querying, sending to a third party, or using it to generate a response. When an agent reads a message containing a name and phone number, or when an employee pastes a customer contract into an assistant, data processing is taking place.
The first step is to understand the roles. The company that decides why and how data is used is the controller. The vendor that processes data on its behalf is usually the processor. Who is which depends on the contract and on how the vendor uses the information, for example whether it retains the data or uses it to train models. That is something you verify in the terms of service and the contract, not something you assume.
Sensitive data, such as health, biometrics and personal beliefs, falls under a stricter regime. If an AI flow touches this kind of data, legal analysis should come before the pilot. The ANPD, Brazil's national data protection authority, is the official source for guidance on the subject.
Purpose and legal basis: what to define before turning the tool on
Purpose is the concrete reason the data is processed. Improving the customer experience is too vague. Answering questions about the status of an order is specific, verifiable and easy to explain to the person. If the purpose does not fit in one sentence, the flow is probably too broad.
After purpose comes the legal basis. The LGPD provides several options, including performance of a contract, compliance with a legal obligation, legitimate interest and consent. Many companies assume consent solves everything, but it can be withdrawn and it must be free and informed. For support tied to an existing contract, another basis may fit better. If your use case runs on WhatsApp, you can go deeper in LGPD compliance for AI on WhatsApp: legal basis, consent and records.
Two practical precautions:
- Record the purpose and legal basis of each flow in writing, with the name of the person who approved it.
- Do not reuse data collected for customer support to train models, run campaigns or build profiles without reassessing purpose and basis.
Minimization and retention: what the AI really needs to see
The necessity principle requires processing to be limited to the minimum needed for the purpose. In AI projects, the temptation is to hand the whole database to the model to see what it can do. That is the shortest path to a compliance and security problem.
A simple decision guide for each flow:
- If the task works without identifying the person, remove the name, tax ID and phone number before sending the text to the model.
- If the task needs a single data point, such as an order status, query only that field and not the full customer record.
- If the flow involves sensitive data, first ask whether it can be left out. If it cannot, require a specific legal basis and legal review.
- Define how long conversations, attachments and logs are kept, and who can access them.
- Prefer targeted queries with minimal permissions over copying spreadsheets and entire databases into prompts or knowledge repositories.
There is a security side as well. The OWASP Top 10 for LLM applications lists risks such as sensitive information disclosure and prompt injection. The less personal data the agent can see, the smaller the damage if someone manages to manipulate it.
Transparency, automated decisions and data subject rights
People should know they are talking to an automated system, what their data is used for, and how to reach a human. A short notice at the start of the conversation and a privacy policy that mentions the use of AI already cover much of this.
The data subject rights in the LGPD include confirming whether processing exists, accessing the data, correcting information, requesting anonymization or deletion where applicable, knowing with whom the data was shared, and withdrawing consent. The law also allows people to request a review of decisions made solely through automated processing that affect their interests, and to ask for information about the criteria used.
For operations, this turns into practical questions:
- Can we locate everything we hold about a person: conversations, logs, attachments, search indexes and backups?
- If they request deletion, do we know what to erase, what we must keep because of a legal obligation, and what the vendor stores?
- When the AI influences a decision that affects the person, such as credit, collections or hiring, is there human review and a recorded reason?
Derived repositories, such as vector indexes used for search, can also contain personal data. Include them in your mapping. For handing a conversation to a person, see the WhatsApp AI agent human handoff playbook, and for actions with consequences, an AI agent approval policy.
Vendors, security and records of operations
The contract with your AI vendor is part of compliance. It is worth checking and documenting:
- What the vendor may do with the data, and whether it is used to train models.
- Which subcontractors are involved and where processing takes place.
- How long data is retained and how it is deleted.
- How and within what timeframe the vendor notifies you of security incidents.
Many AI services process data outside Brazil. The LGPD requires a valid mechanism for international transfers, and the choice should go through legal counsel, following ANPD guidance.
On security, the familiar practices apply: least-privilege access, secrets kept out of prompts and code, separation between environments, and a review of who can trigger each tool. The LGPD also expects records of processing operations and, in higher-risk cases, a data protection impact assessment, which the ANPD may request. A flow map showing data, purpose, legal basis, vendors and owners is a good starting point for both.
One subtle point: decision logs are needed for audits, but they can also contain personal data. Record enough to reconstruct what happened, with a retention period and restricted access. To structure risk governance, the NIST AI Risk Management Framework is a useful voluntary reference that complements the law without replacing it.
A step-by-step plan to bring your AI use into compliance
A sequence that fits a small team:
- List the AI uses that already exist, including informal ones, such as employees using assistants on their own.
- For each use, note which personal data goes in, whose it is and where it goes.
- Write the purpose in one sentence and choose the legal basis with legal support.
- Cut the data to the minimum and define retention for conversations and logs.
- Review the contract, the processing location and how the vendor uses data.
- Define the notice to the data subject, the channel to reach a human and the procedure for rights requests.
- Pilot a single flow with records and one agreed metric, and only then decide whether to expand, adjust or stop.
This plan follows the same method we use in AI projects: map the current process and data, limit data and actions, pilot one real flow with logs and an agreed success metric, and hand over the operation with documentation so you can decide the next step. Data protection enters at every stage, not as a final review. To structure the pilot, you can adapt an AI pilot charter template.
Illustrative scenario: a clinic wants a WhatsApp agent to confirm and reschedule appointments. During mapping, the team realizes the agent only needs the first name, the time slot and the practitioner, not the medical record or the reason for the visit. The purpose is to confirm appointments already booked, the flow does not read health data, and questions about symptoms or results go straight to the front desk. The notice states that the first contact is automated, conversations have a defined retention period, and the vendor is assessed on retention and model training. The compliance gain comes from simple decisions made before deployment.
Frequently asked questions
Do I need consent to use AI with customer data?
Not necessarily. The LGPD provides several legal bases, and the right one depends on the purpose and context, such as performing an existing contract. Consent must be free, informed and revocable, so use it when it makes sense and not by default. Record the choice with legal support.
Can I use publicly available AI assistants with customer information?
It depends on the terms of the plan you hold, where processing happens and how the vendor uses the data. Personal accounts, with no contract and no company control, are the highest-risk scenario. The safe path is to set an internal policy, provide approved tools and prohibit entering personal data in uses that have not been assessed.
Is there a specific ANPD rule for artificial intelligence?
The LGPD has no chapter dedicated to AI, and the obligations come from its existing principles and rights. The regulatory discussion is still evolving, so follow the official ANPD and legislative channels and confirm the current situation with legal counsel before deciding.
Who is responsible if the AI makes a mistake or exposes data?
In general, the company that decides the purpose and means of processing answers to the data subject and the authority, even when it uses a vendor. The contract can allocate responsibilities between the parties, but it does not transfer the obligation to have controls in place. That is why access limits, operation records and human oversight matter from the pilot onward.