🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@opena2a/arp

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opena2a/arp

Agent Runtime Protection — LLM-assisted behavioral monitoring, anomaly detection, and enforcement for AI agents.

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
3
-62.5%
Maintainers
1
Weekly downloads
 
Created
Source

ARP — Agent Runtime Protection

License: Apache-2.0 Tests OASB

Detect. Intercept. Enforce.

Runtime security monitoring for AI agents. Detects process spawns, network connections, and filesystem access in real-time — with zero-latency application-level interception that fires before the I/O happens.

OpenA2A | OASB Benchmark | MITRE ATLAS Mapping

Table of Contents

Quick Start

npm install @opena2a/arp

As SDK

import { AgentRuntimeProtection } from '@opena2a/arp';

const arp = new AgentRuntimeProtection({
  agentName: 'my-agent',
  monitors: {
    process: { enabled: true },
    network: { enabled: true, allowedHosts: ['api.example.com'] },
    filesystem: { enabled: true, watchPaths: ['/app/data'] },
  },
  interceptors: {
    process: { enabled: true },
    network: { enabled: true },
    filesystem: { enabled: true },
  },
});

arp.onEvent((event) => {
  if (event.category === 'violation') {
    console.warn(`[ARP] ${event.severity}: ${event.description}`);
  }
});

await arp.start();
// ... your agent runs ...
await arp.stop();

As CLI

npx arp-guard start                    # Start with auto-detected config
npx arp-guard start --config arp.yaml  # Start with custom config
npx arp-guard status                   # Show monitor status and budget
npx arp-guard tail 20                  # Show last 20 events
npx arp-guard budget                   # Show LLM spending

Architecture

ARP uses two complementary detection layers plus a 3-layer intelligence stack.

Detection Layers

LayerMechanismLatencyCoverage
OS-Level MonitorsPolling (ps, lsof, fs.watch)200–1000msCatches everything on the system
Application InterceptorsNode.js module hooks<1msFires before I/O, 100% accuracy
OS-Level Monitors
MonitorWhat It Detects
ProcessMonitorChild process tracking, suspicious binary detection, CPU monitoring
NetworkMonitorOutbound connections with fallback chain: lsofss/proc/net/tcpnetstat
FilesystemMonitorSensitive path access via recursive fs.watch
Application-Level Interceptors
InterceptorHooksWhat It Catches
ProcessInterceptorchild_process.spawn/exec/execFile/forkAll child process creation
NetworkInterceptornet.Socket.prototype.connectAll outbound TCP connections
FilesystemInterceptorfs.readFile/writeFile/mkdir/unlinkAll filesystem I/O

Interceptors fire before the operation executes. No kernel dependency required.

Intelligence Stack

LayerMethodCostWhen
L0Rule-based classificationFreeEvery event
L1Z-score anomaly detectionFreeFlagged events
L2LLM-assisted assessmentBudget-controlledEscalated events

L2 supports Anthropic, OpenAI, and Ollama adapters with per-hour call limits and USD budget caps.

Enforcement Actions

log → alert → pause (SIGSTOP) → kill (SIGTERM/SIGKILL)

Each action is configurable per-rule with optional LLM confirmation before enforcement.

Configuration

ARP auto-discovers config files: arp.yamlarp.ymlarp.json.opena2a/arp.yaml

Full configuration example
agentName: my-agent
agentDescription: Production agent with restricted capabilities
declaredCapabilities:
  - file read/write
  - HTTP requests

monitors:
  process:
    enabled: true
    intervalMs: 5000
  network:
    enabled: true
    intervalMs: 10000
    allowedHosts:
      - api.example.com
      - cdn.example.com
  filesystem:
    enabled: true
    watchPaths:
      - /app/data
    allowedPaths:
      - /app/data
      - /tmp

interceptors:
  process:
    enabled: true
  network:
    enabled: true
    allowedHosts:
      - api.example.com
  filesystem:
    enabled: true
    allowedPaths:
      - /app/data

rules:
  - name: critical-threat
    condition:
      category: threat
      minSeverity: critical
    action: kill
    requireLlmConfirmation: true

  - name: high-violation
    condition:
      category: violation
      minSeverity: high
    action: alert

intelligence:
  enabled: true
  adapter: anthropic
  budgetUsd: 5.0
  maxCallsPerHour: 20
  minSeverityForLlm: medium

Detection Coverage

Suspicious binaries (15)

curl, wget, nc, ncat, nmap, ssh, scp, python, perl, ruby, base64, socat, telnet, ftp, rsync

Suspicious hosts (10)

webhook.site, requestbin, ngrok.io, pipedream.net, hookbin.com, burpcollaborator, interact.sh, oastify.com, pastebin.com, transfer.sh

Sensitive paths (18)

.ssh, .aws, .gnupg, .kube, .config/gcloud, .docker/config.json, .npmrc, .pypirc, .git-credentials, wallet.json, .bashrc, .zshrc, .bash_profile, .profile, .gitconfig, .env, .netrc, .pgpass

Event Model

interface ARPEvent {
  id: string;
  timestamp: string;
  source: 'process' | 'network' | 'filesystem';
  category: 'normal' | 'anomaly' | 'violation' | 'threat';
  severity: 'info' | 'low' | 'medium' | 'high' | 'critical';
  description: string;
  data: Record<string, unknown>;
  classifiedBy: 'L0-rules' | 'L1-statistical' | 'L2-llm';
}

MITRE ATLAS Mapping

TechniqueIDDetection
Unsafe ML InferenceAML.T0046Process spawn/exec monitoring
Data LeakageAML.T0057Sensitive path + suspicious host detection
ExfiltrationAML.T0024Outbound connection tracking
PersistenceAML.T0018Shell config dotfile write detection
Denial of ServiceAML.T0029CPU monitoring, budget exhaustion
EvasionAML.T0015L1 anomaly baseline detection
JailbreakAML.T0054L2 LLM consistency assessment

Testing

npm test          # 18 unit tests
npm run build     # TypeScript compilation

For comprehensive security testing, see OASB — 182 attack scenarios across 42 test files mapped to MITRE ATLAS.

License

Apache-2.0

OpenA2A Ecosystem

ProjectWhat it does
ARPRuntime security monitoring for AI agents
OASBOpen Agent Security Benchmark — 182 attack scenarios
HackMyAgentSecurity scanner — 147 checks, attack mode, auto-fix
AIMIdentity and access management for AI agents
Secretless AIKeep credentials out of AI context windows
DVAADeliberately vulnerable AI agents for security training

Website · Discord · Email

Keywords

ai

FAQs

Package last updated on 10 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts