Skip to main content
Static discovery of AI usage across a codebase, plus per-tag cost attribution for chargeback reports. Both features live in multimind.observability and are exposed on the multimind audit CLI.

What the scanner finds

scan_project(path) walks a directory tree (skipping .git, node_modules, venv/.venv, __pycache__, dist, build, and similar) and reports: The package registry (AI_PACKAGE_REGISTRY) maps each package to a provider, a kind (sdk or framework), and a data_flow classification (external — data leaves your infrastructure — or local, e.g. transformers, ollama). Prefix families cover langchain*, llama-index*, azure-ai-*, @langchain/*, and @ai-sdk/*.

What it never records

  • Key values. Hardcoded-key findings record the key TYPE, file, and line only. The matched secret never appears in findings, summaries, JSON output, or CLI output.
  • Env-var values. Environment findings record variable names only.
  • File contents. Only classification evidence (package name, URL host, env-var name, key type) is retained.
Scans are honest about coverage: files skipped due to the size cap (max_file_bytes, default 1 MB), the file-count cap (max_files, default 5000), or read errors are counted and surfaced as a skipped N file(s) note — never silently dropped. skip_dirs overrides the default skip list.

Quickstart

CLI:
audit scan exits with code 1 when hardcoded AI API keys are found, 0 otherwise — suitable for CI gates.

JSON output shape

A top-level "note" field appears when files were skipped.

Cost chargeback

CostTracker (see multimind.observability.cost_tracker) already records per-call token/cost entries with optional tags. Chargeback groups those records per tag (chargeback() returns period, calls, total_cost, and by_tag):
Untagged calls are grouped under (untagged). Each tag reports calls, input_tokens/output_tokens/total_tokens, cost, estimated_calls, unpriced_calls, and share_pct (percentage of total cost; shares sum to 100 when any cost was recorded). CLI: