Skip to main content

Netzilo AI Detection & Response (AIDR) — governance for Python AI agents.

Project description

netzilo (Python)

Netzilo AI Detection & Response(AIDR) for Python

Provides full governance for custom AI agents written in Python

How it works

The Netzilo client is compiled to a native shared library and loaded in-process via ctypes. Every LLM prompt, model response, and tool call your agent makes can be evaluated — allowed, blocked, or redacted — against policy pulled live from your Netzilo management server. No daemon, no sidecar — nothing to stand up.

Install

pip install netzilo

Wheels are published per platform (Linux, macOS, Windows) and are independent of your Python version.

Core API

import netzilo

netzilo.start(server="https://srv.netzilo.com",   # management server
              pat="nzl_...",                       # or setup_key="..."
              agent_name="my-agent")               # non-blocking

netzilo.is_running()                       # -> bool: True once policy has synced (ready to govern)
netzilo.mcp_gateway_port()                 # -> int: scanner gateway port in use (auto-picked)
allowed, reason = netzilo.is_allowed("Bash", {"command": "rm -rf /"})
netzilo.report_result("Bash", "<stdout>")  # post-tool observability
netzilo.flush()                            # force-deliver buffered events to management
netzilo.snapshot()                         # force AIDR behavior-graph snapshot + delivery (else hourly/at-stop)
netzilo.stop()                             # graceful stop (snapshots graph + flushes events; auto-registered atexit)

Parameters may be passed as keyword args (above) or a single config dict. config_path defaults to ~/.netzilo-sdk/config.json; ports auto-pick free ports (governance on by default). is_running() returns True only after the initial policy sync — poll it before kicking off work.

Evaluation runs inside the processevaluate() calls the embedded engine directly, with no HTTP roundtrip and no local port to manage.

Advanced governance (enable_advanced_governance=True)

Framework adapters (below) govern at the tool/LLM-hook layer. Advanced governance adds deep inspection of the agent's own outbound traffic — covering every prompt, response, and tool call (including from subprocesses and libraries you have no hook for), with full content analysis and semantic classification:

netzilo.start(server=..., pat=..., agent_name=..., enable_advanced_governance=True)

It is fully automatic and requires no root and no changes to the host — the SDK prepares the process so the agent's traffic is inspected and continues to work normally. Inspected prompts/responses are analyzed and classified, emitting semantic.event records to your dashboard alongside the usual tool/LLM events. Default off; the framework adapters govern without it.

Framework adapters

Adapters are submodules of the one netzilo package — no separate installs. Each is a single call. The framework is imported lazily inside the adapter, so pip install netzilo never pulls crewai/langgraph/autogen unless you use it.

# CrewAI — registers before/after tool and LLM hooks process-wide
from netzilo.crewai import govern
govern(config={...})

# LangGraph — wrap nodes before compile()
import netzilo.langgraph
netzilo.langgraph.govern(graph, config={...})

# AutoGen — intervention handler
from netzilo.autogen import handler
runtime = SingleThreadedAgentRuntime(intervention_handlers=[handler(config={...})])

CrewAI: local vs CrewAI AMP

Local / self-hosted — put govern() once at the top of your entrypoint, before kickoff(). That's it.

import netzilo.crewai
netzilo.crewai.govern(config={"server": "...", "pat": "...", "agent_name": "my-agent"})

MyCrew().crew().kickoff(inputs={...})   # governed

CrewAI AMP — AMP's managed runtime only executes Flow @start/@listen methods; it skips module-level code, lifecycle hooks, and tool bodies. So the same govern() call goes inside a Flow @start step, then your crew runs in @listen. Deploy with [tool.crewai] type = "flow" in pyproject.toml, and always create the automation fresh as a flow (the type is locked at creation — re-pushing cannot convert an existing crew automation).

from crewai.flow import Flow, listen, start
import time

class MyFlow(Flow):

    @start()
    def init_governance(self):
        import netzilo, netzilo.crewai
        netzilo.crewai.govern(config={"server": "...", "pat": "...", "agent_name": "my-agent"})
        while not netzilo.is_running():   # wait until policy has synced
            time.sleep(0.5)

    @listen(init_governance)
    def run(self):
        return MyCrew().crew().kickoff(inputs={...})   # governed

Optional convenience extras pull a framework alongside netzilo: pip install netzilo[crewai], netzilo[langgraph], netzilo[autogen].

Configuration

start() / govern() accept a config dict. Common keys:

Key Description
server Your Netzilo management server URL. (management_url is a legacy alias.)
pat / setup_key Credential used to enroll the agent.
agent_name Identifier this agent reports as (used for event attribution).
config_path Local client state (default: ~/.netzilo-sdk/config.json).
mcp_gateway_port Optional; defaults to an auto-picked free port. mcp_gateway_port=0 disables governance.
enable_advanced_governance Optional (default off). Deep inspection of the agent's own outbound traffic with semantic classification.
log_level / log_file Logging verbosity and destination.

Notes

The native library is bundled inside the wheel; pip selects the correct one for your platform automatically. Adapters ship inside the same wheel as submodules — a single distribution, not per-framework packages.

Netzilo is a commercial product. See https://www.netzilo.com.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

netzilo-4.3.14-py3-none-win_amd64.whl (26.0 MB view details)

Uploaded Python 3Windows x86-64

netzilo-4.3.14-py3-none-manylinux_2_28_x86_64.whl (34.5 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

netzilo-4.3.14-py3-none-manylinux_2_28_aarch64.whl (31.8 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

netzilo-4.3.14-py3-none-macosx_11_0_arm64.whl (23.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

netzilo-4.3.14-py3-none-macosx_10_13_x86_64.whl (25.3 MB view details)

Uploaded Python 3macOS 10.13+ x86-64

File details

Details for the file netzilo-4.3.14-py3-none-win_amd64.whl.

File metadata

  • Download URL: netzilo-4.3.14-py3-none-win_amd64.whl
  • Upload date:
  • Size: 26.0 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for netzilo-4.3.14-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 508ddd13a93b1787b784ee64fe7d85b638220149a52ff6467ec9e111067ca048
MD5 1fc2579045e91d964bb6b17f7df8042c
BLAKE2b-256 46f195a21482e9ad289987b7cda98184507c037cd5a4dda37ff74ef4503ec71b

See more details on using hashes here.

File details

Details for the file netzilo-4.3.14-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for netzilo-4.3.14-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 06ed7a848648d9a6669a25a990073009f5170f93775050de1d33af6a9810c24a
MD5 b9fcb82aa4cd0f06d48d87f08830d7a3
BLAKE2b-256 255cd031d49c30009c0e6f632c160641880b8c04a353a29017b1516fe5aba2ba

See more details on using hashes here.

File details

Details for the file netzilo-4.3.14-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for netzilo-4.3.14-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d47cd5d92317bb9f88d8a39bfa448aa998c7a57aca874d11659d1c01abed8c9a
MD5 384e466c52a099efb7ad0451234428dd
BLAKE2b-256 de172bf1b35d318a5c279ed1ecb67178184199d780916b5e1f4d8aae17ad13ce

See more details on using hashes here.

File details

Details for the file netzilo-4.3.14-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for netzilo-4.3.14-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 91202299444ad660487a533388c1e2ba28e6cf71f2f978b9b0ca4cb78d4bc24d
MD5 ccc03cc495a623c077911e0290c5d260
BLAKE2b-256 461c21690861031d6f0910d51f49f2b10ebca8c0335702ca5783c59061bd6815

See more details on using hashes here.

File details

Details for the file netzilo-4.3.14-py3-none-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for netzilo-4.3.14-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 a93eefde615c667f5e4cc658ac6d8954eb6add20277d4bfc447986831c476cc2
MD5 970b61c93c0d02a31c73183844765b42
BLAKE2b-256 961b77ff714e1ff923ef9e92dc30f2a3a0a56648ae80b7e6aabd44ca5de6e2c1

See more details on using hashes here.

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