← NVIDIA BioNeMo Agent ToolkitCONTENT HISTORY

Update to NVIDIA BioNeMo Agent Toolkit

Snapshot Sep 30, 2026 · 23:14 UTC · version 0.1.0

Collection source: not recorded for this historical snapshot.

WHAT CHANGED · RULE-BASED ANALYSIS

First saved snapshot

No earlier snapshot is available to establish a change.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "name": "molmim-nim",
  "description": "Use this skill for MolMIM, NVIDIA's BioNeMo NIM microservice for small-molecule latent-space generation and optimization. Invoke for MolMIM, molecular embeddings, hidden states, latent decoding, sampling around a seed SMILES, CMA-ES guided molecule generation, QED or plogP optimization, hosted NVIDIA API calls, or local Docker deployment.",
  "included_files": [
    {
      "relative_path": "references/api.md",
      "size_in_bytes": 4565
    },
    {
      "relative_path": "references/examples.md",
      "size_in_bytes": 2169
    },
    {
      "relative_path": "references/parameters.md",
      "size_in_bytes": 2005
    },
    {
      "relative_path": "references/science.md",
      "size_in_bytes": 2255
    },
    {
      "relative_path": "references/validation.md",
      "size_in_bytes": 1759
    }
  ],
  "skill_md_contents": "---\nname: molmim-nim\ndescription: >\n  Use this skill for MolMIM, NVIDIA's BioNeMo NIM microservice for small-molecule latent-space generation and optimization. Invoke for MolMIM, molecular embeddings, hidden states, latent decoding, sampling around a seed SMILES, CMA-ES guided molecule generation, QED or plogP optimization, hosted NVIDIA API calls, or local Docker deployment.\nlicense: Apache-2.0 AND CC-BY-4.0\ncompatibility: \"requests>=2.28; rdkit\"\nallowed-tools: Bash, Read, Write, AskUserQuestion\n---\n\n# MolMIM NIM\n\nGenerate, sample, embed, and decode small molecules with MolMIM. Use this\n`SKILL.md` for first-pass hosted/local usage; load supplemental files only when\nneeded:\n\n- `references/api.md`: endpoints, schema, Docker flags, response fields.\n- `references/science.md`: use cases, strengths, limits, and handoffs.\n- `references/parameters.md`: generation, sampling, and optimization effects.\n- `references/validation.md`: SMILES/property/artifact checks.\n- `references/examples.md`: compact hosted/local request patterns.\n\n## Choose Mode\n\nAsk only when context is unclear:\n\n> Hosted NVIDIA API or local Docker NIM?\n\n- Hosted generation: `https://health.api.nvidia.com/v1/biology/nvidia/molmim/generate`\n- Local generation: `http://localhost:8000/generate`\n- Local embedding: `http://localhost:8000/embedding`\n- Local hidden state: `http://localhost:8000/hidden`\n- Local decode: `http://localhost:8000/decode`\n- Local sampling: `http://localhost:8000/sampling`\n- Local readiness: `http://localhost:8000/v1/health/ready`\n\nMode difference: the hosted API reference exposes `/generate`; the local\ncontainer exposes the broader latent-space workflow (`/embedding`, `/hidden`,\n`/decode`, `/sampling`, `/generate`). Do not invent hosted latent endpoints.\n\nHosted requests use `Authorization: Bearer $NGC_API_KEY`. Local inference uses\nno auth header after readiness.\n\n## Local Docker\n\nUse shell env first; source repo-root `.env` only if present. Do not print keys.\nMolMIM docs use `NGC_CLI_API_KEY` for the local container; this repo accepts\n`NGC_API_KEY` or `NVIDIA_API_KEY` and maps to `NGC_CLI_API_KEY` for startup.\nMount `LOCAL_NIM_CACHE` at `/home/nvs/.cache/nim`.\n\n```bash\nset -a\n[ -f .env ] && . ./.env\nset +a\n\nif [ -z \"${NGC_API_KEY:-}\" ] && [ -n \"${NVIDIA_API_KEY:-}\" ]; then\n  export NGC_API_KEY=\"$NVIDIA_API_KEY\"\nfi\nif [ -z \"${NGC_CLI_API_KEY:-}\" ] && [ -n \"${NGC_API_KEY:-}\" ]; then\n  export NGC_CLI_API_KEY=\"$NGC_API_KEY\"\nfi\n: \"${NGC_CLI_API_KEY:?Set NGC_API_KEY, NVIDIA_API_KEY, or NGC_CLI_API_KEY}\"\n: \"${LOCAL_NIM_CACHE:?Set LOCAL_NIM_CACHE}\"\n\necho \"$NGC_CLI_API_KEY\" | docker login nvcr.io --username '$oauthtoken' --password-stdin\n\nexport NIM_TEST_GPU=\"${NIM_TEST_GPU:-0}\"\nmkdir -p \"${LOCAL_NIM_CACHE}\"\nchmod 777 \"${LOCAL_NIM_CACHE}\"\n\ndocker run --rm -it --name molmim \\\n  --runtime=nvidia \\\n  -e CUDA_VISIBLE_DEVICES=\"${NIM_TEST_GPU}\" \\\n  -e NGC_CLI_API_KEY \\\n  -v \"${LOCAL_NIM_CACHE}:/home/nvs/.cache/nim\" \\\n  -p 8000:8000 \\\n  nvcr.io/nim/nvidia/molmim:1.0.0\n```\n\nReadiness check:\n\n```bash\nuntil curl -sf http://localhost:8000/v1/health/ready; do sleep 5; done\n```\n\nLocal embedding smoke test after readiness. Local inference uses no\n`Authorization` header:\n\n```python\nimport requests\n\nseed = \"CN1C=NC2=C1C(=O)N(C(=O)N2C)C\"\nresponse = requests.post(\n    \"http://localhost:8000/embedding\",\n    headers={\"Content-Type\": \"application/json\"},\n    json={\"sequences\": [seed]},\n    timeout=60,\n)\nresponse.raise_for_status()\nembedding_data = response.json()\nembeddings = embedding_data[\"embeddings\"]\nprint(f\"received {len(embeddings)} embedding vector(s)\")\n```\n\n## Hosted Generation Pattern\n\nUse hosted `/generate` for seed-SMILES generation or optimization. Use\n`algorithm: \"CMA-ES\"` for guided property optimization and `algorithm: \"none\"`\nfor unguided sampling around the seed.\n\n```python\nimport os\nimport requests\n\nhosted = True\nurl = (\n    \"https://health.api.nvidia.com/v1/biology/nvidia/molmim/generate\"\n    if hosted else \"http://localhost:8000/generate\"\n)\nheaders = {\"Content-Type\": \"application/json\"}\nif hosted:\n    headers[\"Authorization\"] = f\"Bearer {os.environ['NGC_API_KEY']}\"\n\npayload = {\n    \"smi\": \"CN1C=NC2=C1C(=O)N(C(=O)N2C)C\",\n    \"algorithm\": \"CMA-ES\",\n    \"num_molecules\": 10,\n    \"property_name\": \"QED\",\n    \"minimize\": False,\n    \"min_similarity\": 0.4,\n    \"particles\": 8,\n    \"iterations\": 3,\n}\n\nresponse = requests.post(url, headers=headers, json=payload, timeout=180)\nresponse.raise_for_status()\nresult = response.json()\n```\n\nGeneration gotchas:\n\n- Field name is `smi`, not `smiles`.\n- `algorithm` is `\"CMA-ES\"` or `\"none\"`.\n- `property_name` is `\"QED\"` or `\"plogP\"`.\n- `num_molecules` is 1-100. `iterations` is 1-1000. `particles` is 2-1000.\n- `min_similarity` is 0-1 in the hosted API reference; local docs emphasize\n  common values up to 0.7 for constrained optimization.\n- `scaled_radius` is 0-2 and is mainly used with `algorithm: \"none\"` or local\n  `/sampling`.\n\n## Local Latent Workflow\n\nUse local-only endpoints for embedding, hidden-state manipulation, and decode.\nThis is also the surface used by the guided optimization example package.\nFor local latent workflows, state explicitly that the hosted API reference\nexposes `/generate`; `/embedding`, `/hidden`, `/decode`, and `/sampling` are\nlocal-only in the current docs.\n\n```python\nseed = \"CC(Cc1ccc(cc1)C(C(=O)O)C)C\"\nbase = \"http://localhost:8000\"\nheaders = {\"Content-Type\": \"application/json\"}\n\nembedding = requests.post(\n    f\"{base}/embedding\",\n    headers=headers,\n    json={\"sequences\": [seed]},\n    timeout=60,\n)\nembedding.raise_for_status()\nembedding_data = embedding.json()\nembeddings = embedding_data[\"embeddings\"]\nprint(f\"received {len(embeddings)} embedding vector(s)\")\n\nhidden = requests.post(\n    f\"{base}/hidden\",\n    headers=headers,\n    json={\"sequences\": [seed]},\n    timeout=60,\n)\nhidden.raise_for_status()\nhidden_data = hidden.json()\nhiddens = hidden_data[\"hiddens\"]\nmask = hidden_data[\"mask\"]\n\ndecoded = requests.post(\n    f\"{base}/decode\",\n    headers=headers,\n    json={\"hiddens\": hiddens, \"mask\": mask},\n    timeout=60,\n)\ndecoded.raise_for_status()\n\nsampled = requests.post(\n    f\"{base}/sampling\",\n    headers=headers,\n    json={\"sequences\": [seed], \"num_molecules\": 10, \"scaled_radius\": 0.7},\n    timeout=60,\n)\nsampled.raise_for_status()\n```\n\n## Save And Validate Output\n\nSave generated SMILES and validate before using them downstream.\n\n```python\nfrom pathlib import Path\nimport json\n\ndef molmim_smiles(result):\n    values = []\n    if isinstance(result.get(\"generated\"), list):\n        for item in result[\"generated\"]:\n            if isinstance(item, str):\n                values.append(item)\n            elif isinstance(item, list):\n                values.extend(x for x in item if isinstance(x, str))\n    molecules = result.get(\"molecules\")\n    if isinstance(molecules, str):\n        molecules = json.loads(molecules)\n    if isinstance(molecules, list):\n        for item in molecules:\n            if isinstance(item, dict) and isinstance(item.get(\"sample\"), str):\n                values.append(item[\"sample\"])\n    return values\n\ngenerated = molmim_smiles(result)\nif not generated:\n    raise RuntimeError(f\"MolMIM returned no generated molecules: {result}\")\n\nPath(\"molmim_response.json\").write_text(json.dumps(result, indent=2))\nPath(\"molmim_generated.smi\").write_text(\"\\n\".join(generated) + \"\\n\")\nfor i, smiles in enumerate(generated, start=1):\n    print(i, smiles)\n```\n\nUse RDKit when available to check parseability, uniqueness, simple property\nranges, and whether seed similarity constraints are plausible. Generated\nmolecules are candidates, not validated hits; use downstream property, docking,\naffinity, toxicity, and synthetic-feasibility checks before prioritization.\n\n## Troubleshooting\n\n- Hosted `404` on `/embedding`, `/hidden`, `/decode`, or `/sampling`: those\n  endpoints are local-only in the docs.\n- `401`: missing or unauthorized NGC key for hosted requests.\n- Hosted response parsing: live hosted `/generate` may return `molecules` as\n  a JSON string of `{sample, score}` objects, while local endpoints may return\n  `generated`; parse both.\n- `422`: invalid SMILES, unsupported `algorithm`, invalid `property_name`, or\n  parameter outside documented ranges.\n- Local startup auth: set `NGC_CLI_API_KEY`, or set `NGC_API_KEY`/`NVIDIA_API_KEY`\n  and map it as shown above.\n- Local startup cache misses: mount `LOCAL_NIM_CACHE` to `/home/nvs/.cache/nim`,\n  not `/opt/nim/.cache`.\n"
}

SHA-256: 91f6a0cdf9757d085608319ce249ad6c954abe7b4d584482c8471c265842fd2c