Skip to main content

conduct-nemo-guard

Conduct Guard as a NeMo Guardrails plugin. Every Colang flow and every LLM call routed through NeMo runs through your active Guard policy — block, warn, audit, or trigger a HITL approval, with the same signed configuration and hash-chained audit log as the rest of Conduct.

Follows the same shape as conduct-litellm-guard. Different host, same client, same policy contract.

Install

pip install conduct-nemo-guard

Wire it up

  1. Mint an agent token in the Conduct console (Settings → Agent identities). Copy the cond_agt_… value.

  2. Export it where your NeMo app runs:

    export CONDUCT_AGENT_TOKEN=cond_agt_...
    
  3. Register the conduct_guard_check action with your LLMRails instance and reference it from Colang:

    from nemoguardrails import LLMRails, RailsConfig
    from conduct_nemo_guard.actions import register_actions
    
    config = RailsConfig.from_path("./rails")
    rails = LLMRails(config)
    register_actions(rails)
    
    define flow policy_gate
      $decision = execute conduct_guard_check(tool_name="ask_bot")
      if $decision.verdict == "block"
        bot inform_blocked_by_policy
        stop
    
  4. (Optional, follow-up) Route NeMo's LLM traffic through Conduct's proxy with engine: conduct in config.yml. Placeholder lives in llm_provider.py; see the plugin epic for delivery timing.

What the plugin does

For every execute conduct_guard_check(...) call inside a Colang flow the plugin calls Conduct's guard_check tool (JSON-RPC over the MCP endpoint) with the flow context. Guard returns one of five verdicts:

Verdict Colang behaviour
ok / allow Flow continues.
advisory Flow continues; verdict + rule_id available on $decision.
warning Flow continues; verdict surfaced for the rail to render.
block Flow branches on $decision.verdict == "block".
approval Flow branches on $decision.verdict == "approval" — HITL pending.

Configuration reference

Same environment contract as the LiteLLM guardrail — a shared client lives in _client.py.

Env var Required Default Notes
CONDUCT_AGENT_TOKEN yes — cond_agt_* token minted in the Conduct console.
CONDUCT_API_URL no https://api.conductai.ai Point at a self-hosted Conduct API when needed.
CONDUCT_WORKSPACE_ID no resolved from the token Usually unnecessary — the token owns its workspace.

License

conduct-nemo-guard is distributed under the Apache License 2.0, the same license as the rest of Conduct and as nemoguardrails upstream.

Links

Metadata

Release files for conduct-nemo-guard 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for conduct-nemo-guard 0.2.0
File Size Uploaded
conduct_nemo_guard-0.2.0.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for conduct-nemo-guard 0.2.0
File Interpreter ABI Platform
conduct_nemo_guard-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.5 kB

Release files / conduct_nemo_guard-0.2.0.tar.gz

Download URL conduct_nemo_guard-0.2.0.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ee0fda57e260282109455382e7ac6450424ea0d49257af9b592bfdb036e3c8c0
BLAKE2b-256 checksum
How to use checksums
79fe660b5746940e13c6a72fac5c68aca0652e82f1b16337729d9bb08246ae23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / conduct_nemo_guard-0.2.0-py3-none-any.whl

Download URL conduct_nemo_guard-0.2.0-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
528590b42ee231c8d85b74b2ccc03dba25aab0a59e61c76ca60390b696d97a0e
BLAKE2b-256 checksum
How to use checksums
360b5ce1cfacf5cd50a033c1d9daf8afbf9c388f4eb10b16211369a873bfa952
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page