All posts

LGPD for Planner-Executor Agents

When LGPD compliance is required, an offboarded contractor still has a CI job that spins up temporary compute, and the job uses a service account with a static token that can read and write any database. The token was never rotated after the contract ended, and no one knows which queries the job executed before it was stopped. In another team, an over-scoped token is baked into a deployment pipeline, letting a planner-executor agent create, modify, and delete records across multiple services wit

Free White Paper

LGPD (Brazil): The Complete Guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free. No spam. Unsubscribe anytime.

When LGPD compliance is required, an offboarded contractor still has a CI job that spins up temporary compute, and the job uses a service account with a static token that can read and write any database. The token was never rotated after the contract ended, and no one knows which queries the job executed before it was stopped. In another team, an over-scoped token is baked into a deployment pipeline, letting a planner-executor agent create, modify, and delete records across multiple services without any human review.

Both situations illustrate a common reality: planner-executor agents often run with broad, standing credentials and without a record of what data they touched. When a data-protection law such as Brazil’s LGPD demands evidence of consent, purpose limitation, and accountability, those gaps become compliance liabilities.

Why LGPD matters for planner-executor agents

LGPD requires organizations to demonstrate that personal data is accessed only for legitimate purposes, that access is logged, and that any unnecessary personal information is masked or redacted. The regulation also expects prompt revocation of access when a role changes and the ability to reconstruct who did what, when, and why.

Planner-executor agents, by design, automate decisions and act on behalf of users. If they connect directly to a database or an internal API with a static credential, three gaps appear:

  • There is no real-time check that the request aligns with the declared purpose.
  • Responses containing personal data flow back to the agent unfiltered, violating the masking requirement.
  • Every command runs without an audit trail, making it impossible to prove compliance to auditors.

What a proper control model looks like

The first step is to enforce identity-aware provisioning. A non-human identity (service account or OIDC client) is granted the minimal set of scopes needed for the specific job. That setup decides who the request is, but on its own it does not prevent misuse.

Next, the request must travel through a dedicated data path where policy can be applied. The data path is the only place enforcement can happen. Without a gateway in that path, the request reaches the target directly, still lacking audit, masking, or just-in-time approval.

How hoop.dev creates LGPD-ready evidence

hoop.dev sits in the data path between the planner-executor identity and the target service. Because hoop.dev proxies the wire-level protocol, it can enforce every LGPD requirement without exposing credentials to the agent.

When a request arrives, hoop.dev validates the identity token, checks group membership, and determines whether the operation is allowed for that purpose. If the request exceeds the declared scope, hoop.dev blocks the command before it reaches the database.

Continue reading? Get the full guide.

LGPD (Brazil): Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

For queries that return personal data, hoop.dev applies inline masking in real time, ensuring that only the fields required for the automation remain visible to the agent. The masking happens inside the gateway, so the agent never sees raw sensitive values.

Every session is recorded by hoop.dev. The recording includes the full command stream, the identity that initiated it, and the masking decisions applied. This audit log satisfies LGPD’s accountability clause and gives auditors a replayable trail.

When a high-risk operation is detected, hoop.dev can trigger a just-in-time approval workflow. A designated reviewer receives the request details, approves or denies it, and hoop.dev forwards the decision to the target. This workflow enforces purpose limitation and provides documented evidence of human oversight.

All of these enforcement outcomes, blocking, masking, recording, and approval, exist only because hoop.dev sits in the data path. Removing hoop.dev would revert the system to the original state where the agent talks directly to the service with no guardrails.

Getting started with hoop.dev for LGPD compliance

Start by deploying the hoop.dev gateway in the same network segment as your databases or internal APIs. The official getting-started guide walks you through a Docker-Compose deployment, OIDC configuration, and how to register a connection for a planner-executor agent.

Once the gateway is running, define the minimal scopes for each service account in your identity provider. hoop.dev will read those scopes from the token and enforce them at runtime.

Finally, enable the LGPD-focused features in the learn section: session recording, inline masking rules, and just-in-time approval policies. The documentation provides policy-language examples that map directly to LGPD’s purpose-limitation and data-minimization requirements.

FAQ

Does hoop.dev store personal data itself?
No. hoop.dev only records the metadata of each session (who, when, what) and the masked result set. Raw personal values are never persisted.

Can existing CI pipelines use hoop.dev without code changes?
Yes. Because hoop.dev proxies standard protocols, pipelines can point their database client or HTTP client at the gateway address and continue using the same commands.

How does hoop.dev help during an LGPD audit?
Auditors can replay any session, see the exact masking rules applied, and verify that each high-risk operation received documented approval. This evidence satisfies the audit-trail and accountability sections of LGPD.

Explore the open-source code on GitHub to see how the gateway is built and contribute enhancements for your compliance needs.

Open source

Save the open-source gateway for agent data access

Hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.

Star and save the repo →More posts