Security Model

April 26, 2026 · View on GitHub

Overview

Agent-SRE is a monitoring and reliability library — it observes agent behavior, it does not control execution. This document describes the security boundaries, threat model, and best practices.


Threat Model

What Agent-SRE Protects Against

ThreatProtectionComponent
Cost explosionPer-task/daily/monthly budget limits with auto-throttleCost Guard
Silent degradationSLO breach detection with error budgetsSLO Engine
Cascade failureCircuit breakers on failure thresholdsIncident Manager
Tool driftSchema fingerprinting detects MCP server changesMCP Drift Detection
Unsafe outputsLLM-as-Judge safety evaluationEvaluation Engine
HallucinationRules-based + LLM-as-Judge hallucination detectionEvaluation Engine
Uncontrolled deploymentStaged rollouts with manual rollbackProgressive Delivery

What Agent-SRE Does NOT Protect Against

ThreatWhyMitigation
Prompt injectionNot an input filterUse Agent OS policy enforcement
Data exfiltrationObserves, doesn't interceptUse Agent OS kernel-level controls
Identity spoofingNo identity layerUse AgentMesh for identity & trust
Network attacksLibrary, not a serviceStandard network security practices
LLM model vulnerabilitiesMonitors outputs, not model internalsModel-level security tools

Security Boundaries

Data Handling

  • No PII storage: Agent-SRE stores metrics (floats, counts, timestamps), not user data
  • No network calls by default: All processing is in-memory unless you configure:
    • Webhook alerting (outbound HTTPS to configured URLs)
    • OTEL export (outbound to configured collector)
    • Langfuse export (outbound to configured endpoint)
  • No external dependencies for core: SLOs, cost guard, incidents work with zero network access

Credential Management

  • Webhook URLs: Store in environment variables, never in code
  • API tokens: Use environment variables or secret managers
  • No credential storage: Agent-SRE does not persist credentials
import os
from agent_sre.alerts import AlertManager, ChannelConfig, AlertChannel

manager = AlertManager()
manager.add_channel(ChannelConfig(
    channel_type=AlertChannel.SLACK,
    name="ops",
    url=os.environ["SLACK_WEBHOOK_URL"],  # From environment
))

Integration Security

Agent OS Integration

When used with Agent OS, policy violations are reported as SLI signals. Agent OS provides the enforcement; Agent-SRE provides the monitoring.

AgentMesh Integration

When used with AgentMesh, trust scores flow into SLIs. AgentMesh handles identity and authentication; Agent-SRE monitors reliability of the trust infrastructure.

MCP Drift Detection

MCP drift detection works by comparing tool schema snapshots. It does NOT:

  • Connect to MCP servers (you provide snapshots)
  • Modify tool schemas
  • Intercept tool calls

It DOES:

  • Detect when schemas change between baseline and current
  • Classify changes by severity (info/warning/critical)
  • Alert when breaking changes are detected

Attack Vectors & Mitigations

1. Metric Poisoning

Threat: An attacker records false SLI values to hide degradation.

Mitigation:

  • Use immutable audit trails (Agent OS integration)
  • Cross-validate with external observability (OTEL, Langfuse)
  • Set up anomaly detection on SLI patterns

2. Alert Suppression

Threat: Disabling webhook alerting to hide SLO breaches.

Mitigation:

  • Monitor alert channel health separately
  • Use multiple independent channels
  • Set up heartbeat checks for alert delivery

3. Budget Bypass

Threat: Circumventing cost guard limits.

Mitigation:

  • Cost Guard auto-throttle is in-process; cannot be bypassed from outside
  • Use kill_switch_threshold for hard stops
  • Monitor org_monthly_budget independently

4. Evaluation Evasion

Threat: Crafting outputs that pass evaluation but are wrong.

Mitigation:

  • Use multiple evaluation criteria (correctness + hallucination + safety)
  • Implement LLM-as-Judge with stronger models than the agent
  • Cross-validate with human evaluation on a sample

Best Practices

  1. Defense in depth: Use Agent-SRE (monitoring) + Agent OS (enforcement) + AgentMesh (identity) together
  2. Multiple alert channels: Configure at least two independent channels
  3. Regular chaos testing: Run chaos experiments to verify resilience
  4. Budget limits from day one: Set cost guardrails before deploying any agent
  5. MCP drift monitoring: Baseline all MCP servers and check on every deployment
  6. Evaluation on every task: Run at least safety + hallucination checks on all agent outputs