Wrapper library instrumentation works by inserting monitoring code inside an application, typically at the point where an SDK calls out to a model provider or tool. Every request that passes through the instrumented SDK call is visible, including the prompt, the model invoked, the tool parameters, and the response. This approach is accurate for the code paths it covers because it operates inside the application process, with full access to call context before any network transmission occurs. Proxy-based monitoring takes a different approach. Instead of modifying application code, a proxy sits on the network path between the application and the destination endpoint, inspecting traffic as it passes. This allows a single control point to observe calls from many applications and languages without code changes, but only if that traffic is actually routed through the proxy and is observable at the network layer. These are structurally different interception points, one at the application layer and one at the network layer, and that difference is the direct source of their respective blind spots.
Wrapper Library vs Proxy: Structural Coverage
Where Wrapper Libraries Lose Visibility
A wrapper library can only see what it instruments. Any code path that reaches a model or tool without calling through the instrumented SDK is architecturally invisible to it, not merely under-logged. Coverage degrades further as an environment grows, since every uninstrumented variant is a gap by default rather than an exception.
- A raw HTTP request issued directly to a model provider's API, bypassing the SDK entirely.
- A different SDK version or fork that has not received the same instrumentation.
- A third-party or custom integration implementing its own client instead of the sanctioned SDK.
- Tool-call logic embedded directly in agent code, invoked without passing through the monitored library layer.
Where Proxies Lose Visibility
A proxy can only see what reaches its network vantage point and can be meaningfully inspected once it does. Traffic that never traverses that path, or that cannot be decrypted at that path, is structurally invisible rather than simply unmonitored. These failure modes are not edge cases; they occur whenever an agent framework supports local models, whenever a tool runs in-process rather than as a remote service, or whenever network configuration permits an alternate route.
- End-to-end encrypted communication with no trusted interception point available to the proxy.
- Local or on-device model inference, which never generates network traffic in the first place.
- Intra-process or local socket communication between an agent and a tool on the same host.
- Non-HTTP protocols the proxy is not built to parse.
- Direct connections to alternate IP addresses or DNS paths that route around the configured proxy.
Why the Gaps Compound Into Shadow AI
Because wrapper libraries and proxies intercept at different layers, their blind spots are largely non-overlapping. A raw HTTP call invisible to a wrapper is often visible to a well-configured proxy, and an intra-process tool call invisible to a proxy may still be visible to a wrapper if that call site happens to be instrumented. In practice, however, most enterprises rely on one approach or the other, not both in combination, and both controls share the same precondition: traffic must actually pass through the instrumented path to be seen. Without an enforced mandate requiring SDK use or proxy routing, either control can be bypassed simply by not using it. Shadow AI activity emerges in exactly this residual space, traffic that exists in the environment but falls outside every control point the organization relies on for policy enforcement and audit logging. Treating either approach as sufficient in isolation understates the actual exposure.