docs

What agentshield does

The problem agentshield addresses, its end-to-end pipeline, and the components that make it work.

The problem

A Kubernetes cluster with a service mesh, a CNI, and an AI gateway has security controls in many places. NetworkPolicies, CiliumNetworkPolicies, Istio AuthorizationPolicies and PeerAuthentications, Gateway routes, and AWS Security Groups each describe part of who can reach what. No single API answers questions such as:

  • A workload just started talking to a service it never called before. Is that new path allowed by policy, or did a policy disappear?
  • A change removed the only policy that governed a Pod. What can now reach it?
  • A control-plane workload is sending traffic to a public address it has never contacted. Is that expected?

Lateral movement looks like ordinary traffic and ordinary configuration changes. Spotting it means joining inventory, policy, and observed traffic from several providers and then reasoning about the result with evidence.

The approach

AgentShield does this in four steps:

  1. Discover. Plugins read provider state (Kubernetes objects, Istio and Cilium CRDs, Gateway API, AWS EC2) and translate it into graph assertions. Each resource gets a stable identity based on an immutable provider key, such as a Kubernetes UID qualified by cluster ID.
  2. Observe. A telemetry pipeline receives traffic records (OTLP logs from an existing OpenTelemetry Collector, or AWS VPC Flow Logs through Firehose), writes the raw events to JSONL or ClickHouse, and adds per-minute traffic summaries to the graph.
  3. Detect. Every graph change is recorded in an ordered change feed. Detectors compare the previous and current graph and emit signals: new exposure, a lost policy, a changed security setting, a new RBAC binding, or a workload reaching a destination it never reached before. Operators can add CEL rules, and a model can draft a rule for each Deployment for an operator to approve. An active rule’s match becomes a finding directly.
  4. Investigate and remediate. When a novelty signal fires, a language model investigates it through read-only graph queries (served over MCP), from a sampled queue that bounds model spend. AgentShield validates the model’s answer against the graph before it records a finding. A finding can carry suggested remediations. A user must explicitly prepare and approve a remediation before AgentShield changes anything in the cluster.

The graph is provider-neutral. Detectors and the model read a common security vocabulary (see security semantics) instead of provider-specific fields, so a rule about “lost governance” works whether the policy was a Kubernetes NetworkPolicy, a Cilium policy, or an AWS Security Group.

Pipeline

This is the end-to-end flow.

flowchart LR
    subgraph providers["Providers"]
        K8S["Kubernetes API<br/>(incl. Istio, Cilium,<br/>Gateway API CRDs)"]
        AWS["AWS EC2<br/>+ CloudTrail via SQS"]
        LOGS["OTLP logs,<br/>VPC Flow Logs"]
    end

    K8S --> SRC["Source plugins<br/>kubernetes, aws"]
    AWS --> SRC
    SRC -->|"collections"| SEM["Semantic plugins<br/>istio, cilium, agentgateway"]
    LOGS --> TEL["Telemetry pipeline<br/>mappers, raw sink, rollups"]
    TEL --> RAW[("JSONL or<br/>ClickHouse")]

    SRC -->|"contributions"| PUB["Publication<br/>(PostgreSQL)"]
    SEM -->|"contributions"| PUB
    TEL -->|"rollup contributions"| PUB

    PUB --> API["Current graph<br/>HTTP API and web UI"]
    PUB -->|"change feed"| DET["Detectors<br/>built-in + CEL rules"]
    DET -->|"active rule matches"| FIND["Findings"]
    DET -->|"novelty signals,<br/>sampled queue"| LLM["Model investigation<br/>(MCP graph tools)"]
    LLM -->|"validated"| FIND
    FIND --> REM["Remediation<br/>prepare, approve, execute"]
    REM -.->|"provider writes<br/>after approval"| K8S

Components

ComponentCodeWhat it doesDetails
Discovery pluginsplugins/*, pkg/discoveryRead provider state and publish graph assertionsPlugins
Graph compilerpkg/graphValidates assertions, derives stable IDs, and builds the graph deterministicallyData model
State storepkg/stateStores contributions, versions, the current graph, the change feed, findings, and rules in PostgreSQLPublication and storage
Telemetry pipelinepkg/telemetryReceives traffic records, writes raw events, and maintains per-minute graph rollupsTelemetry
Detectorspkg/detectorTurn graph changes into signals using built-in checks, CEL rules, and Deployment rulesDetection rules
Detection and investigationpkg/reasoningReads the change feed, records signals and rule findings, and queues novelty signals for a sampled model investigation whose validated answers become findingsChange feed and reasoning
Remediationpkg/remediation, plugin remediation.go filesPlans, dry-runs, executes, and verifies approved provider changesRemediation
HTTP API and UIpkg/api, ui/Serves the graph, findings, and remediation workflow; embeds the React UIArchitecture overview

What AgentShield does not do

  • It does not prove that a policy is enforced. Declared configuration and controller status are recorded as declared or observed, not effective. See security semantics.
  • It does not apply changes on its own. Reasoning, detection, and graph publication never execute a remediation.
  • It does not authenticate API callers. See the security model.

Next: the glossary defines the terms used across the docs, and the data model explains identities and assertions.