In a well‑guarded environment, every nested agent runs under explicit approval, its actions are recorded, and any data it returns is automatically scrubbed of secrets. No hidden copy of a request slips past the control plane, and security teams can replay any session to verify that no shadow AI has acted on their behalf. That is the target state for organizations that rely on AI‑driven automation across multiple services.
Why nested agents become a shadow ai problem
Today many teams stitch together AI assistants, scripts, and micro‑services into chains of nested agents. An outer agent receives a user query, decides to call an internal tool, and then hands the result to a second agent that formats a response. The hand‑off usually happens through direct network calls or shared service accounts. Because the inner call bypasses any central policy check, the second agent can act on behalf of the user without its actions being logged or reviewed. The result is a classic shadow ai scenario: an autonomous component makes decisions, accesses databases, or issues commands while remaining invisible to auditors.
This arrangement leaves three critical gaps. First, the identity that initiates the chain is often a generic service account, so the system cannot attribute actions to a real user. Second, the data path between agents is a direct TCP or HTTP link; no gateway inspects the payload, so sensitive fields travel unmasked. Third, there is no built‑in approval workflow, so risky operations, such as dropping a table or deleting a namespace, can be executed without human oversight.
Current practice leaves the data path unchecked
Even when organizations adopt strong identity providers and enforce least‑privilege roles, the enforcement point remains at the edge of the network. The request reaches the target resource directly, and the resource itself decides whether to honor it. No layer in the middle records the exact query, masks credit‑card numbers in a response, or pauses execution for a manager’s sign‑off. As a result, the organization cannot prove that a particular shadow ai instance never accessed a protected table, nor can it demonstrate that a suspicious command was blocked before execution.
Putting the gateway in the data path
hoop.dev solves the problem by becoming the only place where enforcement can happen. It sits between the outer agent and the inner target, acting as a Layer 7 identity‑aware proxy. When a nested agent initiates a connection, hoop.dev verifies the caller’s OIDC token, determines the user’s groups, and then applies a policy that is evaluated on every protocol message.
Because hoop.dev is the data path, it can enforce three outcomes that were impossible before:
