AI Agents and Personal Data in Morocco: Complying with Law 09-08 and the CNDP
An AI agent handles names, phone numbers and sometimes sensitive data. The Law 09-08 points to know before you deploy one, and a checklist to work through with your provider.

An AI agent that answers your customers on WhatsApp or on your website inevitably handles personal data: name, phone number, address, message content, and sometimes health or financial information. In Morocco, this processing falls under Law 09-08 on the protection of individuals with regard to the processing of personal data, overseen by the CNDP (the national commission for the control of personal data protection). Here are the points to know before putting an agent into production.
Law 09-08 principles applied to an AI agent
- A clear purpose: the agent collects data for a defined use (answering, booking, confirming an order), not "just in case".
- Adequate, limited data: it only asks for what the task needs.
- A defined retention period: conversations aren't kept forever.
- Security: restricted access, protected accounts, access logs.
- Informing people: customers know who processes their data, why, and how to exercise their rights.
- Individuals' rights: access, correction and objection, with a simple procedure to respond.
Declaration or authorization with the CNDP
As a rule, personal data processing must be declared to the CNDP before it starts. Some processing needs prior authorization, in particular processing of sensitive data such as health data, and transfers to a country that doesn't offer an adequate level of protection. The CNDP publishes its notification procedures and forms on its website.
If your agent extends processing you've already declared (your customer file, for example), check whether adding a new channel, a new provider or a transfer abroad requires an update to your declaration.
The key issue: transferring data abroad
Most AI models and many cloud services are hosted outside Morocco. Sending your customers' messages to them is a transfer of data abroad. Law 09-08 only allows it to countries with adequate protection; otherwise CNDP authorization is required. Plan for this when choosing the architecture, not after launch.
- Identify where the AI model, the database, the automation tool and the messaging service are hosted.
- Check the model provider's terms: reuse of data for training, retention period, location.
- Reduce what leaves the country: don't send ID numbers or card numbers to the model, for example.
- Document these choices: you'll need them for your declaration and to answer any CNDP question.
Sensitive data: maximum caution
A clinic, lab or pharmacy using an AI agent may process health data, which is classed as sensitive. The agent should then stick to logistics (appointments, opening hours, documents to bring) and never give a diagnosis. Practical rules are in AI agents for medical clinics in Morocco.
Pre-launch checklist
- Map the data: what the agent collects, where it goes, who can access it.
- Remove unnecessary fields and mask sensitive data before it reaches the model.
- Choose providers with clear commitments (no training on your data, limited retention).
- Inform customers: one line in the agent's first message and a section in your privacy policy.
- Plan the hand-over to a person and how you'll handle access or deletion requests.
- Set a retention period for conversations and apply it automatically.
- Update your CNDP declaration, or request authorization if your case requires it.
- Put contracts in place with subcontractors: developer, host, model provider.
What about staff already using ChatGPT?
An agent built for the business is often safer than staff pasting customer data into consumer tools. Good internal practice is summarised in ChatGPT at work: protecting company data.
An AI agent built to comply
Our AI agents service builds these points in from day one: data mapping, minimisation, provider choice, a customer notice and a procedure for customer requests. We hand over the documentation you need for your CNDP filing. Tell us about your project.
Frequently asked questions
Does Law 09-08 apply to an AI agent?
Yes, as soon as it processes personal data (name, number, messages, address). Law 09-08 principles apply: clear purpose, limited data, retention period, security, transparency and individuals' rights.
Does a chatbot have to be declared to the CNDP?
As a rule, the processing it performs must be declared, or added to an existing declaration that you update. Some cases, such as health data or a transfer to a country without adequate protection, require prior authorization.
Can we use an AI model hosted abroad?
It's a transfer of data abroad: allowed to a country with adequate protection, or with CNDP authorization. Plan for it and limit the data sent.
Does this article replace legal advice?
No. It gives general guidance. For your case, check cndp.ma and consult a specialised lawyer if needed.


