All skills
datadog-labs avatar

/ai-activity-audit

@0d12930 official

Audit what the Bits AI assistant (MCP server) has done in your Datadog org — tool calls by user, resources accessed, and anomaly flags for AI governance.

  • 1 file
  • 4.9 KB
  • Updated 5 months ago
  • GitHub

Use this Skill: https://skilld.dev/gh/datadog-labs/agent-skills/ai-activity-audit

This session only. Nothing lands on disk.

SKILL.md

≈44 tokens always: the name and description. ≈1.1k when used: this file.

Audit Trail: AI Activity Audit

Every Datadog MCP tool call is recorded in Audit Trail under the Bits AI SRE category. This skill surfaces what the AI assistant has done in your org — which users invoked it, which tools were called, and which resources were affected.

Prerequisites

pup auth login   # OAuth2 (recommended)
# or set DD_API_KEY + DD_APP_KEY with audit_logs_read scope

Queries

All MCP tool activity in a time window

pup audit-logs search --query "@evt.name:\"MCP Server\"" --from 7d --limit 500 -o json \
  | jq '[.data[] | {
      timestamp: .attributes.timestamp,
      user: .attributes.attributes.usr.email,
      actor_type: .attributes.attributes.evt.actor.type,
      action: .attributes.attributes.action,
      resource_type: .attributes.attributes.asset.type,
      resource_id: .attributes.attributes.asset.id,
      ip: .attributes.attributes.network.client.ip,
      country: .attributes.attributes.network.client.geoip.country.name
    }]'

Activity by user (who is using the AI assistant most?)

pup audit-logs search --query "@evt.name:\"MCP Server\"" --from 30d --limit 1000 -o json \
  | jq '[.data[] | .attributes.attributes.usr.email]
    | group_by(.)
    | map({user: .[0], tool_calls: length})
    | sort_by(-.tool_calls)'

Resources modified by AI tool calls

pup audit-logs search \
  --query "@evt.name:\"MCP Server\" @action:(created OR modified OR deleted)" \
  --from 7d --limit 500 -o json \
  | jq '[.data[] | {
      timestamp: .attributes.timestamp,
      user: .attributes.attributes.usr.email,
      action: .attributes.attributes.action,
      resource_type: .attributes.attributes.asset.type,
      resource_id: .attributes.attributes.asset.id
    }]'

AI activity for a specific user

pup audit-logs search \
  --query "@evt.name:\"MCP Server\" @usr.email:user@example.com" \
  --from 30d --limit 500 -o json \
  | jq '[.data[] | {
      timestamp: .attributes.timestamp,
      action: .attributes.attributes.action,
      resource_type: .attributes.attributes.asset.type,
      resource_id: .attributes.attributes.asset.id
    }]'

Weekly summary report

pup audit-logs search --query "@evt.name:\"MCP Server\"" --from 7d --limit 1000 -o json \
  | jq '{
      total_tool_calls: (.data | length),
      unique_users: ([.data[] | .attributes.attributes.usr.email] | unique | length),
      top_users: (
        [.data[] | .attributes.attributes.usr.email]
        | group_by(.)
        | map({user: .[0], calls: length})
        | sort_by(-.calls)
        | .[:5]
      ),
      actions_breakdown: (
        [.data[] | .attributes.attributes.action]
        | group_by(.)
        | map({action: .[0], count: length})
        | sort_by(-.count)
      ),
      resource_types: (
        [.data[] | .attributes.attributes.asset.type]
        | group_by(.)
        | map({type: .[0], count: length})
        | sort_by(-.count)
      )
    }'

Anomaly Flags

Signal Governance concern
AI performing deleted actions on monitors or dashboards Review whether destructive AI operations are expected
AI acting as SUPPORT_USER Datadog support using AI on behalf of org
First-time user invoking AI tools New user accessing AI assistant
High volume of tool calls in short window Automated/batch AI usage
AI accessing resources outside user's normal scope Potential over-permissioned AI session

Output Format

AI Activity Audit — [Org] — [Date Range]

Total MCP tool calls: [N]
Unique users: [N]

Top users:
  [user@example.com]: [N] calls

Actions breakdown:
  accessed: [N]
  modified: [N]
  created: [N]
  deleted: [N]

Resource types affected:
  dashboard: [N]
  monitor: [N]

Anomalies:
  [List any flagged events with timestamp, user, action, resource]

Context

This skill is most useful for:

  • Security reviews: Verifying AI actions were authorized and within expected scope
  • Compliance audits: Demonstrating AI activity is logged and attributable to specific users
  • Governance reports: Understanding adoption and risk surface of the AI assistant across the org

No other observability vendor audits their AI assistant's actions at this level of detail.

References

Source: SKILL.md on GitHub

No third-party reports yet.

Signed by skilld at 0d12930. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 20 hours ago.

Activeupdated 5 months ago
Other metadata
metadata
{
  "version": "0.1.0",
  "author": "datadog-labs",
  "repository": "https://github.com/datadog-labs/agent-skills",
  "tags": "datadog,audit,ai,mcp,bits-ai,governance,dd-audit",
  "alwaysApply": "false"
}
  • MCP
  • datadog
  • audit
  • ai-governance
  • audit-logs
  • compliance
  • security-review
  • bits-ai

README badge

README badge for datadog-labs/agent-skills/ai-activity-audit

Queries Datadog Audit Trail to surface MCP tool calls made by the Bits AI assistant, including which users invoked it, which resources were affected, and anomaly flags for destructive or out-of-scope actions. Useful for security reviews, compliance audits, and AI governance reporting in Datadog orgs.

Generated from the current SKILL.md.

What events does this skill audit?
This skill queries Datadog Audit Trail for MCP Server tool calls made by the Bits AI assistant, capturing which users invoked it, which tools were called, which resources were affected, and metadata like IP and geolocation.
What permissions do I need?
You need either OAuth2 authentication (pup auth login) or API/app keys with the audit_logs_read scope to query Audit Trail events.
Can this detect risky AI activity?
Yes. The skill flags anomalies including destructive operations (deletes on monitors/dashboards), AI acting as support staff, first-time AI users, high-volume tool calls, and access outside normal user scope.
Does this work with other Datadog agents or just Bits AI?
This skill is specific to Bits AI SRE and the MCP Server integration; it does not audit activity from other Datadog agents or assistants.

Generated from the current SKILL.md. These answers refresh after source changes.