Skip to main content

Architecture

How the QuilrAI Process Mapping engine discovers, monitors, and governs every application and AI agent on the endpoint.

Endpoint
# Discovery sources
Process Monitor   → polls every 10s (sysinfo)
File Scanner      → startup + 30min poll (Lua sandbox)
Backend SSE       → governance overrides in real-time
QuilrAI Process Mapping
Discover
Process Monitor
sysinfo polling (10s)
PID reuse detection
New / exited process tracking
File Scanner
Lua scripting sandbox
AI config file discovery
Startup + 30 min poll
Correlate
Correlator
Two-level cache (alias + app)
300s TTL per entry
Path-based resolution
EntityStore
DashMap (concurrent)
Broadcast change events
Added / Updated / Removed
Sync
Ingest Service
POST /sync/discovered-apps
Gzip-compressed batches
Canonical ID assignment
Delta Sync
GET /sync/delta
Governance overrides
Approval status + policy
Enforce
Enforcer
Block: kill + notify
Quarantine: kill + log
Allow / Audit: log only
Snapshot Timer
JSON dump every 30s
Crash recovery on startup
Idempotent delta replay
Activity Logging · Delta Sync · Crash Recovery · Process Attribution
Quilr Backend
App CatalogGovernance PoliciesProcess MappingsDelta EndpointAudit DashboardSSE Stream
QuilrAI

Pipeline Stages

Every discovery and process event flows through these stages in order.

StageDescription
Process MonitorPolls macOS / Windows for running processes every 10s via sysinfo. Detects new processes, exits, and PID reuse.
File ScannerWalks configured paths and runs Lua scripts in a sandbox to discover AI entities (MCP servers, hooks, skills, agents, models, repos, plugins).
CorrelatorMaps process names and executable paths to application identities using a two-level cache (alias + app, 300s TTL).
EntityStoreIn-memory DashMap with broadcast channel for change events (Added, Updated, Removed, GovernanceUpdated). Central hub for sync and enforcement.
Ingest ServiceBatch uploads discovered entities to the backend via POST /ea/v1/sync/discovered-apps (gzip-compressed).
Delta SyncPolls GET /ea/v1/sync/delta for governance overrides (approval status, execution policy, criticality).
EnforcerSubscribes to EntityStore change events. Enforces execution policies: block, quarantine, audit, or allow.

Entity Types

EntityDescription
ApplicationDesktop apps, CLI tools, running processes
MCP ServerModel Context Protocol server configurations
HookLifecycle hooks for AI tools (Cursor, Claude, etc.)
SkillAI skill / capability definitions
AgentAI agent configurations
ModelDownloaded or referenced AI models
Controlled RepoGit repositories under AI tool control
PermissionTool permission configurations
PluginIDE plugins and extensions

Persistence

In-memory DashMap for concurrent hot-path access, with periodic JSON snapshots for crash recovery.

FeatureDescription
Snapshot intervalJSON dump every 30 seconds
RecoveryOn startup, loads snapshot and resumes delta sync from persisted cursor
Crash safetyDelta sync cursor persisted before applying overrides; replays are idempotent

Platform Support

PlatformProcess DiscoveryFile ScannerEnforcement
macOSsysinfo crate (polling)Lua scripting sandboxPOSIX signals (SIGTERM, SIGKILL)
Windowssysinfo crate (polling)Lua scripting sandboxWindows process termination APIs

Observability

Every discovery event, governance override, and enforcement action is logged with entity identity, policy match, and action taken. Ingest Service and Delta Sync maintain continuous bidirectional sync with the Quilr backend.