AI Discovery

AI Discovery inventory

Look up AI Discovery inventory signals, local models, scan settings, signature packs, agent commands, AIBOM and what the privacy model covers.

This is the reference for the inventory half of AI Discovery: what the scan finds, how to tune it, and the commands that read it. The IDE plugin list has its own page.

What gets discovered

The continuous scanner in the gateway puts every signal in one of these categories. defenseclaw agent usage shows them. agent discover is a separate, connector-only inventory that runs without the gateway.

CategoryWhat it surfaces
supported_connectorOpenClaw, ZeptoClaw, Claude Code, Codex, Cursor, Devin, GitHub Copilot CLI, Antigravity, Hermes, OpenCode, Amp, Kiro
ai_cliStandalone AI CLIs and helpers (gh copilot, aider, chatblade, …)
active_processRunning processes whose name matches a catalog entry: agent CLIs, local model servers such as Ollama or vLLM, AI desktop apps
editor_extensionAI extensions in VS Code and its forks, JetBrains IDEs, Visual Studio, Zed and Vim/Neovim. Every plugin, AI or not, is in the IDE plugin inventory
mcp_serverMCP servers configured for any connector (mcpServers blocks)
skillClaude, Cursor and OpenClaw skill bundles in the home folder and the project (~/.claude/skills, .claude/skills)
ruleRule packs and ruleset files referenced by config
pluginConnector plugins (TypeScript, Python, native)
package_dependencyAI dependencies in requirements.txt, package.json, pyproject.toml
env_var_nameAI provider environment variable names (never values)
shell_history_matchShell-history references to AI binaries (last-touched times)
provider_domainDNS resolutions to known provider endpoints
workspace_artifact.openclaw/, .claude/, .cursor/ folders in active workspaces
desktop_appClaude Desktop, Cursor and Devin app installs on macOS and Windows. Claude Desktop also gets a Cowork block
local_ai_endpointVetted Ollama, Lemonade, LM Studio, LocalAI and vLLM loopback metadata endpoints
local_modelModels on disk, or reported as loaded by a vetted loopback model server

Signal states

Each signal has a state of new, seen, changed or gone, with first_seen and last_seen. seen is the steady state.

DeploymentWhat each full scan sends
Per-userOnly transitions: new, changed, gone
managed_enterpriseThe complete endpoint snapshot, including unchanged seen records
  • Full scans run every 5 minutes by default.
  • A process-only tick refreshes process state between full scans. It does not republish the snapshot or the managed connector and MCP inventory.
  • On managed macOS and Linux, each install of an agent binary is its own signal. defenseclaw.ai.component.location says where: ~/.local/bin/claude under a home (no account name sent), or an absolute system path such as /opt/homebrew/bin/codex. A copy in another account's home is reported without a location, and a per-user scan sends none.

Claude Desktop and Cowork

Cowork is the agent mode of Claude Desktop. For each user who has run Claude Desktop, a full scan adds one desktop_app signal with detector claude_desktop and a claude_desktop block. A machine with the app but no data folder (never started) shows only the plain application signal.

"claude_desktop": {
  "installed": true,
  "installed_source": "app_bundle",
  "version": "4.4212.0",
  "cowork_enabled": true,
  "cowork_enabled_source": "cowork_sessions",
  "engine_version": "2.1.309",
  "vm_bundle_present": true,
  "vm_bundle_bytes": 12161047888,
  "cowork_plugins": ["finance", "sales-tools"],
  "deployment": "1p"
}
FieldMeaning
installed, installed_sourceThe app was found: app_bundle (macOS Claude.app), install_folder or msix_package (Windows). Linux is not probed, so the data folder counts (data_folder). A data folder without the app is installed: false
versionThe app version: Info.plist on macOS, the app-<version> folder on Windows. Empty for an MSIX install and on Linux
cowork_enabled, cowork_enabled_sourcetrue when Cowork is set up on this machine: a session on disk (cowork_sessions) or the VM bundle (vm_bundle). false only when Claude Desktop recorded that the machine cannot run the VM (vm_support_probe). null is unknown. This is local evidence, not your organization's Cowork setting
engine_versionThe newest Claude Code build bundled in Claude Desktop (the engine behind Cowork)
vm_bundle_present, vm_bundle_bytesThe Cowork VM bundle and the total size of its files, taken from file sizes without reading the images
cowork_pluginsNames of plugins enabled in Cowork, sorted, at most 64
deployment1p (signed in to Claude) or 3p (third-party inference: Amazon Bedrock, Google Vertex AI, Microsoft Foundry), from the data folder (below). A user who runs both gets two signals
OS1p data folder3p data folder
macOS~/Library/Application Support/Claude~/Library/Application Support/Claude-3p
Windows%APPDATA%\Claude; the MSIX app's %LOCALAPPDATA%\Claude-Data\claude_<id> (or %LOCALAPPDATA%\Packages\Claude_*\LocalCache\Roaming\Claude)%LOCALAPPDATA%\Claude-3p
Linux~/.config/Claude~/.config/Claude-3p

Inside each data folder the scan reads claude-code/<version> (engine), vm_bundles/claudevm.bundle (VM bundle), local-agent-mode-sessions/<account>/<org> (sessions local_*.json and plugin manifest rpm/manifest.json) and vm-support-probe.json (VM check).

Local model inventory

Full scans find local models in two metadata-only ways: files on disk and vetted loopback model servers. No inference engine needs to be installed: a GGUF/GGML, safetensors/MLX, Core ML or Q4NX file is enough for a local_model row. Ambiguous formats (ONNX/ORT, TFLite, PyTorch/checkpoint, generic binaries) must also pass the admission rules below.

Passive and enhanced modes

The mode decides which folders are added automatically. It does not change redaction or enable inference.

ModeAutomatic filesystem coverage
passiveKnown model stores, plus narrower roots you list in scan_roots. An exact home (~) root is not walked for model files, and unknown macOS app storage is not added
enhanced (default)Everything in passive, plus the broad home walk and bounded macOS app-storage and app-resource roots, for models downloaded by apps not yet in the signature catalog

enhanced is the default. passive is the more private choice: it does not walk your home folder or macOS app storage.

ai_discovery:
  mode: passive    # the default is enhanced
  • On macOS, enhanced mode does not walk all of ~/Library. It adds ~/Library/Application Support, ~/Library/Containers, ~/Library/Group Containers and ~/Library/Caches as separately budgeted roots, plus app Resources folders.
  • Choose passive to keep discovery to known stores and the paths you approve. Keep enhanced to find models owned by apps the signature catalog does not know yet.
  • Enhanced mode changes where DefenseClaw looks, not what it trusts.

What the file scan admits

This is not an unrestricted content crawl. The scanner:

  • considers model files and model-folder metadata only, not documents, messages, images or audio;
  • accepts GGUF/GGML, safetensors, Core ML and Q4NX files on format alone, and keeps recognized model stores;
  • outside those stores, admits ONNX/ORT, TFLite, PyTorch/checkpoint and generic binaries only with explicit model context (a model, weights, checkpoint or format folder, a model name in an app scope, or a nearby metadata file) and a meaningful identity;
  • rejects generic identities (model, weights, runtime), hex or UUID-like cache keys, version-only names, and Chrome Optimization Guide payloads for those ambiguous formats;
  • skips source, dependency, build and browser-noise trees, and DefenseClaw's own data folder (~/.defenseclaw and data_dir);
  • applies global and per-root limits, rotates roots, and resumes unfinished roots later;
  • reads only bounded metadata such as a GGUF header prefix or a small adjacent manifest, never tensor payloads.

It recognizes GGUF/GGML, safetensors, ONNX/ORT, Core ML, TFLite, Q4NX, MLX, Hugging Face cache layouts and Ollama manifests and blob stores, and groups sharded weights into one model row. It emits at most max_files_per_scan artifacts per scan.

Known stores are added automatically: HF_HUB_CACHE, HF_HOME, OLLAMA_MODELS, LM_STUDIO_HOME and FLM_MODEL_PATH; the usual Hugging Face, Ollama, LM Studio, llama.cpp and MLX caches; Lemonade's configured model folders; then your scan_roots. On Windows it also checks the GPT4All, Jan and AnythingLLM model stores first. --scan-roots never disables these.

Ownership, modality and relevance

When the path gives reliable context, each local_model can carry:

FieldMeaning
owner_applicationLabel from the top-level app, container or bundle name. Empty when ownership is unclear; the macOS app shows it as unknown
modalitygenerative, speech, vision, embedding, audio or unknown
relevanceprimary (main weights), supporting (speech, vision, embedding or VAD components), embedded (shipped inside an app or a browser or conferencing cache) or unknown
discovery_confidence0..1 score for the evidence behind this classification, separate from product identity confidence

Every admitted model stays in the snapshot. The TUI and macOS app hide low-confidence, embedded and unknown-relevance rows by default (see TUI and macOS). These view filters never remove rows from the API or JSON.

Loopback model servers

Presence checks prefer HEAD. Model lists use bounded, read-only GET requests to allow-listed metadata routes only. The detector never calls completion, embedding, audio, pull, load, delete or other control routes.

RuntimeInstalled or reported modelsLoaded models
Lemonade Server (Preview)/v1/models, /api/v1/models/v1/health, /api/v1/health
Ollama/api/tags/api/ps
LM Studio (Preview)/v1/modelsNot distinguished
LocalAI (Preview)/v1/modelsNot distinguished
vLLM/v1/modelsNot distinguished
llama.cppNo model-metadata endpointProcess and file discovery only
  • /v1/models rows are status=installed. status=loaded needs a route that reports an in-memory model.
  • Preview. Lemonade Server is recognized by its binaries (lemonade, lemond, lemonade-tray, LemonadeServer.exe), desktop app, config locations, environment names and default port 13305. Only downloaded local models are listed. Its models_dir and extra_models_dir are added as model roots.

The model block

Each local_model keeps its identity in a model block. An installed Lemonade model:

{
  "category": "local_model",
  "detector": "model_api",
  "model": {
    "id": "Qwen3-0.6B-GGUF",
    "status": "installed",
    "format": "gguf",
    "provider": "lemonade",
    "recipe": "llamacpp",
    "size_bytes": 380000000,
    "provenance": {
      "publisher": "Alibaba Cloud",
      "country_code": "CN",
      "root_model": "Qwen/Qwen3-0.6B",
      "quantized": true,
      "quantization": "Q4_K_M",
      "derivation": "quantized",
      "source": "gguf_metadata",
      "confidence": "medium"
    }
  }
}
  • Loaded-model rows can add modality, device and pinned, and a runtime block when the server reports a PID.
  • The model ID is not copied into product or component, which keeps labels bounded.
  • country_code is the ISO 3166-1 alpha-2 country of the organization that released the root or base weights, not the quantizer, uploader, runtime or download location. The TUI and macOS app draw the flag locally; no emoji is sent.
  • base_models, quantized, distilled and derivation keep the detected lineage. source and confidence separate embedded or runtime evidence from catalog or Hub lookups. Missing evidence stays unknown.

In telemetry. ai_component.* logs carry this provenance subset for local_model, never as metric labels, and never the model ID. Root and base model names (only for an exact lineage or a Hub lookup) and quantization text are log-only content fields, so each destination's redaction profile can remove them.

Optional Hugging Face lookup

ai_discovery.lookup_model_provenance_online looks up public model-card ancestry. It is off by default because a lookup sends a model repository ID.

ai_discovery:
  lookup_model_provenance_online: false

Turn it on with defenseclaw config set ai_discovery.lookup_model_provenance_online true (applied without a restart), with defenseclaw agent discovery setup, or with defenseclaw agent discovery enable --lookup-model-provenance-online.

  • It calls only the fixed public Hugging Face model-info endpoint, refuses redirects, and bounds responses and recursion.
  • It starts only from an exact ID: one from a Hugging Face cache path, a huggingface.co URL in the file's metadata, or a reviewed lineage rule. It never sends local paths, never fuzzy-searches file names, and uses no private Hub token.
  • Results are cached. After a transient failure the previous result is kept for up to seven days; a definite not-found clears it.
  • A renamed GGUF still resolves when its general.source.* or general.base_model.* URL survived conversion. Otherwise provenance is unknown.

Model lifecycle

Limits never turn a partial observation into a false deletion.

  • A model server with more than 256 models is read in cursor pages. Rows stay seen until that source completes a cycle; only a complete cycle can mark a model gone.
  • File pages keep the last complete aggregate until a root finishes, so shards do not cause false changed or gone.
  • One failed server pass is carried as seen (a normal restart). A valid empty list is conclusive.

Continuous discovery (gateway)

The continuous scanner runs inside the gateway. A fresh defenseclaw init leaves it off. defenseclaw agent discovery enable turns it on, collects the IDE inventory, and turns on runtime planes A and B.

defenseclaw agent discovery enable --restart --scan

Sets ai_discovery.enabled and any other ai_discovery.* settings you pass in ~/.defenseclaw/config.yaml, restarts the gateway (--no-restart skips it) and runs a full scan so dashboards fill in at once. --yes skips the prompt. A single setting changed with defenseclaw config set is applied without a restart.

defenseclaw agent discovery status

Prints what is enabled, the scan roots, the loaded signature pack, the last scan time and the signal count.

defenseclaw agent discovery scan

Calls POST /api/v1/ai-usage/scan for an immediate full scan, with no restart. Per-user installs send only new, changed and gone. Managed enterprise sends the complete snapshot and refreshes the managed endpoint inventory.

defenseclaw agent discovery disable

Asks Proceed? [Y/n] (--yes skips it), sets ai_discovery.enabled: false, and turns off the runtime planes enable turned on. Other ai_discovery.* settings, the selected planes and existing audit events are kept, so enable brings the same setup back.

Scan settings

agent discovery enable takes these flags. Run defenseclaw agent discovery enable --help for the full list.

FlagDefaultPurpose
--mode passive|enhancedenhancedModel discovery scope (modes)
--scan-roots~Extra comma-separated roots to walk (from ai_discovery.scan_roots). Known model stores are always added
--include-shell-history / --no-include-shell-historyonRead ~/.bash_history and ~/.zsh_history for AI commands
--include-package-manifests / --no-include-package-manifestsonRead package.json, pyproject.toml, requirements.txt
--include-env-var-names / --no-include-env-var-namesonList process environment names (values are never read)
--include-network-domains / --no-include-network-domainsonProvider-domain signals and loopback model server probes
--scan-interval-min5Minutes between full scans
--process-interval-s60Seconds between process-list polls
--max-files-per-scan1000Most model artifacts one scan emits
--max-file-bytes524288 (512 KiB)Most bytes read from one file
--store-raw-local-paths / --no-store-raw-local-pathsoffKeep raw local paths in the discovery state file. For diagnostics on a trusted machine only (see what is stored and sent)
--ide-inventory all|ai_only|offallIDE inventory scope
--lookup-model-provenance-onlineoffHugging Face lookup
--enable-host-planeoffAdd runtime Plane C

These settings have no flag. Set them with defenseclaw config set or in config.yaml:

KeyDefaultPurpose
ai_discovery.require_trusted_binary_pathsoffRun only binaries below trusted folders (trusted paths)
ai_discovery.include_skill_content_hashesonRead skill folders to hash their contents
ai_discovery.include_skill_manifestsoffSend SKILL.md text (export)

Signature packs are managed with defenseclaw agent signatures (below); discovery enable has no --signature-pack flag.

Per-user scans in standalone enterprise

In the standalone enterprise profile the gateway runs as a service account that cannot read user homes or see other accounts' processes.

On Linux and macOS the hook guardian runs the scan for each user in the target manifest, as that user, every scan_interval_min, while ai_discovery is on.

  • Each scan reads only that user's home and processes. Home-relative scan_roots apply. Other roots, loopback probes and environment names stay with the gateway's own scan, which covers machine-wide binaries and apps.
  • The guardian checks each result and writes it to the ai-discovery folder of the authorization ledger (owned by root, readable by the gateway's group). The gateway adds it on every full scan.
  • Each signal carries user and user_id from the account the guardian scanned for, never from the scan output. ai_component.discovered, changed and removed records carry the same user (user.id, defenseclaw.user.name), without entry names.
  • Skill, plugin and MCP names stay in the local inventory; discovery does not emit per-entry ai_component.observed records. Names can still reach destinations in hook decision and asset-policy audit rows when those assets are used, scanned, admitted or rejected.
  • With ai_discovery.include_user_email on, each account's Claude Code and Codex address is sent on one ai_component.observed record per account and connector per cycle (Optional connector email).
  • The gateway's own process detector does not run; the summary reports detector_notes.process: provided by per-user scans.
  • A user's results turn gone when the user leaves the manifest, or after the longer of three scan intervals and 15 minutes since their last good scan.
  • mode, include_shell_history, include_package_manifests and store_raw_local_paths apply as usual.
  • Skills and MCP servers found this way are inventoried only; the managed gateway does not scan them.
  • Read the per-user records as root with sudo /opt/defenseclaw/bin/defenseclaw-gateway enterprise linux discovery or sudo /opt/cisco/defenseclaw/bin/defenseclaw-gateway enterprise macos discovery (read-only; --user, --json).

On Windows the gateway service scans every enrolled profile itself. Read it with & 'C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw.exe' enterprise windows discovery from an elevated PowerShell prompt.

  • The hook enumerator grants the service read access to each user's agent folders (.claude, .codex, .cursor, .kiro, %LOCALAPPDATA%\hermes\skills and the others) and to the IDE folders the IDE plugin inventory reads, and nothing else.
  • Each signal found in a profile, and each agent process started from one, carries that account: user.id is the SID, defenseclaw.user.id_kind is windows_sid, defenseclaw.user.name the account name.
  • Folders outside the granted ones (such as the profile root that scan_roots: ["~"] names) are skipped without failing the scan.
  • Only enrolled profiles are read. A profile named in enterprise.enrollment.exclude_users is not read, its processes are left out, and its earlier components are reported removed once at the next scan; the enumerator also removes the read access it granted.
  • ai_discovery.home_dirs adds folders to the enrolled profiles and never replaces them. A folder inside an excluded profile is not read.

A folder on an enrolled connector's hook path keeps the guardian's protected permissions, so the service is not granted it. The agent is found another way:

AgentProtected folderFound by
Kiro.kiroInstall folder %LOCALAPPDATA%\Kiro-Cli. IDE plugins in .kiro\extensions are still read (that folder alone is granted)
Amp.confignpm install %APPDATA%\npm\node_modules\@ampcode\cli
OpenCode.configFolders outside .config, such as ~\.opencode
Antigravity.gemini.gemini\antigravity-cli
Copilot CLI.copilotPackage cache %LOCALAPPDATA%\copilot\pkg
Devin%APPDATA%\devin%LOCALAPPDATA%\devin\cli. User MCP servers are still listed: only %APPDATA%\devin\mcp_config.json is granted, not the folder or the hook file config.json
Cursor(hooks are machine-level)A user without ~\.cursor\mcp.json is found by %LOCALAPPDATA%\cursor-agent

The service may list those install folders but not read them.

Inside OpenShell sandboxes

While sandboxes are on (openshell.enabled), the gateway also inventories what the agent in each running sandbox installed and configured there, which the host scan never sees.

When it reads. Once a sandbox is ready, every scan_interval_min while it runs, and on demand with defenseclaw sandbox discover NAME.

What it reads. One read-only command the daemon builds itself collects, under the sandbox's home and project:

  • the agent config, MCP config, skill, rule and plugin paths from the signature catalog,
  • agent CLIs in its bin folders and its running agents,
  • environment variable names (never values) and shell history,
  • package manifests, for a copy (--copy, every sandbox on macOS).

A mounted project is a host folder, which the host scan reads.

How it checks. Everything the sandbox returns is treated as the agent's:

  • Only absolute, printable paths under the sandbox's home, projects or harness install, within what was asked for, are kept.
  • Bounds: max_file_bytes per file, max_files_per_scan files, 8,192 entries listed, a 4 MiB stream.
  • Files are written as private regular files (never links or FIFOs) under <data_dir>/sandboxes/NAME/discovery, scanned on the host with the same detectors (without the machine-wide ones), then deleted. Only scan.json stays.

How it shows.

  • Each signal carries sandbox_name and sandbox_id (defenseclaw.sandbox.name and .id on ai_component.* records). Its hashes are its sandbox's own, so the same file in two places is two entries.
  • defenseclaw agent usage --sandbox NAME shows one sandbox. Every view tags rows "(sandbox NAME)".
  • A name with no sandbox is an error. A sandbox not read yet gets a note to run defenseclaw sandbox discover NAME. On Windows, which has no sandboxes, --sandbox exits 3.
  • Last active is the last time the running sandbox was read, not the file date (image files carry the image's dates). A sandbox process's up= counts from its start.
  • A stopped sandbox keeps its entries without processes. A deleted one's entries turn gone at once.
  • ai_discovery.enabled: false turns this off too.

defenseclaw sandbox discover myapp-claude: one row per component with its category, product, what found it, the MCP server and skill names, and the file or folder that holds it

The same components in the AI inventory, tagged with the sandbox:

defenseclaw agent usage --sandbox myapp-claude: the AI visibility table with Claude Code and GitHub Copilot rows marked (sandbox myapp-claude), their categories, detectors, signal counts and sample evidence

The TUI AI Discovery panel (V) lists them as their own rows, tagged (sandbox NAME):

DefenseClaw TUI AI Discovery panel with a row for Claude Code on the host and a separate row, Claude Code (sandbox myapp-claude), for what the scan found inside the sandbox

Signature packs

The scanner uses a versioned signature pack to recognize AI artifacts. Custom packs let you add your own AI tools as first-party signals.

defenseclaw agent signatures list
defenseclaw agent signatures install ./corp-signatures.json
defenseclaw agent signatures validate ./corp-signatures.json
defenseclaw agent signatures disable codex
defenseclaw agent signatures enable codex
  • A pack is JSON, not YAML; install and validate reject other formats with invalid JSON.
  • disable and enable take a signature ID, not a pack name. Find IDs with signatures list.
  • The bundled pack covers every connector in the Capability matrix. A custom pack makes internal AI tools show as first-party instead of unknown.

Pinned digests (Preview). A pack whose sha256 does not match its pin in ai_discovery.signature_pack_digests (or, on a managed standalone device, a pack with no pin) is not loaded.

  • signatures list prints a Not loaded: line with both digests and leaves its signatures out. agent discovery status counts it and defenseclaw doctor warns.
  • A configured pack whose file is gone is reported the same way (file not found). The gateway keeps the last catalog it built until the file is restored or removed from ai_discovery.signature_packs.
  • A pack edited on disk while the gateway runs is checked again within a few seconds.

Operator CLI

CommandReadsNeeds the gateway
agent discoverA connector inventory on this machineNo
agent usage, processes, componentsThe gateway's continuous-discovery snapshotYes
agent confidenceDetection evidence and scoring weightsYes

agent discover

defenseclaw agent discover --json --emit-otel

It checks every connector DefenseClaw knows. --json prints an agents object with one entry per connector ({"agents": {"codex": {...}, ...}}), plus scanned_at and the telemetry result.

FieldMeaning
installedA binary was found and its version probe succeeded. A config file alone does not count
config_path, binary_pathFull local paths found
version, errorVersion string, or the probe error
configured, active, modeState from DefenseClaw config

Local JSON contains full paths

Treat saved agent discover --json output as host inventory. It has full config and binary paths and may include probe error detail. It has no file contents or environment values.

  • Telemetry is best effort and on by default. --no-emit-otel keeps a run local; --require-otel fails when the gateway is unreachable.
  • The telemetry copy is sanitized: raw paths become has_*, basename and installation-scoped hash fields, the version is bounded, and errors become version_probe_status plus error_class. The full report stays on your machine.

agent usage, processes, components

These read the gateway's AI usage view, not the local filesystem.

defenseclaw agent usage --state new --state changed
defenseclaw agent usage --refresh --category local_model
defenseclaw agent usage --category local_model --detail
defenseclaw agent usage --component Qwen3
defenseclaw agent usage --category local_model --show-gone
defenseclaw agent usage --json | jq '.signals[] | select(.category == "local_model")'
  • Without --refresh it reads the latest snapshot; --refresh runs a full scan first.
  • The default table groups repeated observations; --detail shows one row per signal. Local-model rows add model ID, status and format.
  • Flags: --refresh, --detail, --state (repeatable), --category, --product, --component, --sandbox (repeatable), --show-gone, --by-detector, --limit, --wide.
  • --wide adds model format, version and the confidence columns.
  • --component matches SDK and component names and local model IDs (case-insensitive substring).
  • Table filters run in the CLI. --json returns the complete snapshot; filter it with jq.
defenseclaw agent processes --limit 20

Live AI processes: agent CLIs, local model servers and AI desktop apps whose name matches the catalog. Useful when something runs and you cannot tell which agent started it.

  • A per-user install on macOS and Linux lists only your own processes. Managed installs see every enrolled user.
  • A name matches a catalog name exactly, or as a part separated by a hyphen, underscore, dot or space. A name that merely contains a catalog word does not match.
  • On macOS, CLI binaries are found on the scanner's PATH, in /usr/local/bin, /opt/homebrew/bin, /opt/local/bin and /opt/dc-agents/bin, and in ~/.local/bin and ~/bin. The binary is not run.
defenseclaw agent components --ecosystem npm --min-identity 0.8
defenseclaw agent components show ai
defenseclaw agent components history ai

Every AI-related npm, PyPI, Go, Cargo or other package dependency across your workspaces. --ecosystem takes the ecosystem name. show and history drill into one component's identity score and detection trail.

Use the component ID from agent components. Package IDs such as ai and openai resolve only after discovery finds them; a display label or connector name is not a component ID.

TUI and macOS app

The TUI AI Discovery panel (V) puts local models in their own table (State, Model, Owner, Modality, Relevance, Confidence, Status, Format), grouped by model ID. Everything else stays in the agents and tools table.

  • t moves focus between the tables; arrows and Enter act on the selection.
  • Model detail shows provenance (publisher, country, root and base models, derivation, quantization, source, confidence), owner, modality, relevance, discovery confidence, recipe, device, size_bytes and pinned state.
  • The panel starts in RECOMMENDED scope: discovery confidence at least 80%, and the row is primary or an owner-attributed supporting speech, audio, vision or embedding model. A model_api row without a confidence score also stays visible. The heading shows visible, total and hidden counts.
  • a (Show all models) shows the whole admitted inventory; a again (Recommended models) returns.

The macOS app uses the same recommended scope and shows a notice with the hidden count.

  • Its inspector shows owner, modality, relevance and discovery confidence.
  • Model Filters → Show All Models removes the recommended exclusions but keeps a modality or relevance you picked.
  • Picking a modality (Generative, Speech, Vision, Embedding, Audio, Unknown) or relevance (Primary, Supporting, Embedded, Unknown) drops the implicit classification filter but keeps the 80% threshold. Reset to Recommended restores the default.

These are view filters only: GET /api/v1/ai-usage and defenseclaw agent usage --json return every admitted row. The Overview AI Agents tile leaves out local_model rows, so a large model inventory cannot hide agents.

agent confidence

Every signal has a confidence score. To see the evidence behind a decision:

defenseclaw agent confidence explain openai
defenseclaw agent confidence policy show
defenseclaw agent confidence policy default
defenseclaw agent confidence policy validate ./my-policy.yaml

explain shows the per-detector evidence trail. policy tunes the weights, for example for an internal tool that scores low because the bundled pack does not know it.

AIBOM (AI Bill of Materials)

Discovery answers "what is there?". AIBOM answers "what is there, with provenance, in a form I can hand to compliance".

defenseclaw aibom scan --json
  • For OpenClaw, aibom scan calls the openclaw binary for each category (skills, plugins, MCP, agents and config, models, memory) in parallel and merges the results. For other connectors it reads the filesystem.
  • On a multi-connector install it produces one BOM per active connector. With --json one connector prints one JSON object; several print a JSON array with one object per connector, each naming its connector. --connector <name> gives one object.
FlagPurpose
--jsonMachine output (default is a table)
--summaryCounts only, for CI gates
--onlyComma-separated categories: skills,plugins,mcp,agents,rules,tools,models,memory,ide_plugins. Others are left out and marked "collected": false
--connectorOne connector instead of every active one

Reading the table. 0 means the category was read and is empty. - or not collected means DefenseClaw cannot read it for this connector (or --only left it out). Inventory coverage notes at the end mark categories not supported (not read) or partly checked (read, but some details such as folder trust or organization policy are not checked). --summary folds them into one line; JSON keeps them in limitations with status unsupported or unverified.

Provenance. The document and each item carry the same provenance block: schema version, content hash, configuration generation and DefenseClaw version. content_hash is the SHA-256 of the active DefenseClaw configuration and policy inputs, not a hash of an item or of the BOM.

The excerpt shows one connector's object; with several connectors each array element has this shape.

defenseclaw aibom scan --connector claudecode --json (excerpt)
{
  "provenance": {
    "schema_version": 7,
    "content_hash": "8c3a000000000000000000000000000000000000000000000000000000000000",
    "generation": 0,
    "binary_version": "<version>"
  },
  "skills": [
    {
      "name": "code-review",
      "version": "1.2.0",
      "source": "~/.claude/skills/code-review",
      "provenance": {
        "schema_version": 7,
        "content_hash": "8c3a000000000000000000000000000000000000000000000000000000000000",
        "generation": 0,
        "binary_version": "<version>"
      }
    }
  ],
  "mcp": [...],
  "agents": [...],
  "tools": [...],
  "model_providers": [...],
  "memory": [...]
}

There is no --sign or --format=cyclonedx. The provenance ties the report to the active config and policy generation and binary version, but the report is not signed and items are not content-addressed. Convert the JSON downstream if your SBOM tooling needs CycloneDX.

Privacy and trust model

Discovery touches sensitive parts of the filesystem, so it collects as little as it can.

ControlWhat it means
No raw values by defaultEnvironment variable names only, never values. Paths are hashed (config_path_hash, binary_path_hash); only basenames stay in the default redacted output
Metadata-only model discoveryNo tensor payloads, only bounded headers and small metadata files. Model servers: no inference or control routes, at most 1 MiB per response, 256 models and 24 endpoints, with per-request and per-pass time limits
Lemonade API keyOnly the least-privileged LEMONADE_API_KEY (never LEMONADE_ADMIN_API_KEY), sent only to an origin from explicit LEMONADE_HOST/LEMONADE_PORT or Lemonade's config after its /live check passes. Never stored in a signal, log or event
IDE inventory is bounded and scopedSmall metadata files only, every path hashed, rows kept per user. See IDE privacy and scope
Signed eventsContinuous-discovery events carry a per-installation HMAC on the gateway envelope, so tampering after the gateway is detectable
Sanitized on-demand reportsagent discover --emit-otel sends a sanitized report; the full report stays on your machine
Scoped collectionProvider-domain and loopback checks follow include_network_domains; shell history and environment names have their own settings. Process discovery matches executable names, not arguments (on macOS the full command line is read only to recover a long name, then discarded)

Review these settings with your privacy team and turn off what you do not need.

Trusted binary paths

agent discover runs each found binary to read its version. To allow that only below trusted folders, set ai_discovery.require_trusted_binary_paths: true (default false).

  • Built-in trusted prefixes include /usr/bin and /opt/homebrew; they cannot be removed.
  • An untrusted binary is recorded but not run, and agent discover prints its folder and the fix.
  • Add folders with defenseclaw setup trusted-paths list|add|remove or the TUI Trusted Paths panel. add checks the folder, refuses unsafe permissions unless --force, and saves it in ai_discovery.trusted_binary_prefixes.

macOS privacy prompts

Discovery respects macOS Transparency, Consent and Control (TCC). Without Full Disk Access the scan does not open folders that make macOS prompt: Desktop, Documents, Downloads, Movies, Music, Pictures, iCloud Drive, ~/Library/Containers, ~/Library/Group Containers and Contacts data.

  • A skipped folder makes the scan result: partial, adds to errors and sets detector_errors.macos_privacy. Other unreadable roots add sanitized detector_errors too.
  • The macOS app shows a Partial scan banner with the details, and Scan complete only for a complete scan.
  • A skipped folder never counts as proof that a model was removed.
  • Grant Full Disk Access only if your policy allows that broader inventory, then restart the gateway and scan again.

What is stored and sent

  • GET /api/v1/ai-usage and defenseclaw agent usage keep the full model block so you can see what is installed or loaded.
  • Local history in inventory.db keeps the same block. Scans older than observability.local.retention_days (7 by default) are pruned; the latest scan is always kept.
  • Records sent to a destination follow its redaction profile. They leave out extended model metadata, model basenames and path hashes, and use an installation-scoped HMAC pseudonym instead of the model ID.
  • Paths and basenames are never sent.
  • Raw paths need both ai_discovery.store_raw_local_paths: true and a projection that keeps the path field class.