Automation & Agents

Building an AI Agent to Automate Daily Security Operations

Part 2

Daily security checks can consume hours of engineering time without necessarily requiring hours of engineering judgement. AP Build 002 explores how I am redesigning a repetitive security operations process using automation and AI, while keeping people responsible for the decisions that matter.

AP BUILD 002 · AUTOMATION & AGENTS

Building an AI Agent to Automate Daily Security Operations

Some security work requires experienced engineers. Some security work simply requires experienced engineers to repeatedly collect the same information.

Those are not necessarily the same problem.

This build started with a repetitive daily security operations process: engineers logging into multiple customer environments every morning, checking essentially the same indicators and determining where attention is required.

The process has value.

But does every step require a person?

That question became the starting point for AP Build 002.

The problem

Imagine a security operations team responsible for approximately 30 customer environments.

Every morning, engineers need to perform health and security checks across those environments.

Typical checks may include:

  • endpoints that have been offline for too long;
  • devices that are unmanaged or not connected;
  • unresolved security threats;
  • outdated endpoint agents;
  • devices located in unexpected or default groups;
  • environment health information; and
  • other conditions requiring investigation.

None of these checks are unnecessary.

The problem is how the information is collected.

If an engineer spends approximately 30 minutes reviewing one environment and the team needs to review 30 environments, the organisation could consume around:

15 engineering hours every day simply collecting and reviewing routine operational information.

That calculation immediately raised another question:

How much of those 15 hours represents human judgement, and how much represents information gathering?

Breaking the process apart

Before introducing AI, I wanted to understand the actual workflow.

A typical morning check can be simplified into:

Connect → Collect → Compare → Identify → Prioritise → Investigate → Act

These stages do not all require the same technology.

Connect

Authenticate to the security platform and access the appropriate customer environment.

Collect

Retrieve information about endpoints, threats, agent versions, connectivity and environment health.

Compare

Evaluate the information against defined thresholds and expected conditions.

Identify

Determine which conditions require attention.

Prioritise

Separate routine observations from issues that may require urgent investigation.

Investigate

Understand why the condition exists and determine whether it represents a real security or operational problem.

Act

Perform remediation, communicate with the customer, escalate the issue or accept the condition where appropriate.

Breaking the workflow into stages revealed something important.

The entire process does not need AI.

Automation first, AI second

Many of the morning checks are deterministic.

For example:

If an endpoint has not connected for more than a defined number of hours, flag it.

If a threat remains unresolved, flag it.

If an endpoint agent is older than an accepted version or age threshold, flag it.

These are rules.

They do not require a large language model to determine whether they are true.

Traditional automation is generally better suited to:

  • API queries;
  • data collection;
  • threshold calculations;
  • version comparisons;
  • filtering;
  • scheduled execution; and
  • structured reporting.

Using AI for these tasks would add unnecessary complexity.

The first architectural principle therefore became:

Automate what is deterministic. Use AI where interpretation adds value.

Where AI becomes useful

Once the raw information has been collected and evaluated, the problem changes.

An engineer does not necessarily need another dashboard containing hundreds of records.

The engineer needs to know:

  • What requires attention?
  • What appears unusual?
  • What is most important?
  • What changed since yesterday?
  • Which customers may require immediate action?

This is where AI becomes more interesting.

Instead of using AI to perform the basic checks, AI can help interpret the results of those checks.

For example, the system might receive structured findings such as:

  • 31 unresolved threats;
  • 14 endpoints offline for more than 24 hours;
  • 6 devices running stale agents;
  • 3 devices appearing in an unexpected default group.

The AI layer can then help transform that information into an operational briefing.

Rather than:

Here are 54 records. Please investigate them.

the objective becomes:

Here are the three conditions most likely to require your attention this morning, why they matter and the evidence supporting each finding.

The architecture

The initial architecture is deliberately simple.

Security Platform APIs

↓

Python Collection & Automation

↓

Rules & Threshold Engine

↓

Structured Findings

↓

AI Analysis Layer

↓

Prioritised Morning Brief

↓

Security Engineer

The important architectural decision is that the AI model does not need unrestricted access to the security platform.

The deterministic automation layer collects the required information first.

The AI layer receives only the structured information required for analysis.

This creates clearer boundaries between:

  • data collection;
  • business rules;
  • AI interpretation; and
  • human decision-making.

Defining the rules

For automation to work reliably, vague operational knowledge needs to become explicit rules.

For example:

OFFLINE_HOURS = 24
STALE_AGENT_DAYS = 7
UNRESOLVED_THREAT = TRUE

These values are examples and can be adjusted based on the organisation’s operational requirements.

The important part is not the exact number.

It is converting:

“Check whether anything looks old.”

into:

“Flag any endpoint where the agent has exceeded the defined stale-agent threshold.”

Automation forces operational assumptions to become explicit.

That can improve the process even before AI is introduced.

What the engineer should receive

The goal is not to replace one large dashboard with another large dashboard.

The output should be designed around the engineer’s morning workflow.

A useful briefing could look conceptually like this:

MORNING SECURITY BRIEF

Priority Attention

Customer A
31 unresolved threats require investigation. Several have remained unresolved since the previous reporting period.

Customer B
14 endpoints have been offline beyond the defined 24-hour threshold.

Customer C
A group of endpoints appears to be running agents beyond the accepted version threshold.

Environment Summary

27 environments show no significant new conditions.

The engineer can now begin with the exceptions rather than manually searching for them.

Exception-driven security operations

This changes the operating model.

The traditional workflow is:

Engineer → Review everything → Find problems → Investigate

The automated workflow becomes:

Automation → Review everything → Find exceptions → Engineer investigates

That is a significant difference.

The objective is not necessarily to remove the engineer.

It is to move the engineer further along the workflow.

People should spend more time investigating meaningful exceptions and less time proving that nothing happened.

Why I still call this an AI agent

At its earliest stage, much of this system is conventional automation.

That is intentional.

An AI agent becomes more relevant as the system gains the ability to pursue a defined operational objective rather than simply execute one fixed script.

For example:

Review the security health of all assigned customer environments and identify anything requiring engineering attention this morning.

A more capable agent could potentially:

  1. collect the required security information;
  2. apply standard operational checks;
  3. identify exceptions;
  4. compare findings with previous days;
  5. look for unusual changes;
  6. prioritise findings;
  7. prepare an engineer briefing; and
  8. request additional investigation where necessary.

The agent’s objective is therefore broader than simply running an API query.

But the deterministic components should remain deterministic.

What the agent should not do

Autonomy needs boundaries.

At this stage, I would not want the agent independently:

  • isolating customer endpoints;
  • deleting security artefacts;
  • closing security incidents;
  • changing customer security policies;
  • remediating threats without approval;
  • communicating material incidents to customers without review; or
  • making risk acceptance decisions.

Those actions have consequences.

They require appropriate authority and accountability.

The initial objective is therefore:

Observe → Analyse → Prioritise → Recommend

rather than:

Observe → Decide → Remediate autonomously

Human-in-the-loop by design

The security engineer remains part of the architecture.

That is not a temporary limitation.

It is a deliberate control.

The automation can determine that an endpoint has been offline for 48 hours.

It cannot automatically know whether:

  • the employee is on leave;
  • the device has been decommissioned;
  • the endpoint is located at a remote site;
  • there is a network outage;
  • the device should still exist; or
  • the condition represents a security incident.

Context matters.

The agent should reduce the amount of information the engineer needs to process — not pretend that context no longer matters.

The potential time saving

The original process provides a useful baseline.

Approximately:

30 environments × 30 minutes = 15 engineering hours per day

The goal is not to claim that automation can eliminate all 15 hours.

Engineers still need to investigate genuine findings.

But suppose routine collection and initial analysis could reduce the manual review to an average of five minutes per environment.

The initial review would become approximately:

30 environments × 5 minutes = 2.5 engineering hours

That would potentially release:

12.5 engineering hours per day for higher-value work.

Whether that saving can actually be achieved needs to be measured during testing.

But this gives the build a measurable objective rather than simply saying:

“We implemented AI.”

How success should be measured

The project should not be measured by whether the agent runs successfully.

It should be measured by whether the operational process improves.

Useful measures could include:

  • manual review time before and after automation;
  • number of environments processed automatically;
  • percentage of findings correctly identified;
  • false-positive rate;
  • important findings missed by the system;
  • time from finding to engineer investigation;
  • engineering hours released; and
  • engineer confidence in the generated briefing.

These measures tell us whether the automation actually creates value.

What I am learning from the build

This project is reinforcing several lessons.

1. AI is often not the first automation layer

APIs, scripts and rules can perform much of the heavy lifting more reliably and cheaply.

2. AI becomes useful after the data has structure

Giving an AI model clean, relevant findings is often more useful than giving it unrestricted access to an entire platform.

3. Exception management is a powerful automation pattern

Automation does not always need to perform the work itself.

Sometimes its greatest value is identifying where people need to focus.

4. Human judgement becomes more valuable when routine work is removed

The objective isn’t fewer engineers making decisions.

It is engineers spending more of their time on decisions that actually require their expertise.

5. AI projects need measurable outcomes

“Using AI” is not a business outcome.

Reducing a 15-hour daily operational process while maintaining or improving detection quality is.

What comes next

The next stage is to move from architecture and workflow design into controlled implementation.

That includes:

  1. confirming the required API capabilities;
  2. building the data collection layer;
  3. formalising operational thresholds;
  4. creating a standard findings schema;
  5. building the morning briefing;
  6. testing findings against manual engineer checks;
  7. measuring false positives and missed conditions;
  8. adding AI interpretation only where it improves the output; and
  9. measuring actual engineering time saved.

Only after that should additional agent autonomy be considered.

CURRENT BUILD STATUS

AP Build 002

  • Project: Security Operations Morning Checks Agent
  • Status: Prototype / In Development
  • Build Stream: Automation & Agents
  • Architecture: APIs + Python + Rules + AI Analysis
  • Operating Model: Human-in-the-loop
  • Primary Objective: Reduce repetitive daily security review while preserving engineering judgement

About AP Build

AP Build documents things I am actually building, testing and learning from. These posts show the process behind the finished product — including design decisions, experiments, failures and lessons learned — rather than presenting every project as a polished success story.