Lesson 2 of 16 · 8 min read
Anatomy of an AI Security Agent Platform
In this lesson
TL;DR: Any AI security agent, whether it scans code, triages alerts or tests a web app, is a model inside eight other parts: a harness that runs the plan-act loop, tools reached through MCP servers or APIs, identities and credentials scoped to the task, a sandbox for anything it executes, oracles that check its claims, memory, a policy layer that decides what needs a human, and an audit trail. The model gets the attention; the other eight parts decide whether the system is safe and useful. Security agents add one hard constraint: they always read hostile input (attacker-written code, emails, logs and web pages), so each part must still hold when the model has been steered.
Before you read
Pick an answer before you read further. The lesson below explains it, and guessing first, right or wrong, helps the explanation stay with you.
1Name four parts of an AI agent platform other than the model.
The reference architecture
Every arrow out of the harness passes the policy layer and lands in the audit trail.
Task
repo, alert, target
Harness
plan, act, observe
Policy gate
allow, ask, deny
Tools
MCP, APIs, CLIs
Oracle
checks claims
Evidence
finding, verdict, PR
Cross-cutting parts
Identity
- Scoped credentials per task, short-lived, injected outside the model
Sandbox
- Process, gVisor, microVM; egress allowlist
Memory
- Learned exceptions need owners
Audit trail
- Every call, input hash, decision
Read the figure as a request path. A task arrives: a repository to scan, an alert to triage, a target to test. The harness asks the model what to do next, the policy gate decides whether that action may run, the tool runs inside a sandbox with credentials the model never sees, and an oracle checks any claim before it becomes a finding. Everything lands in the audit trail. Memory feeds context back into later runs.
The parts, and what each must survive
1. The model
The model reads, plans and writes. For security work the choices are a general frontier model, a cyber-specialised model behind a vetted-access programme, or an open-weight model you host yourself, and the choice also decides where your data goes. General models carry conservative safeguards on offensive cyber work; Anthropic, OpenAI and Google each run access programmes for defenders who need more (checked November 2026). Model choice gets its own lesson; the point here is that it is one part of nine, and replaceable. Products such as Palo Alto Networks' Cortex AgentiX already let customers choose the model per task.
2. The harness
The harness is the loop: build the prompt, call the model, parse the tool call, run it, append the result, repeat until done or out of budget. It owns step limits, token and cost budgets, timeouts and retries. Harnesses are where determinism lives: Horizon3.ai describes its NodeZero web testing as a model scoring each action's risk and deterministic code enforcing the result. Frameworks such as the Claude Agent SDK, the OpenAI Agents SDK, Google's Agent Development Kit, Microsoft Agent Framework and AWS Bedrock AgentCore provide harnesses with hooks for the parts below.
3. Tools and connectors
Tools are how the agent touches the world: run Semgrep, query the SIEM, fetch an EDR process tree, open a pull request, send an HTTP request to a test target. The Model Context Protocol (MCP) has become the common way to expose them, and most security vendors now ship MCP servers: Google's open-source servers for SecOps, Threat Intelligence and Security Command Center; Microsoft's hosted Sentinel MCP server; CrowdStrike's; Semgrep's (now built into the semgrep binary); Snyk's; GitHub's; Wiz's. Two design rules matter more than the protocol:
- Read tools and write tools are different grants. CrowdStrike's open-source
falcon-mcphas a--read-onlyflag and tool allowlists, and GitHub's MCP server has a read-only mode and a "lockdown" mode that limits content from authors without push access in public repositories. Start every integration read-only. - Tool output is untrusted input. A README, an issue, an alert's command line or a scanned web page returned by a tool goes straight into the model's context.
4. Identity and credentials
Every tool call acts as someone. The weakest design gives the agent a long-lived admin token in an environment variable. Better designs give the agent its own identity (Microsoft's Entra Agent ID, Google's Agent Identity, AgentCore Identity), scope credentials per task, and keep them outside the model's reach. Anthropic describes Claude Code on the web routing git through a proxy that checks a scoped credential and the operation (for example, push only to the configured branch) and only then attaches the real token. The model asks; something it cannot read decides and signs.
The MCP authorisation spec (revision 2026-07-28) treats an MCP server as an OAuth 2.1 resource server: clients send a resource indicator and use PKCE, servers validate the token's audience and must not pass tokens through to upstream APIs.
5. The sandbox
Anything the agent executes (a build, a proof of concept, a script, a malware sample) runs somewhere it cannot hurt the host or reach what it should not. The options range from OS process sandboxes (Seatbelt on macOS, bubblewrap on Linux, as Claude Code and Codex use locally) through gVisor's user-space kernel to Firecracker microVMs and full VMs. Egress control is as important as the isolation boundary: Codex cloud blocks internet access during the agent phase by default, and Claude Code's sandbox proxy starts with an empty domain allowlist. Anthropic's containment write-up (May 2026) adds a lesson worth remembering: an allowlisted domain is a capability grant, because data can leave through any service the agent is allowed to reach.
6. Oracles
Oracles turn the model's claims into evidence: a sanitizer crash, a replay against labelled telemetry, a read-only API call, a non-destructive proof inside the rules of engagement. They are the most important quality part and the most often missing. Verifying AI security output covers them.
7. Memory
Agents that remember across runs (learned exceptions, environment notes, prior verdicts) improve and also accumulate risk: a wrong or planted memory changes every later decision. Microsoft's Phishing Triage Agent turns analyst feedback into a "lesson" only when the analyst explicitly opts in, and an administrator can reject lessons. Memory needs provenance, owners and expiry, the same as suppression rules.
8. Policy and approval
The policy layer decides, per action, allow, ask or deny, and it must sit outside the model. The Claude Agent SDK documents a fixed evaluation order (hooks, then deny rules, ask rules, the permission mode, allow rules, and finally an approval callback), and deny rules hold even in its most permissive mode. AWS AgentCore Policy intercepts every tool call at its gateway and evaluates deterministic rules. Cortex AgentiX requires manual approval for actions marked sensitive. The useful questions are which actions are approval-gated, who approves, and how many approvals per day a reviewer faces, because approval fatigue turns a gate into a formality: Anthropic reported users approved about 93 percent of permission prompts.
9. The audit trail
Every model call, tool call, input reference, policy decision and output should be recorded with a correlation ID. OpenTelemetry's GenAI semantic conventions define agent and tool spans (still at Development status in November 2026), and keep prompt and response content opt-in because it is likely to contain sensitive data. MCP's 2026-07-28 revision standardises W3C trace context in requests, so a trace can follow a call from the agent through the MCP server. Without the trail you cannot sample decisions for audit or reconstruct what happened after a bad one.
The constraint that makes security agents different
A coding assistant mostly reads its own team's code. A security agent's inputs are chosen by the adversary: the malicious package it analyses, the phishing email it triages, the command line in the EDR alert, the web application it tests, the pull request from an outside contributor it reviews. Documented incidents show the pattern. Invariant Labs showed in May 2025 that a malicious public GitHub issue could steer an agent with GitHub MCP access into copying private repository data into a public pull request. Anthropic limits the intended use of its security-review GitHub Action to trusted pull requests and documents prompt-injection exposure as a limitation. In February 2026, an AI issue-triage bot with shell access in Cline's GitHub workflows became the first step in a supply-chain compromise that published a malicious package version.
So each part must hold when the model has been steered:
Model is the boundary
Reads hostile issue
instructions inside
Broad token
all repos, write
Ambient authority
Acts
copies private data
Outcome, unsafe: Steered model, real damage
Nothing outside the model said no.
Environment is the boundary
Reads hostile issue
same instructions
Scoped token
one repo, read
Write needs approval
Policy and egress
deny, logged
Outcome, safe: Steered model, no damage
The attempt shows up in the audit trail.
Anthropic's containment guidance puts it in one line: design for containment at the environment layer first, then steer behaviour at the model layer. The UK NCSC makes the same argument from the other side: models do not enforce a boundary between instructions and data, so use deterministic, non-model controls and drop privileges while processing untrusted input.
Using the anatomy
Reviewing a design. Walk the nine parts and ask, for each, what happens if the model is steered. Most findings land on credentials (too broad, inside the sandbox), egress (open by default) and policy (inside the prompt rather than the harness).
Buying a product. The same walk becomes the question list: what can it reach, as whom, where does it execute, what checks its output, what does it remember, what needs approval, and what can we audit? Vendors who answer with architecture are easier to trust than vendors who answer with model names. The free tool pages on AI code-security agents, AI SOC agents and AI penetration testing agents apply this walk to the products on the market in late 2026.
Deploying as an FDE. The parts map to the engagement: tools and credentials are the integration work, policy is the autonomy agreement with the customer, oracles are the evaluation, and the audit trail is what the customer's security team will ask to see first.
Misconceptions interviewers listen for
"Pick the best model and the rest is plumbing." The plumbing is where the security properties live. Two products on the same model can differ completely in what a steered agent can do.
"The system prompt tells it not to touch production." Instructions to the model are not a control. The credential, the sandbox and the policy gate are.
"MCP is secure, so the integration is secure." MCP standardises how tools are described and authorised. It does not decide which tools an agent should have, or make tool output trustworthy.
"Human approval makes it safe." Only if approvals are rare enough to be read. A gate approved 93 percent of the time by habit is a speed bump.
How this shows up in interviews
Expect "design an agent that triages our alerts", "architect an AI code-review bot for pull requests from outside contributors", "a vendor wants MCP access to our SIEM: what do you check", and "what would you log for an agent platform". Strong answers draw the parts, put the trust boundary at the environment rather than the model, separate read and write grants, keep credentials out of the model's reach, and name the oracle for the agent's output.
Say it in 30 seconds: "An AI security agent is a model inside eight other parts: a harness that runs the loop, tools over MCP or APIs, scoped identities and credentials, a sandbox with egress control, oracles that check claims, memory, a policy layer outside the model that allows, asks or denies each action, and an audit trail. Security agents always read hostile input, so I design every part to hold when the model is steered: read-only first, credentials injected outside the model, deny-by-default egress, approvals that are rare enough to mean something, and every call logged."
Check yourself
Say or write your answer first, then reveal. Explaining it from memory, in your own words, is the skill an interviewer is checking.
1Where should the policy that allows, asks about or denies an agent's actions live, and why?
2What does it mean that an allowlisted domain is a capability grant?
3Why keep credentials outside the model's reach, and how?
4Name two documented cases where hostile repository or issue content steered an AI agent.
5Why are prompt and response contents opt-in in the OpenTelemetry GenAI conventions?