Metadata-Version: 2.4
Name: netzilo
Version: 4.1.124
Summary: Netzilo AI Detection & Response (AIDR) — governance for Python AI agents.
Author: Netzilo
License: Proprietary
Project-URL: Homepage, https://www.netzilo.com
Keywords: ai,agent,governance,security,aidr,netzilo
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Provides-Extra: crewai
Requires-Dist: crewai; extra == "crewai"
Provides-Extra: langgraph
Requires-Dist: langgraph; extra == "langgraph"
Provides-Extra: autogen
Requires-Dist: autogen-core; extra == "autogen"

# 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, no proxy to stand up.

## Install

```bash
pip install netzilo
```

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

## Core API

API mirrors the C exports — `start` / `stop` / `is_running`.

```python
import netzilo

netzilo.start({"management_url": "https://srv.netzilo.com",
               "pat": "nzl_...",           # or "setup_key": "..."
               "agent_name": "my-agent"})  # non-blocking; policy pulled in background

netzilo.is_running()                       # -> bool
allowed, reason = netzilo.is_allowed("Bash", {"command": "rm -rf /"})
netzilo.report_result("Bash", "<stdout>")  # post-tool observability
netzilo.stop()                             # graceful stop (auto-registered atexit)
```

Evaluation runs **inside the process** — `evaluate()` calls the embedded engine
directly, with no HTTP roundtrip and no local port to manage.

## 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.

```python
# 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={...})])
```

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 |
|-----|-------------|
| `management_url` | Your Netzilo management server. |
| `pat` / `setup_key` | Credential used to enroll the agent. |
| `agent_name` | Identifier this agent reports as. |
| `config_path` | Where to store local client state (default under the home dir). |
| `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.
- For local development against a locally built library, set `NETZILO_LIB_PATH`
  to its path.

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