Subscribe to the Non-Human & AI Identity Journal

What is the difference between SDK monitoring and proxy-based monitoring for AI agents?

SDK monitoring gives developers detailed traces from code they control, while proxy-based monitoring observes traffic for third-party or browser-based agents they do not own. Most enterprises need both. The right choice depends on whether the control point is inside the application or at the network and session boundary.

Why This Matters for Security Teams

SDK monitoring and proxy-based monitoring solve different visibility problems, and treating them as interchangeable leaves blind spots in agent oversight. SDK instrumentation can expose prompts, tool calls, policy decisions, and execution context inside code that the organisation controls, which is valuable for debugging and governance. Proxy-based monitoring is better when the agent is external, browser-driven, or otherwise outside the codebase, because the control point shifts to network and session traffic.

That distinction matters because agentic systems increasingly operate with tool access, browser automation, and delegated actions that can create real business impact. Guidance from the OWASP Agentic AI Top 10 and the NIST AI Risk Management Framework both point to the need for observability, governance, and attack-path awareness, not just model performance. The practical issue is not which method is more advanced, but which one preserves evidence when something goes wrong.

In practice, many security teams encounter agent misuse only after an external workflow has already sent data, created records, or triggered actions rather than through intentional monitoring design.

How It Works in Practice

SDK monitoring is embedded into the application or agent runtime. It can capture structured telemetry such as prompts, completions, tool invocations, policy decisions, token usage, and correlation IDs. That makes it useful for developers, platform teams, and governance functions that need high-fidelity traces. It is also the easier place to enforce application-specific controls, such as input filtering, output validation, and allowlisted tool use.

Proxy-based monitoring sits outside the agent, usually between the client, browser, gateway, or egress path and the destination service. It can observe requests, responses, destinations, session patterns, and sometimes content depending on where TLS termination occurs. This makes it especially relevant for third-party agents, SaaS-connected workflows, and browser-based automation where SDK access is limited or impossible.

  • Use SDK monitoring when the agent code is owned, deployed, and updated by the organisation.
  • Use proxy-based monitoring when the agent is external, managed by a vendor, or operating through a browser or network boundary.
  • Prefer both when the workflow handles sensitive data, executes actions, or interacts with multiple tools.
  • Retain logs with enough context to support incident response, policy review, and model-risk investigations.

The control design should also account for AI-specific threat patterns, including prompt injection, data exfiltration through tool calls, and misuse of delegated authority. The MITRE ATLAS adversarial AI threat matrix is useful for mapping those attack paths, while the CSA MAESTRO agentic AI threat modeling framework is helpful for thinking about trust boundaries and orchestration risk. These controls tend to break down when traffic is heavily encrypted, agent actions are stitched across multiple unmanaged services, and telemetry cannot be correlated to a single identity or session.

Common Variations and Edge Cases

Tighter monitoring often increases latency, storage cost, and privacy review overhead, so organisations must balance forensic depth against operational friction. There is no universal standard for how much of an agent interaction should be recorded yet, especially when prompts or responses contain personal data, source code, or regulated content.

SDK monitoring can be undermined if developers bypass the library, disable instrumentation in production, or introduce inconsistent logging across services. Proxy-based monitoring can miss important context if TLS termination happens too late, if traffic is hidden inside tunnels, or if the agent uses direct API calls that evade the proxy path. Browser automation adds another complication because session state, human interaction, and agent actions may be mixed together.

For high-risk environments, best practice is evolving toward layered visibility: SDK telemetry for internal fidelity, proxy telemetry for boundary enforcement, and policy controls that define what must be logged, masked, or blocked. That approach is especially important when agents can invoke secrets, create transactions, or operate under delegated credentials. It is also the point where identity and NHI governance intersect, because the monitoring model should reflect which software identity actually holds the authority to act.

For additional context on governance expectations, practitioners often pair agent monitoring design with the OWASP Top 10 for Agentic Applications 2026 and the same NIST AI RMF guidance used for broader AI oversight. In regulated workflows, the right answer is rarely one mechanism alone; it is the combination that preserves accountability without creating an unmanageable logging burden.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10, MITRE ATLAS and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Agentic AI Top 10 A3 Agent visibility helps reduce tool abuse and unsafe autonomous actions.
NIST AI RMF GOVERN Monitoring supports governance, traceability, and accountability for AI systems.
MITRE ATLAS ATLAS maps adversarial AI paths that monitoring should help detect.
CSA MAESTRO MAESTRO frames trust boundaries and orchestration risks in agentic AI.
NIST CSF 2.0 DE.CM-1 Continuous monitoring of assets and traffic supports detection of anomalous agent activity.

Instrument agent actions and tool calls so suspicious behavior can be detected and constrained.