Manually auditing a privacy policy against GDPR and the ePrivacy Directive is slow, inconsistent, and easy to let drift between releases. This blueprint runs an AI agent that fetches a website's privacy policy and cookie notice from live URLs, then grades them element by element against GDPR transparency obligations (Articles 12, 13, 14), data subject rights (Articles 15-22), international transfer safeguards (Chapter V), and ePrivacy cookie consent rules, returning a structured Markdown report with a compliance score and a prioritized remediation list.
How it works
- The
analyze_policy task (io.kestra.plugin.ai.agent.AIAgent) takes the policy URL, cookie notice URL, and analysis scope as inputs, then runs a GDPR specialist systemMessage with a low temperature (0.1) for consistent, auditable output.
- A
io.kestra.plugin.ai.retriever.TavilyWebSearch content retriever lets the agent crawl and read both live URLs (maxResults: 5) instead of relying on stale training data.
- The model is
io.kestra.plugin.ai.provider.MistralAI (Mistral Large), an EU-based model that suits a data sovereignty posture for legal workflows; YAML comments show how to switch to io.kestra.plugin.ai.provider.Ollama for fully local, no-API-call operation.
- The
log_analysis task (io.kestra.plugin.core.log.Log) prints the agent's textOutput, so the full report is visible in the execution logs.
What you get
- An Article 13 disclosure checklist marking each required element PRESENT, ABSENT, or INSUFFICIENT.
- A cookie and consent assessment against EDPB guidelines and the CJEU Planet49 ruling (no pre-ticked boxes).
- A readability assessment against the Article 12 plain-language standard.
- A red-flag list covering dark patterns, overly broad data sharing, and blanket consent.
- An overall A-F compliance rating with a prioritized fix list.
Who it's for
- Legal and privacy teams auditing their own notices.
- DPOs running periodic compliance reviews.
- Privacy consultants benchmarking client websites.
- Compliance and risk teams screening policies at scale.
Why orchestrate this with Kestra
A standalone LLM script cannot schedule itself, retry a flaky web crawl, or keep an audit trail. With Kestra you get event and schedule triggers (re-run on every policy change or on a quarterly cadence), automatic retries on transient API or search failures, full execution lineage and logs for every audit, and a declarative YAML definition you can version in Git. The AI provider and Tavily retriever have no built-in scheduler, retry policy, or run history of their own: Kestra supplies all of that around them.
Prerequisites
A running Kestra instance and accounts for Mistral AI and Tavily.
Secrets
MISTRAL_API_KEY: API key from the Mistral AI console.
TAVILY_API_KEY: API key from Tavily for web crawling and search.
Quick start
- Add
MISTRAL_API_KEY and TAVILY_API_KEY as secrets in your Kestra instance.
- Import this blueprint into a namespace.
- Execute it, supplying the
privacy_policy_url, optional cookie_policy_url, and an analysis_scope.
- Read the compliance report in the
log_analysis task output.
How to extend
- Narrow
analysis_scope to transparency only, cookie focus, data subject rights, or international transfers.
- Add a notification task to post failing scores to Slack or email.
- Add a
Schedule trigger to re-audit policies on a recurring cadence.
- Swap the provider to
io.kestra.plugin.ai.provider.Ollama for an air-gapped, local-only run.
- Loop the agent over a list of client URLs to benchmark a portfolio.
Links