Metadata-Version: 2.4
Name: telos-gov
Version: 2.0.0a2
Summary: TELOS governance engine -- fidelity scoring, primacy math, and cryptographic audit trails for AI agents
Author-email: "TELOS AI Labs Inc." <JB@telos-labs.ai>
License: Proprietary
Project-URL: Homepage, https://telos-labs.ai
Project-URL: Documentation, https://github.com/TELOS-Labs-AI/telos-openclaw/tree/main/docs
Project-URL: Repository, https://github.com/TELOS-Labs-AI/telos-openclaw
Project-URL: Issues, https://github.com/TELOS-Labs-AI/telos-openclaw/issues
Keywords: ai-governance,ai-safety,alignment,primacy-attractor,embedding-governance,nist-ai-rmf,eu-ai-act,agent-governance,autonomous-agents,openclaw
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Security
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24.0
Requires-Dist: pyyaml>=6.0.0
Requires-Dist: click>=8.1.0
Requires-Dist: cryptography>=41.0.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: onnx
Requires-Dist: onnxruntime>=1.16.0; extra == "onnx"
Requires-Dist: tokenizers>=0.15.0; extra == "onnx"
Requires-Dist: huggingface_hub>=0.20.0; extra == "onnx"
Provides-Extra: embeddings
Requires-Dist: sentence-transformers>=2.2.0; extra == "embeddings"
Provides-Extra: setfit
Requires-Dist: setfit>=1.0.0; extra == "setfit"
Provides-Extra: langgraph
Requires-Dist: langgraph>=0.0.20; extra == "langgraph"
Requires-Dist: langchain-core>=0.1.0; extra == "langgraph"
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Provides-Extra: full
Requires-Dist: telos-gov[embeddings,langgraph,onnx,setfit]; extra == "full"
Dynamic: license-file

# telos-gov

**Governance engine for autonomous AI agents.** Fidelity scoring, primacy math, cryptographic audit trails, and graduated response -- all in a single compiled package.

`telos-gov` is the engine behind [telos-openclaw](https://github.com/TELOS-Labs-AI/telos-openclaw), the governance adapter for OpenClaw autonomous agents.

## Install

```bash
pip install telos-gov
```

Or with ONNX embedding support (recommended):

```bash
pip install telos-gov[onnx]
```

## Quick Start

```python
from telos_gov import AgentConfig, load_config, AgenticFidelityEngine, AgenticPA

# Load a governance configuration
config = load_config("my_agent.yaml")

# Build a Primacy Attractor from the config
pa = AgenticPA.create_from_template(template)

# Score an agent action
engine = AgenticFidelityEngine(pa, config)
result = engine.score(tool_name="read_file", action_text="Read the config file")

print(result.decision)       # EXECUTE, CLARIFY, SUGGEST, INERT, or ESCALATE
print(result.composite)      # 0.0 - 1.0 fidelity score
```

## What's Inside

- **6-dimension fidelity scoring** -- purpose, scope, tool, boundary, chain continuity, composite
- **Two-layer detection** -- baseline normalization (Layer 1) catches extreme off-topic, basin membership (Layer 2) catches purpose drift
- **SetFit boundary classifier** -- ML-validated boundary detection (AUC 0.990)
- **Attack corpus** -- adversarial pattern matching for prompt injection, data exfiltration, RCE
- **Ed25519 cryptographic audit** -- signed governance receipts, gate transitions, PA verification
- **TKeys privacy layer** -- session-bound AES-256-GCM encryption for governance telemetry
- **Graduated response** -- EXECUTE / CLARIFY / SUGGEST / INERT / ESCALATE verdicts

## For OpenClaw Users

If you're governing an OpenClaw agent, install the adapter instead:

```bash
pip install telos-openclaw
```

This pulls `telos-gov` automatically. See the [telos-openclaw docs](https://github.com/TELOS-Labs-AI/telos-openclaw) for integration guides.

## Public API

The `telos_gov` package exposes a stable facade over the compiled engine internals. See [API Reference](https://github.com/TELOS-Labs-AI/telos-openclaw/blob/main/docs/API.md) for the full surface (30 symbols across 12 sub-modules).

## Distribution

`telos-gov` ships as a **compiled wheel only** (`.so` files, no Python source for engine internals). The `telos_gov/` facade layer ships as readable `.py` re-exports.

Available wheels:
- macOS arm64 (Apple Silicon): Python 3.10, 3.11, 3.12

Linux wheels coming soon.

## License

Proprietary / All Rights Reserved. Copyright 2025-2026 TELOS AI Labs Inc. Free to install and use. No redistribution, no reverse engineering, no decompilation. Enterprise source code access available under separate agreement -- contact JB@telos-labs.ai. The open-source adapter ([telos-openclaw](https://github.com/TELOS-Labs-AI/telos-openclaw)) is Apache 2.0.
