AI agents create a very different privacy problem from normal software.
A traditional application usually has predictable data flows. A user submits a form, the application stores it in a database, and a predefined set of services processes it.
An AI agent can behave very differently.
Give an agent access to Microsoft 365, procurement records, employee information, invoices and a CRM, and it may retrieve information from several systems, combine it inside a model context window, infer something new about a person, call another system, store the result in memory and write an action back into a business application.
That flexibility is exactly what makes agents useful. It is also what makes privacy architecture much harder.
Under South Africa's Protection of Personal Information Act, the question is therefore not simply:
"Is the model POPIA compliant?"
A model is only one component.
The real question is whether the entire processing system around the model handles personal information lawfully.
POPIA establishes eight conditions for lawful processing, including processing limitation, purpose specification, information quality, openness and security safeguards.
This is how we would think about building around it.
Start with the data flow, not the LLM
Before choosing a vector database, model provider or agent framework, map the information your agent can touch.
Consider an internal auditing agent.
It might have access to invoices, supplier records, procurement systems, contracts, internal email and employee expense data.
The agent itself may only receive a prompt saying:
textInvestigate this supplier for potential procurement irregularities.
But fulfilling that request could cause the system to process names, email addresses, banking details, employee activity, supplier information and potentially information about alleged misconduct.
Under POPIA, "processing" is broad. It includes collection, storage, retrieval, consultation, use, transmission, linking and destruction of personal information.
So your architecture diagram should describe more than where data is stored.
It should describe where data moves.
text┌───────────────────────┐ │ User / App │ └──────────┬────────────┘ │ ┌──────────▼────────────┐ │ Identity + RBAC/ABAC │ └──────────┬────────────┘ │ ┌──────────▼────────────┐ │ Policy Engine │ │ purpose + permissions │ └──────────┬────────────┘ │ ┌───────────────▼────────────────┐ │ Agent Runtime │ └───────┬─────────┬──────────────┘ │ │ ┌─────────▼───┐ ┌─▼───────────────┐ │ Retrieval │ │ Tool Gateway │ │ Gateway │ │ API / DB / SaaS │ └──────┬──────┘ └───────┬─────────┘ │ │ ┌────────▼────────┐ │ │ Internal Data │ │ │ Sources │ │ └────────┬────────┘ │ │ │ ┌────▼───────────────────▼───┐ │ Data minimisation layer │ │ redaction / classification │ └───────────┬────────────────┘ │ ┌──────▼──────┐ │ LLM Gateway │ └──────┬──────┘ │ ┌──────▼──────┐ │ Model │ │ Provider │ └─────────────┘
Every arrow in that diagram is something your privacy architecture needs to understand.
POPIA should become system requirements
A useful way to approach POPIA is to translate legal requirements into engineering requirements.
| POPIA concept | Engineering implication |
|---|---|
| Processing limitation | Do not give the agent access to data simply because it exists |
| Purpose specification | Every agent workflow should have an explicitly defined purpose |
| Further processing limitation | Do not silently reuse retrieved information for unrelated agent workflows |
| Information quality | Give users mechanisms to correct bad source data |
| Openness | Document what information the agent processes and why |
| Security safeguards | Authentication, encryption, isolation, logging, monitoring and access control |
| Data subject participation | Support access, correction and deletion workflows |
| Operators | Put contractual and technical controls around third-party processors |
| Cross-border transfers | Understand where model and infrastructure providers process data |
| Automated decisions | Add meaningful human review where high-impact decisions are involved |
This changes the architecture significantly.
Instead of building:
tsconst result = await agent.run(userPrompt);
you want something conceptually closer to:
tsconst context = await authorize({ user, purpose: "supplier-risk-investigation", caseId }); const documents = await retrieve({ query, permittedSources: context.sources, purpose: context.purpose, accessScope: context.accessScope }); const minimisedContext = await minimisePersonalData(documents); const result = await model.generate({ context: minimisedContext, instructions, auditContext: { userId: user.id, caseId, purpose: context.purpose } });
The model should sit behind your controls, not become the control plane itself.
Never let the agent decide what it is allowed to see
One of the biggest architectural mistakes in agent systems is allowing the model to enforce permissions.
Imagine giving an agent a search_company_database() tool and telling it:
textOnly retrieve documents the current user is allowed to see.
That is not access control.
That is a prompt.
Permissions should be enforced before the information reaches the model.
If a finance manager asks an agent to investigate an invoice, your retrieval system should already know that person's identity, organisation, department, role and permitted resources before executing the search.
The LLM should never be able to override that policy.
A safer flow is:
textUser ↓ Identity ↓ Authorisation policy ↓ Filtered retrieval ↓ Agent
not:
textUser ↓ Agent ↓ "Please behave and retrieve the right documents" ↓ Database
The distinction sounds obvious, but it becomes extremely important once agents gain dozens of tools.
Build purpose into the permission model
Traditional RBAC asks:
textCan David access procurement records?
Privacy-aware agent systems need another question:
textCan David process these procurement records for this particular purpose?
That distinction matters because information collected for one reason should not automatically become fair game for every future AI workflow.
POPIA requires personal information to be collected for a specific, explicitly defined and lawful purpose, and further processing generally needs to remain compatible with that original purpose.
This makes purpose-aware access control extremely useful.
Your authorization token could include something like:
ts{ subject: "user_4821", role: "auditor", purpose: "procurement-risk-review", allowedSources: [ "supplier_registry", "invoices", "procurement_contracts" ], caseId: "AUD-2026-0091" }
Now your retrieval and tool layers can enforce both who is asking and why.
Minimise before inference
Data minimisation should happen before the model call wherever possible.
Suppose an agent needs to determine whether an invoice matches a purchase order.
It may need:
textInvoice number Supplier Purchase order Amount Date Line items
It probably does not need:
textEmployee ID number Home address Personal cellphone number Payroll information Unrelated email history
Giving the agent an entire document because only five fields are relevant is technically convenient, but it increases the amount of personal information being processed.
This becomes even more important with long-context models. A million-token context window should not be treated as permission to dump an organisation's entire information estate into the model.
Large context windows change what is technically possible.
They do not change the principle of minimality.
Treat RAG as a privacy boundary
Retrieval augmented generation is often described as a model accuracy technique.
Inside enterprises, it is also part of your security architecture.
Each chunk in your vector store should ideally carry security metadata alongside the embedding.
For example:
json{ "document_id": "contract_982", "department": "procurement", "classification": "confidential", "allowed_roles": ["auditor", "procurement_manager"], "purpose": ["audit", "procurement_review"], "retention_class": "7_years" }
The authorization filter should execute before similarity results are exposed to the agent.
This is important because semantic search can create unusual information leaks.
A user might not know that a confidential investigation exists, but a poorly implemented vector search could surface a semantically related paragraph simply because their query happened to be similar.
Also treat embeddings derived from personal information as protected processing artifacts.
Embeddings are not magical anonymisation.
If they remain connected to identifiable records or enable retrieval of personal information, access to them deserves the same architectural care as the documents they represent.
Agent memory can quietly become your biggest privacy problem
Agent memory sounds harmless.
It is not.
If an employee tells an agent:
textRemember that Thabo has been struggling with his medical treatment, so give him some flexibility on deadlines.
and the agent stores that indefinitely, you have potentially created persistent processing of health information.
Special personal information receives additional protection under POPIA.
The categories include information concerning health, biometric information, race or ethnic origin, political persuasion, religious or philosophical beliefs, trade union membership and sex life, subject to the Act's rules and exceptions.
Persistent memory therefore needs its own policy.
Do not simply save every conversation.
Separate short-lived conversational state from long-term organisational memory, apply retention periods, make stored memories discoverable and deletable, and require an explicit justification before sensitive information becomes durable.
The same principle applies to observability.
Your debugging logs should not accidentally become an ungoverned copy of your production database.
Be extremely careful with prompts and traces
Modern agent platforms frequently log:
textSystem prompts User prompts Model responses Tool parameters Retrieved documents Tool responses Reasoning traces Errors Latency Token usage
From an engineering perspective this is useful.
From a privacy perspective it can be disastrous.
A database might have excellent row-level access control, only for the agent to retrieve a customer record and dump the entire contents into a tracing dashboard that every developer can access.
Observability should therefore have its own redaction layer.
You can log:
json{ "tool": "get_customer", "customer_id": "hash:a0f9...", "status": "success", "duration_ms": 218 }
without logging the full customer object.
For production systems processing highly sensitive information, consider separating operational telemetry from content telemetry entirely.
Third-party AI providers are part of your data architecture
Calling an external model API means information may leave your infrastructure.
That does not automatically make the architecture unlawful.
It does mean you need to understand the relationship between your organisation and the provider.
Under POPIA, an operator processes personal information for a responsible party under a contract or mandate.
The responsible party remains responsible for ensuring that appropriate safeguards exist, and POPIA requires written arrangements around operator security measures.
In practice, evaluate your AI provider in the same way you would evaluate any serious cloud processor.
You should know:
- Where requests are processed
- Whether inputs or outputs are retained
- Whether customer content is used for model training
- Which subprocessors may receive data
- What contractual safeguards apply
- How incidents are communicated
- Whether deletion requirements propagate through the stack
This includes the LLM provider, embedding provider, vector database, observability platform, OCR service, transcription provider and any SaaS tools the agent can call.
An agent architecture can have far more processors than its developers realise.
POPIA does not simply mean "host everything in South Africa"
This is an important misconception.
POPIA regulates transfers of personal information outside South Africa, but it does not create a blanket rule saying all personal information must always physically remain inside the country.
Section 72 permits international transfers where certain requirements are satisfied, including where the recipient is subject to a law, binding corporate rules or agreement providing an adequate level of protection, as well as certain other circumstances specified by the Act.
So this:
textSouth African region = compliant Foreign region = non-compliant
is too simplistic.
You still need to understand the legal basis, contractual protections, downstream transfers and actual processing arrangement.
That said, choosing South African hosting where suitable can simplify risk management and may also be required by contractual, sector-specific or public-sector requirements beyond POPIA itself.
Human-in-the-loop is more than an AI safety feature
One of the most important POPIA provisions for agentic systems is Section 71.
It deals with decisions that result in legal consequences or substantially affect a person where the decision is based solely on automated processing intended to profile that person.
The Act provides limited exceptions, with safeguards that can include giving the person an opportunity to make representations and enough information about the underlying logic to do so.
This matters enormously for AI agents.
Consider an agent that automatically:
textrejects a loan rejects an applicant terminates an insurance claim flags an employee for disciplinary action changes someone's credit terms blocks a supplier for suspected fraud
That is very different from an agent that says:
textI found these six anomalies. Here is the evidence. An authorised human should review them.
For high-impact workflows, the second architecture is usually much easier to govern.
But the human must actually have authority and enough information to make the decision independently.
Putting a "Confirm" button after an AI recommendation is not meaningful human oversight if nobody is expected to challenge the recommendation.
A good agent should surface evidence, uncertainty and source references so the reviewer can understand why something was flagged.
This is also why auditability matters
A production AI agent should be able to answer:
textWho initiated this action? What purpose was declared? What information was accessed? Which systems were queried? Which model processed the request? What tools did the model request? Which tool calls were allowed or denied? What information was returned? Did a human approve the final action? When was the processing performed?
That does not mean storing every raw prompt forever.
It means designing an audit record deliberately.
For a tool call, something like this is often enough:
json{ "timestamp": "2026-09-21T08:41:03Z", "actor": "user_1948", "agent": "procurement_auditor_v3", "purpose": "supplier-risk-investigation", "tool": "search_invoices", "resource_scope": "supplier_2281", "decision": "allowed", "approval_required": false }
The goal is accountability without unnecessarily duplicating the personal information itself.
Watch Section 57 when agents combine data sources
This is a particularly interesting one for advanced agent systems.
POPIA's prior-authorisation provisions cover certain types of processing, including specific situations involving unique identifiers being used for a different purpose and linked with information processed by other responsible parties, criminal-behaviour information processed on behalf of third parties, credit reporting and certain international transfers involving special information or children's information.
That matters because one of the main selling points of AI agents is exactly this:
"Connect all of your scattered systems and let the agent find relationships humans cannot see."
Technically, that is powerful.
Legally, some implementations require much more careful analysis.
An anti-fraud agent correlating identity numbers across banking, procurement, supplier and external datasets deserves a different compliance review from a document summarisation agent.
Your risk classification should reflect that before the system reaches production.
Build deletion into the architecture before launch
Deletion becomes painful when an agent architecture contains:
textPostgreSQL Object storage Vector database Redis Conversation history Agent memory Prompt traces Analytics Backups Third-party processors
If personal information needs to be corrected or deleted, you need to know where derived copies exist.
That means maintaining lineage.
A useful pattern is to maintain a canonical record identifier:
textperson_18372
and attach it to derived artifacts:
textdocument chunks embeddings agent memories conversation records cached results generated reports
Now a deletion workflow can find related data programmatically instead of relying on someone to remember that the person's information was embedded six months ago.
POPIA requires organisations to support data-subject rights concerning personal information, including access and correction, and its purpose-specification rules also address retention.
Privacy operations become much easier when your database schema anticipated them.
Assume an agent will eventually be compromised
POPIA's security requirement is not simply "use encryption."
Section 19 requires appropriate and reasonable technical and organisational measures, including identifying foreseeable internal and external risks, establishing safeguards, verifying them and updating them as risks change.
For agents, foreseeable risks include:
- Prompt injection
- Data exfiltration through tools
- Excessive permissions
- Malicious documents
- Poisoned retrieval results
- Credential leakage
- Agents being manipulated into performing actions outside their intended purpose
That means the correct assumption is not:
textThe model will always follow the system prompt.
It is:
textThe model will eventually output something unexpected. The rest of the system must remain secure anyway.
Your tool layer should therefore enforce schemas, permissions, transaction limits and workflow rules independently of the model.
An AI agent asking to execute:
tstransferMoney({ account: "...", amount: 750000 })
should not make the transfer safe merely because the request originated from your own LLM.
The transaction service must still enforce normal controls.
Build a real incident path
When personal information has been accessed or acquired by an unauthorised person, POPIA's Section 22 breach notification requirements become relevant.
Your AI system therefore needs to support incident investigation.
If you discover a compromised service account, you should be able to identify:
- Which agent sessions used it
- Which records were retrieved
- Which external services received information
- Which users or data subjects may have been affected
Without good lineage and auditability, answering those questions after an incident can become extremely difficult.
POPIA compliance is an architecture problem
The mistake is treating POPIA as something the legal department applies after engineering is finished.
For agentic AI, many of the most important privacy decisions are software architecture decisions.
How retrieval permissions work.
How long memory lasts.
Whether prompts are logged.
Where embeddings are stored.
Whether an LLM request crosses borders.
Which tools an agent can call.
Whether high-impact actions require approval.
Whether a user can delete derived data.
Whether an auditor can reconstruct what happened.
Those choices are much harder to retrofit after thousands of documents have already been ingested.
The strongest architecture is therefore not one where the model is trusted with everything.
It is almost the opposite.
The model should receive the minimum context required, from authorised sources, for a defined purpose, through controlled interfaces, with auditable actions and human escalation where the consequences become significant.
That does not make AI agents less capable.
It is what makes them deployable inside real organisations.
This article is technical guidance, not legal advice. POPIA obligations depend on the organisation, data, sector and specific processing activity involved. For high-risk deployments, particularly those involving special personal information, children, credit decisions, criminal-behaviour information or complex cross-border processing, the technical architecture should be reviewed alongside qualified South African privacy counsel.