Skip to main content

Installer for the NanoMind Analyst daemon: serves the Qwen3-1.7B security analyst NLM behind an input-classifier gate over a Unix socket.

Project description

nanomind-analyst

Installer for the NanoMind Analyst daemon. The daemon serves the Qwen3-1.7B security analyst NLM behind an input-classifier gate over a Unix socket at /tmp/nanomind-guard.sock. Consumers (hackmyagent, opena2a-cli, ai-trust) connect to that socket for generative threat analysis on individual findings.

This package writes a per-user launchd LaunchAgent, fetches and verifies the model artifacts from Hugging Face, and manages the daemon lifecycle. Apple Silicon (Darwin arm64) only in v0.1.

Install

pip install nanomind-analyst
nanomind-analyst install

The install step:

  1. Verifies platform (Apple Silicon required).
  2. Copies the input-classifier-v1 artifacts (bundled in the wheel) into ~/Library/Application Support/nanomind-analyst/artifacts/input-classifier-v1/. SHA256 verified before copy.
  3. Fetches the Analyst NLM (~3.4 GB) from opena2a/nanomind-security-analyst at the pinned v3.0.0 commit. SHA256 verified after fetch.
  4. Writes a launchd plist to ~/Library/LaunchAgents/org.opena2a.nanomind-analyst.plist.
  5. Bootstraps the LaunchAgent into the user's gui session.
  6. Waits up to 60 seconds for the daemon to bind the socket and pass its healthz probe.

The fetch step is the long one (several minutes on first run; cached on subsequent runs).

Commands

Command What
nanomind-analyst install Full install flow. Idempotent.
nanomind-analyst uninstall Stop, unload, remove plist. --remove-artifacts also deletes the 3.4 GB NLM.
nanomind-analyst start Kickstart the loaded LaunchAgent.
nanomind-analyst stop SIGTERM the daemon. Agent stays loaded; no auto-restart on clean exit.
nanomind-analyst restart Stop then start.
nanomind-analyst status Report whether the agent is loaded and healthz returns ready.
nanomind-analyst logs Tail ~/Library/Logs/nanomind-analyst.log. --no-follow for one-shot.
nanomind-analyst --version Print the package version.

What gets written where

Path Purpose
~/Library/LaunchAgents/org.opena2a.nanomind-analyst.plist LaunchAgent plist.
~/Library/Application Support/nanomind-analyst/artifacts/input-classifier-v1/ Classifier joblib + meta.json (~5 KB).
~/Library/Application Support/nanomind-analyst/artifacts/nanomind-security-analyst/ NLM weights, tokenizer, configs (~3.4 GB).
~/Library/Logs/nanomind-analyst.log Daemon stdout + stderr.
/tmp/nanomind-guard.sock Unix socket the daemon binds (0600, owner-only).

No root, no /opt, no sudo.

Trust chain

The install does not depend on Hugging Face being trustworthy. The wheel manifest is the authoritative source of artifact identity:

  1. PyPI Trusted Publishing (OIDC) attests the wheel was built by the workflow at .github/workflows/release-nanomind-analyst.yml from a commit in opena2a-org/nanomind (SLSA v1 provenance).
  2. The wheel bakes EXPECTED_NLM_SAFETENSORS_SHA256 and EXPECTED_NLM_TOKENIZER_SHA256 constants in artifacts.py.
  3. At install, the fetched NLM files are SHA256-verified against those constants. A tampered Hugging Face artifact causes install to refuse.
  4. At daemon boot, INPUT_CLASSIFIER_JOBLIB_SHA256 is re-verified before joblib.load() runs (joblib uses pickle = arbitrary code execution at deserialization).

Verify wheel provenance after publish:

npm  # no equivalent; use:
python -m pip download nanomind-analyst --no-deps --dest /tmp/verify
# Then inspect the wheel's METADATA + RECORD; PyPI surfaces attestations
# at https://pypi.org/project/nanomind-analyst/#files

Linux / cloud daemon

Not supported in v0.1. The daemon is bf16 on Apple MPS; fp16 yields 0% accuracy on Qwen3-1.7B. Cross-platform inference is tracked in opena2a-org/nanomind issues with the labels nanomind-analyst + platform-linux.

Known limitations

  • Cold-boot latency. Daemon takes ~30 seconds to load the NLM on first request after a system reboot. The install flow waits up to 60 seconds for this; subsequent restarts are faster (the launchd-managed process stays warm).
  • NLM latency floor. The Analyst NLM emits ~400 tokens of structured output per request at ~15 ms/token on bf16 MPS. Floor is ~6 seconds per finding. Consumers (HMA, opena2a-cli) should batch or filter before invoking. The input-classifier gate bypasses the NLM on off-topic inputs (~92% bypass rate on benign user input).
  • Single-instance. The daemon binds a single Unix socket. Multiple nanomind-analyst install runs on the same machine share the same socket; the LaunchAgent label is unique to the user.

Companion package

hackmyagent (npm) --nanomind flag uses this daemon. After installing this package, hackmyagent nanomind setup detects the nanomind-analyst CLI on PATH and shells out to nanomind-analyst install. If the CLI is missing, it prints the pip install instructions.

Model card

opena2a/nanomind-security-analyst. v3.0.0 (Qwen3-1.7B SFT LoRA r=64), Apache-2.0.

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nanomind_analyst-0.1.3.tar.gz (53.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nanomind_analyst-0.1.3-py3-none-any.whl (43.7 kB view details)

Uploaded Python 3

File details

Details for the file nanomind_analyst-0.1.3.tar.gz.

File metadata

  • Download URL: nanomind_analyst-0.1.3.tar.gz
  • Upload date:
  • Size: 53.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nanomind_analyst-0.1.3.tar.gz
Algorithm Hash digest
SHA256 00febe343018a7daa95c77c6b65362ff895130ccfc0c1eb9ed2e3b97b601127b
MD5 2b904ead5759163b08970556c6b3a05e
BLAKE2b-256 daf2c5386d3ca432d3cf8dd3dac3b4197254b588c051f1f9171dd858cdc9806a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanomind_analyst-0.1.3.tar.gz:

Publisher: release-nanomind-analyst.yml on opena2a-org/nanomind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanomind_analyst-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nanomind_analyst-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8a0c366e145768baf7529c8fe823e712d7211697370601261e323f68295f3daf
MD5 ee36e8e891862bf9dc77ab251f0158a9
BLAKE2b-256 3b405494686579f3b795ff5e33cc8deb44ddb6521907c0cc8147363fb141305b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanomind_analyst-0.1.3-py3-none-any.whl:

Publisher: release-nanomind-analyst.yml on opena2a-org/nanomind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page