Building the Agent for the Security Alert Triage Case
Explore how to build a security alert triage agent by implementing evidence-based judgment, integrating analyst approval for containment, and defending against prompt injection. Understand the collaborative role between AI model recommendations and code-enforced controls to ensure safe, verifiable decisions within an Anthropic Forward Deployed Engineer interview context.
Scoping turned Harborline’s request into a clear brief. Code merges duplicates and closes routine activity, Claude triages the alerts that remain, and an analyst approves every containment action. The interviewer now asks the candidate to build the core of that design.
In a technical round, this rarely means building the whole system. The interviewer asks for one part at a time and adds a constraint after each one. The sections below follow that pattern, with each request answered by extending one file, triage_agent.py.
Triaging one alert with evidence
Suppose the interviewer asks us to triage the alerts that passed the prefilter. Each alert names a rule, a host, a user, and a severity, and that alone is rarely enough to decide anything. An analyst would open the host’s process history and the user’s recent logins before making a call, so the agent needs the same two views.
To solve this, we give Claude two evidence tools, get_process_tree and get_login_history, and run a tool loop until Claude has what it needs. The final answer has to feed code and an analyst queue, so we use structured outputs to fix its shape. Every verdict carries a label, a one-sentence reason, and a recommended action. The code below implements this first version.
Line 5: We created the Claude client.
Lines 8–12: We listed three alerts that passed the prefilter.
Lines 14–23: We created the evidence the SIEM holds: a process tree for each host and a login history for each user. ...