Skip to main content

agentspm

Agent Security Posture Management (Agent-SPM) blueprint for EU-regulated, self-hosted environments. agentspm inventories the AI agents an organization already runs — their identities, credentials, data access and enforcement-point routing — into a vendor-neutral asset graph with provenance, evaluates it against an auditable OPA/Rego policy pack (13 tri-state controls), and renders evidence-grade reports whose findings map to EU frameworks (NIS2/ZoKB, DORA, AI Act, GDPR, ISO 27001/42001 — every mapping status: verify until a human with a compliance role confirms it).

Status: public, v0.1 line (pre-1.0 — interfaces may still move). Install: pip install agentspm · releases carry keyless Sigstore signatures (verification: docs/ARCHITECTURE.md). All examples, fixtures and demo output are synthetic only (example.com / contoso domains, documented synthetic GUIDs) — see the claims rule in docs/LANGUAGE.md. No production data and no real tenant identifiers exist anywhere in this repository or its history (enforced by scripts/identifier_scan.py in hooks and CI).

The problem

Organizations are deploying AI agents faster than anyone writes down what those agents ARE: which identities they run under, which credentials and data stores they can reach, and which enforcement point governs them. When an auditor (or an incident) asks, the answer today is tribal knowledge. agentspm turns that question into a scanned, evidence-grade report — without touching or enforcing anything.

Works best next to an enforcement point such as ai-governance-gateway (same author): the gateway enforces and emits a signed posture feed; agentspm reads it — together with your IdP — into one asset graph with provenance. Each product stands alone; the pairing is a versioned, sha256-pinned HTTP contract, not a dependency.

What it is NOT

  • Posture, not enforcement. It finds, documents and maps — it never blocks, prevents or mutates anything. Runtime guardrails, DLP inspection and routing belong to an enforcement point (such as an LLM governance gateway); agentspm only reads its posture.
  • Not an agent framework. It does not build, host or orchestrate agents; it scans the estate of agents you already have.
  • Not legal advice and not a compliance verdict. Reports are evidence for your own assessment; unknown is reported as unknown, never scored as fail; framework anchors stay status: verify until confirmed by a person with a compliance role.
  • No web UI, no SaaS, no multi-tenant mode, no model artifact scanning.

Deployment model and identity providers — read this before a POC

  • Self-hosted only. There is no hosted or SaaS offering, and the tool phones home to no one: one CLI, one SQLite file, your infrastructure. That is a design decision for regulated environments, not a missing feature.
  • IdP coverage today — said out loud: the only implemented identity collector is Microsoft Entra ID (read-only, attribute-whitelisted). The gateway posture collector is IdP-agnostic (versioned HTTP contract). Other IdPs (Okta, Keycloak, on-prem AD) are a documented extension point (docs/INTEGRATION.md, "adding a collector"), not shipped code — if your estate lives in a different IdP, budget for writing a collector before you expect identity posture results.

Support

Actively developed, solo maintainer — support is best-effort via GitHub Issues; security reports go through the private channel in SECURITY.md (acknowledgement target 72 h). There is no SLA and no commercial support today. For procurement purposes this is internally supported OSS: plan your own operational ownership, the same way you would for any other tool you self-host.

Scope vs. microsoft/agent-governance-toolkit

The nearest OSS neighbor is the Microsoft Agent Governance Toolkit (MIT) — a broader governance toolkit, enforcement-first and aimed at governing agents through their lifecycle: discovery/AgentMesh, OPA/Cedar policy, SPIFFE/DID identity, sandboxing, tamper-evident audit, mappings to EU AI Act/NIST AI RMF/SOC 2.

agentspm is deliberately narrow: a posture/evidence scanner over the existing estate — read-only collectors (Entra ID, Git hosting, gateway posture API), an asset graph with per-attribute provenance and attested-vs-declared precedence, tri-state controls, and an evidence report whose anchors target the EU regulatory set including the Czech ZoKB — all self-hosted with zero infrastructure (one CLI, one SQLite file, no service). If you need lifecycle governance and enforcement, use a toolkit like AGT at the enforcement layer; agentspm is the independent posture reading and audit-evidence layer next to it.

Quickstart (synthetic, no network)

Runs the real pipeline against the built-in mock gateway — the output is labeled generated over synthetic fixtures:

uv sync                  # install (locked); includes the dev group the mock needs
scripts/setup-hooks.sh   # MANDATORY for contributors: SEC-D5 pre-commit/pre-push hooks

# 1) OPA engine — the one external binary. Download the exact version this
#    repo pins (same version+sha256 the container build enforces):
curl -sLo "$HOME/.local/bin/opa" \
  "https://openpolicyagent.org/downloads/v1.21.4/opa_linux_amd64_static"
echo "2ab571f367f293bb19523b76f92f1945bbf245003392c7f392903f95c2b9b630  $HOME/.local/bin/opa" | sha256sum -c -
chmod +x "$HOME/.local/bin/opa"

# 2) evaluate refuses to run an unpinned OPA engine — pin the binary you trust:
export AGENTSPM_OPA_PATH="$HOME/.local/bin/opa"
export AGENTSPM_OPA_SHA256="$(sha256sum "$AGENTSPM_OPA_PATH" | cut -d' ' -f1)"

# 3) report pseudonymizes by default and needs a key location — point it at
#    a file; the key is auto-generated on first use (0600):
export AGENTSPM_PSEUDO_KEY_PATH="$PWD/.agentspm-pseudo.key"

uv run agentspm scan --collector mock-gateway   # collect -> validate -> merge -> derive
uv run agentspm evaluate                        # pinned OPA, 13 tri-state controls
uv run agentspm report --format md --out report.md   # redacted profile (default)

Not ready to run anything yet? The exact output of this quickstart is committed as docs/examples/sample-redacted-report.md — synthetic fixtures, redacted profile, the real renderer.

Installed via pip install agentspm instead of a checkout? Everything above works the same (the wheel ships both the schemas and the policy pack); only the mock-gateway collector fixtures and the contributor hooks live in the repository.

Also available: --format json|sarif, agentspm export --encrypt age:<recipient> (requires ≥ 2 recipients), and agentspm doctor as the deployment preflight. On this synthetic run doctor will report failures (age recipients, and opa sha256 pin unless you exported the variable above) and a warning for the unconfigured evidence store: the quickstart configures neither, and both are export-side requirements. That is the preflight doing its job, not a broken install — a green doctor is a property of a configured deployment, not of a fresh clone. To scan your own tenant instead of the mock, follow docs/INTEGRATION.md.

Documentation

Document Content
docs/ARCHITECTURE.md pipeline, components, contracts, invariants, evidence & deployment in a regulated entity, exit/fork strategy
docs/INTEGRATION.md bring your own tenant/IdP: dedicated app registration, exact minimal scopes, doctor, manual-run rules, adding a collector
docs/PRIVACY.md GDPR position: purpose, art. 6(1)(f)/recital 49 with LIA template, minimization, dual-tier retention, art. 30 record, DPIA screening
docs/THREAT-MODEL.md threats T-01..T-17 with mitigations and status
docs/CONTROLS.md generated control reference (13 controls, framework anchors, all verify)
docs/LANGUAGE.md honest-claims rules (lint-enforced) incl. the fail-closed qualification and the synthetic-fixtures claims rule
docs/RELEASE-GATE.md two-stage release gate: quality (binding even privately) and publication
docs/GOVERNANCE.md schema-change process (ADR now, RFC from publication)
docs/adr/ architecture decision records

Repository layout

  • schema/v0.1/ — JSON Schema 2020-12 contracts (asset graph, findings); shipped inside the wheel. schema/examples/ — synthetic examples.
  • policies/v0.1/ — OPA/Rego policy pack: 13 tri-state controls, opa test suites, synthetic fixtures, controls.yaml anchors, pinned capabilities.json without network builtins.
  • src/agentspm/ — collectors, validator, graph store/merge/derive, evaluate, reporter (+ redaction), CLI.
  • contracts/gateway/v0.1/ — the gateway posture-read OpenAPI contract (owned here, vendored by consumers with a sha256 pin).
  • deploy/ — example config + Kubernetes CronJob reference; Containerfile — UBI9-minimal image; scripts/build_release.sh — wheel + SBOM + checksums.
  • scripts/ — CI/hook lints (identifier scan, language lint, policy lints).

Development

uv sync                  # install (locked)
scripts/setup-hooks.sh   # MANDATORY: installs pre-commit/pre-push hooks (SEC-D5)
uv run pytest            # tests
uv run ruff check .      # lint
uv run mypy src/         # types (strict)

License

  • Code and the OPA policy pack: Apache-2.0.
  • Documentation and the compliance framework mappings (docs/, the NIS2/DORA/ZoKB/AI Act anchor tables in docs/CONTROLS.md): CC-BY-4.0. If you reuse the mappings, attribute "the agentspm maintainers" and keep the status: verify qualifiers — the attribution travels with the caveat, not instead of it. The mappings are a reading aid, not legal advice; status: verify means exactly that.

Confirmed at the publication gate (docs/RELEASE-GATE.md, item P8, 2026-11-11).

Metadata

Release files for agentspm 0.1.2

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

Source distribution (sdist)

Source distribution for agentspm 0.1.2
File Size Uploaded Provenance Actions
agentspm-0.1.2.tar.gz 374.9 kB With provenance Details for agentspm-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentspm 0.1.2
File Interpreter ABI Platform Actions
agentspm-0.1.2-py3-none-any.whl Python 3 none any Details for agentspm-0.1.2-py3-none-any.whl

Total release size: 521.7 kB

Release files / agentspm-0.1.2.tar.gz

Download URL agentspm-0.1.2.tar.gz
Size 374.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bdac253e3fae3003c1ef405974cf1b1668fcacff1d6f874f6a3e0b908fce5b74
BLAKE2b-256 checksum
How to use checksums
39436560800b6a529e1eebf9ca1c3ea86a2015ff656ef98e4cc0654181d5e605
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / agentspm-0.1.2-py3-none-any.whl

Download URL agentspm-0.1.2-py3-none-any.whl
Size 146.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f34ed21ba87878539ddfd6d3459b0720285f42446476a3942c9c7d4de7c14cf
BLAKE2b-256 checksum
How to use checksums
601c11e62b2fb95459ac69ac8bede014e7131191ccd85991735a4e3bde4a7c37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Security for agentspm 0.1.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agentspm-0.1.2.tar.gz

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 Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files Full provenance

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