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.
| Category | What it surfaces |
|---|---|
supported_connector | OpenClaw, ZeptoClaw, Claude Code, Codex, Cursor, Devin, GitHub Copilot CLI, Antigravity, Hermes, OpenCode, Amp, Kiro |
ai_cli | Standalone AI CLIs and helpers (gh copilot, aider, chatblade, …) |
active_process | Running processes whose name matches a catalog entry: agent CLIs, local model servers such as Ollama or vLLM, AI desktop apps |
editor_extension | AI 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_server | MCP servers configured for any connector (mcpServers blocks) |
skill | Claude, Cursor and OpenClaw skill bundles in the home folder and the project (~/.claude/skills, .claude/skills) |
rule | Rule packs and ruleset files referenced by config |
plugin | Connector plugins (TypeScript, Python, native) |
package_dependency | AI dependencies in requirements.txt, package.json, pyproject.toml |
env_var_name | AI provider environment variable names (never values) |
shell_history_match | Shell-history references to AI binaries (last-touched times) |
provider_domain | DNS resolutions to known provider endpoints |
workspace_artifact | .openclaw/, .claude/, .cursor/ folders in active workspaces |
desktop_app | Claude Desktop, Cursor and Devin app installs on macOS and Windows. Claude Desktop also gets a Cowork block |
local_ai_endpoint | Vetted Ollama, Lemonade, LM Studio, LocalAI and vLLM loopback metadata endpoints |
local_model | Models 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.
| Deployment | What each full scan sends |
|---|---|
| Per-user | Only transitions: new, changed, gone |
managed_enterprise | The 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.locationsays where:~/.local/bin/claudeunder 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"
}| Field | Meaning |
|---|---|
installed, installed_source | The 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 |
version | The app version: Info.plist on macOS, the app-<version> folder on Windows. Empty for an MSIX install and on Linux |
cowork_enabled, cowork_enabled_source | true 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_version | The newest Claude Code build bundled in Claude Desktop (the engine behind Cowork) |
vm_bundle_present, vm_bundle_bytes | The Cowork VM bundle and the total size of its files, taken from file sizes without reading the images |
cowork_plugins | Names of plugins enabled in Cowork, sorted, at most 64 |
deployment | 1p (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 |
| OS | 1p data folder | 3p 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.
| Mode | Automatic filesystem coverage |
|---|---|
passive | Known 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 Containersand~/Library/Cachesas separately budgeted roots, plus appResourcesfolders. - Choose
passiveto keep discovery to known stores and the paths you approve. Keepenhancedto 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 (
~/.defenseclawanddata_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:
| Field | Meaning |
|---|---|
owner_application | Label from the top-level app, container or bundle name. Empty when ownership is unclear; the macOS app shows it as unknown |
modality | generative, speech, vision, embedding, audio or unknown |
relevance | primary (main weights), supporting (speech, vision, embedding or VAD components), embedded (shipped inside an app or a browser or conferencing cache) or unknown |
discovery_confidence | 0..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.
| Runtime | Installed or reported models | Loaded models |
|---|---|---|
| Lemonade Server (Preview) | /v1/models, /api/v1/models | /v1/health, /api/v1/health |
| Ollama | /api/tags | /api/ps |
| LM Studio (Preview) | /v1/models | Not distinguished |
| LocalAI (Preview) | /v1/models | Not distinguished |
| vLLM | /v1/models | Not distinguished |
| llama.cpp | No model-metadata endpoint | Process and file discovery only |
/v1/modelsrows arestatus=installed.status=loadedneeds 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 port13305. Only downloaded local models are listed. Itsmodels_dirandextra_models_dirare 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,deviceandpinned, and a runtime block when the server reports a PID. - The model ID is not copied into
productorcomponent, which keeps labels bounded. country_codeis 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,distilledandderivationkeep the detected lineage.sourceandconfidenceseparate 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: falseTurn 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.coURL 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.*orgeneral.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
seenuntil that source completes a cycle; only a complete cycle can mark a modelgone. - File pages keep the last complete aggregate until a root finishes, so shards do not cause false
changedorgone. - 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 --scanSets 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 statusPrints what is enabled, the scan roots, the loaded signature pack, the last scan time and the signal count.
defenseclaw agent discovery scanCalls 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 disableAsks 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.
| Flag | Default | Purpose |
|---|---|---|
--mode passive|enhanced | enhanced | Model 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-history | on | Read ~/.bash_history and ~/.zsh_history for AI commands |
--include-package-manifests / --no-include-package-manifests | on | Read package.json, pyproject.toml, requirements.txt |
--include-env-var-names / --no-include-env-var-names | on | List process environment names (values are never read) |
--include-network-domains / --no-include-network-domains | on | Provider-domain signals and loopback model server probes |
--scan-interval-min | 5 | Minutes between full scans |
--process-interval-s | 60 | Seconds between process-list polls |
--max-files-per-scan | 1000 | Most model artifacts one scan emits |
--max-file-bytes | 524288 (512 KiB) | Most bytes read from one file |
--store-raw-local-paths / --no-store-raw-local-paths | off | Keep 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|off | all | IDE inventory scope |
--lookup-model-provenance-online | off | Hugging Face lookup |
--enable-host-plane | off | Add runtime Plane C |
These settings have no flag. Set them with defenseclaw config set or in config.yaml:
| Key | Default | Purpose |
|---|---|---|
ai_discovery.require_trusted_binary_paths | off | Run only binaries below trusted folders (trusted paths) |
ai_discovery.include_skill_content_hashes | on | Read skill folders to hash their contents |
ai_discovery.include_skill_manifests | off | Send 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_rootsapply. 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-discoveryfolder of the authorization ledger (owned by root, readable by the gateway's group). The gateway adds it on every full scan. - Each signal carries
useranduser_idfrom the account the guardian scanned for, never from the scan output.ai_component.discovered,changedandremovedrecords 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.observedrecords. 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_emailon, each account's Claude Code and Codex address is sent on oneai_component.observedrecord 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
gonewhen 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_manifestsandstore_raw_local_pathsapply 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 discoveryorsudo /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\skillsand 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.idis the SID,defenseclaw.user.id_kindiswindows_sid,defenseclaw.user.namethe 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_usersis not read, its processes are left out, and its earlier components are reportedremovedonce at the next scan; the enumerator also removes the read access it granted. ai_discovery.home_dirsadds 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:
| Agent | Protected folder | Found by |
|---|---|---|
| Kiro | .kiro | Install folder %LOCALAPPDATA%\Kiro-Cli. IDE plugins in .kiro\extensions are still read (that folder alone is granted) |
| Amp | .config | npm install %APPDATA%\npm\node_modules\@ampcode\cli |
| OpenCode | .config | Folders outside .config, such as ~\.opencode |
| Antigravity | .gemini | .gemini\antigravity-cli |
| Copilot CLI | .copilot | Package 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_bytesper file,max_files_per_scanfiles, 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. Onlyscan.jsonstays.
How it shows.
- Each signal carries
sandbox_nameandsandbox_id(defenseclaw.sandbox.nameand.idonai_component.*records). Its hashes are its sandbox's own, so the same file in two places is two entries. defenseclaw agent usage --sandbox NAMEshows 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,--sandboxexits 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
goneat once. ai_discovery.enabled: falseturns this off too.

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

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

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;
installandvalidatereject other formats withinvalid JSON. disableandenabletake a signature ID, not a pack name. Find IDs withsignatures 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 listprints aNot loaded:line with both digests and leaves its signatures out.agent discovery statuscounts it anddefenseclaw doctorwarns.- 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 fromai_discovery.signature_packs. - A pack edited on disk while the gateway runs is checked again within a few seconds.
Operator CLI
| Command | Reads | Needs the gateway |
|---|---|---|
agent discover | A connector inventory on this machine | No |
agent usage, processes, components | The gateway's continuous-discovery snapshot | Yes |
agent confidence | Detection evidence and scoring weights | Yes |
agent discover
defenseclaw agent discover --json --emit-otelIt checks every connector DefenseClaw knows. --json prints an agents object with one entry per connector ({"agents": {"codex": {...}, ...}}), plus scanned_at and the telemetry result.
| Field | Meaning |
|---|---|
installed | A binary was found and its version probe succeeded. A config file alone does not count |
config_path, binary_path | Full local paths found |
version, error | Version string, or the probe error |
configured, active, mode | State 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-otelkeeps a run local;--require-otelfails 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 becomeversion_probe_statuspluserror_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
--refreshit reads the latest snapshot;--refreshruns a full scan first. - The default table groups repeated observations;
--detailshows 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. --wideadds model format, version and the confidence columns.--componentmatches SDK and component names and local model IDs (case-insensitive substring).- Table filters run in the CLI.
--jsonreturns the complete snapshot; filter it withjq.
defenseclaw agent processes --limit 20Live 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/binand/opt/dc-agents/bin, and in~/.local/binand~/bin. The binary is not run.
defenseclaw agent components --ecosystem npm --min-identity 0.8
defenseclaw agent components show ai
defenseclaw agent components history aiEvery 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.
tmoves focus between the tables; arrows andEnteract 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_bytesand pinned state. - The panel starts in RECOMMENDED scope: discovery confidence at least 80%, and the row is
primaryor an owner-attributedsupportingspeech, audio, vision or embedding model. Amodel_apirow without a confidence score also stays visible. The heading shows visible, total and hidden counts. a(Show all models) shows the whole admitted inventory;aagain (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.yamlexplain 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 scancalls theopenclawbinary 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
--jsonone connector prints one JSON object; several print a JSON array with one object per connector, each naming itsconnector.--connector <name>gives one object.
| Flag | Purpose |
|---|---|
--json | Machine output (default is a table) |
--summary | Counts only, for CI gates |
--only | Comma-separated categories: skills,plugins,mcp,agents,rules,tools,models,memory,ide_plugins. Others are left out and marked "collected": false |
--connector | One 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.
{
"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.
| Control | What it means |
|---|---|
| No raw values by default | Environment 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 discovery | No 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 key | Only 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 scoped | Small metadata files only, every path hashed, rows kept per user. See IDE privacy and scope |
| Signed events | Continuous-discovery events carry a per-installation HMAC on the gateway envelope, so tampering after the gateway is detectable |
| Sanitized on-demand reports | agent discover --emit-otel sends a sanitized report; the full report stays on your machine |
| Scoped collection | Provider-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/binand/opt/homebrew; they cannot be removed. - An untrusted binary is recorded but not run, and
agent discoverprints its folder and the fix. - Add folders with
defenseclaw setup trusted-paths list|add|removeor the TUI Trusted Paths panel.addchecks the folder, refuses unsafe permissions unless--force, and saves it inai_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 toerrorsand setsdetector_errors.macos_privacy. Other unreadable roots add sanitizeddetector_errorstoo. - 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-usageanddefenseclaw agent usagekeep the fullmodelblock so you can see what is installed or loaded.- Local history in
inventory.dbkeeps the same block. Scans older thanobservability.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: trueand a projection that keeps thepathfield class.
AI Discovery
Find the AI agents, local models, MCP servers, skills, IDE plugins and providers on a machine, and see which of them actually ran.
AI Discovery runtime planes
See which AI process ran, which provider it sent data to and what actions it took, with per-OS grants, Tetragon, DNS capture and settings.