Deckard, Scan for Rogue AI Agents
Arthur

How to Send Your AI Agent Inventory to Splunk and Alert on New Agents

October 30, 20267 min read

Discovering AI agents is the first step. The harder part is keeping the inventory live and knowing the moment a new agent appears that nobody registered. If your SOC already runs Splunk or Elastic Security, you can route an agent inventory into the tools your team watches and fire an alert on every first-seen agent.

This post is for SOC engineers and Splunk admins. It covers setting up an HTTP Event Collector token and index, what an agent inventory event looks like, a first-seen search that alerts on new agents, and the equivalent in Elastic Security using a new terms rule and ES|QL.

How do I get AI agent inventory into Splunk?

Splunk's HTTP Event Collector (HEC) is the path for pushing structured events in over HTTP. You create a token, point a sender at the collector endpoint, and the events land in an index you can search.

Create an HEC token and index

Create a dedicated index for agent inventory (this post uses ai_inventory) and an HEC token scoped to it. HEC uses token authentication, and the Authorization header requires the keyword Splunk before the token value. JSON events are sent to the /services/collector/event endpoint.

Watch the port. The default HEC port is 8088 on Splunk Enterprise and Splunk Cloud free trials, and 443 on Splunk Cloud Platform instances. Use the one that matches your deployment.

A quick test that the token and index work:

curl -H "Authorization: Splunk $HEC_TOKEN" \
 https://splunk.example.com:8088/services/collector/event \
 -d '{"event": {"event_type": "arthur.discovery.agent", "test": true}, "sourcetype": "arthur:discovered_agent", "index": "ai_inventory"}'

Point Deckard at HEC

Deckard, Arthur's open-source agent discovery tool, can emit discovery events straight to HEC. The config below shows the shape; confirm the exact destination keys against the repo's standalone-discovery.md before you deploy.

# Deckard config shape (verified from PR #2427; confirm field names in standalone-discovery.md)
version: 1
schedule: {interval: 6h}
sources:
 - name: corp-macs
   vendor: jamf_pro
   
# fields per docs: Jamf URL, client_id, client_secret (secrets via ${ENV} or {file: path})
destination:
 type: splunk_hec
 url: https://splunk.example.com:8088/services/collector/event
 
# token, index, sourcetype, tls_verification: full | ca_only | off

What does an AI agent inventory event look like?

Each discovery event is a JSON record describing one observed agent. The fields below are verified in merged PR #2427; copy the full field list and schema_version from the repo's docs/events.md before publishing a schema reference, since some fields come from the PR description rather than a fetched schema file.

Key facts to build alerts on:

  • sourcetype is arthur:discovered_agent.
  • _time equals the event's observed_at.
  • Every event carries source.id and agent.external_id, which give a stable key to deduplicate on downstream. The same agent seen across repeated scans shares one agent.external_id, so you count distinct agents, not distinct sightings.
  • agent.name and source.name carry the human-readable agent and source labels (field names per brief and PR description; confirm in docs/events.md).

If nested JSON fields don't extract in search, set KV_MODE = json for the sourcetype in props.conf. Verify that on your deployment.

How do I alert when a new AI agent appears in Splunk?

The pattern is a first-seen search, adapted from Splunk's own "Finding New Evil" lookup method for detecting new domains. You keep a lookup of every agent you've seen, compare each scan against it, and alert when an agent.external_id shows up that isn't already in the lookup.

Seed a baseline lookup

Run the search once over a long window (30 days) without the final where clause. That populates arthur_agents_seen.csv with your existing agent population so the alert doesn't fire on everything the first time.

Scheduled first-seen search

index=ai_inventory sourcetype="arthur:discovered_agent" event_type="arthur.discovery.agent" earliest=-6h
| stats earliest(_time) as firstTime latest(_time) as lastTime values(agent.name) as agent_name values(source.name) as source_name by agent.external_id
| inputlookup append=t arthur_agents_seen.csv
| stats min(firstTime) as firstTime max(lastTime) as lastTime values(agent_name) as agent_name values(source_name) as source_name by agent.external_id
| outputlookup arthur_agents_seen.csv
| where firstTime >= relative_time(now(), "-6h")

The search pulls recent events, merges them with the saved lookup, recomputes the earliest time per agent, writes the lookup back, and keeps only agents whose first sighting falls inside the recent window. Those are your new agents.

Alert settings

Schedule the search to match your Deckard interval (6 hours here). Set the alert to trigger when the number of results is greater than 0. Route the alert wherever your SOC triages, so a newly discovered agent becomes a ticket with an owner rather than a row nobody reads.

How do I do the same in Elastic Security?

Elastic Security has a purpose-built detection for first-seen values, so you don't need the lookup dance.

New terms rule

A new terms rule fires when a value, or a combination of up to three values, has never appeared within a configurable history window. The history window must be larger than the rule interval plus its look-back. Key the rule on agent.external_id to alert on genuinely new agents.

{
 "type": "new_terms",
 "name": "New AI agent discovered by Deckard",
 "index": ["logs-arthur.discovery-default"],
 "query": "event_type : \"arthur.discovery.agent\"",
 "new_terms_fields": ["agent.external_id"],
 "history_window_start": "now-14d",
 "interval": "6h",
 "from": "now-7h",
 "risk_score": 47,
 "severity": "medium",
 "language": "kuery"
}

One ECS caveat to know (per PR #2528, confirm in repo): agent and source are top-level objects in the event. In ECS those names usually mean the shipping agent and the network source, so in Elastic Security views agent.name shows the discovered agent's name, not a Beat or Agent shipper. Set expectations with your team so the field isn't misread.

ES|QL inventory query

FROM logs-arthur.discovery-default
| WHERE event_type == "arthur.discovery.agent"
| STATS first_seen = MIN(@timestamp), last_seen = MAX(@timestamp) BY agent.name, source.name
| SORT first_seen DESC

This gives a current inventory view: each agent with its first and last sighting, newest first.

FAQ

Which HEC endpoint should I use? /services/collector/event for JSON events.

How do I dedupe agents across scans? Key on agent.external_id, which every event carries. The same agent seen in multiple scans shares one value.

Can I use risk-based alerting? You can route these detections into Splunk ES risk-based alerting as an option. Verify the asset-and-identity and RBA configuration against current Splunk ES docs before relying on it.

What privileges does the Elasticsearch API key need? create_doc and auto_configure, per the PR test.

Ship this with Deckard

The setup above works with any sender that can POST to HEC. Deckard is the one where every destination behavior in this post is verified in merged pull requests.

Deckard is Arthur's open-source agent discovery tool. It reads endpoint and cloud inventory (Jamf Pro, Compute Engine, EC2, and more), normalizes what it finds, and emits one arthur.discovery.agent event per agent, deduplicated on agent.external_id, to Splunk HEC, Elastic, or a webhook. The same server seen in two scans becomes one owned record, not two.

Three ways to start:

  • Clone the repo: github.com/arthur-ai/deckard. Point it at your inventory sources and your HEC token and watch the events land in ai_inventory.
  • Read the schema and config: the event schema (docs/events.md) and the destination config (standalone-discovery.md) are maintained in the open, so you can wire the SPL and Elastic rules above to the exact field names.
  • See it end to end: book a demo to watch agent discovery feed your SIEM with owners, risk scores, and alerts on every new agent.

‍

SHARE