Skip to main content

agent-assurance

English · Español

A methodology and test harness for assessing the security of LLM agents and applications in production, mapped to the OWASP Top 10 for LLM Applications and the NIST AI RMF.

Tests Python 3.11+ License: Apache-2.0

▶ See a sample report — generated on every push by the offline demo scan, against a recorded vulnerable agent.

Sample report: findings by severity, with reproducible evidence for each one

Distilled from real audits of conversational agents in production. This repository publishes the methodology and the harness; the reports delivered to clients are confidential.


Why it exists

Companies are shipping LLM agents (customer service, HR, sales, quoting) very fast, and almost none of them get audited. The attack surface is not the one a classic web pentest covers: it is system-prompt leakage, tampering with business data, excessive agency and unbounded consumption. agent-assurance turns those checks into tests that are repeatable, auditable and comparable between assessments.

The central design principle: a probe that finds nothing is not a failure. It is a working defense, observed, and the report records it as such. That is the difference between an audit and a list of complaints.

Ethical scope (a project invariant)

Probes prove that a vector exists. They never exploit it:

  • No sustained flooding or DoS: only minimal bursts to observe the rate limit.
  • No email is sent to real third parties.
  • The debugger PIN is never derived and no code is executed on the target server.
  • Every test respects the target's rate limit.

Use it only on systems you own or have explicit written authorization to test.

Probe catalog

Probe OWASP What it detects
verbose-errors LLM02 Raw errors from the LLM provider returned to the client (leaks provider, content policy, versions).
type-confusion CONFIG Unexpected input type → unhandled exception; with Flask debug=True it exposes the Werkzeug debugger (potential RCE).
system-prompt-leak LLM07 System-prompt extraction through sentence continuation and an "internal audit" pretext.
data-integrity LLM01 The agent accepts user-supplied data as authoritative (confirms made-up prices).
unbounded-input LLM10 No input length cap → token-cost amplification.

Each probe produces Findings with severity, impact, fix and reproducible evidence (trimmed request and response).

Usage

# The PyPI package is `llm-agent-assurance` (the name `agent-assurance` on PyPI
# belongs to an unrelated project). The command and the import keep the short name.
pip install llm-agent-assurance

# See the methodology end to end against a recorded demo agent (no network):
agent-assurance demo            # add --lang es for the Spanish report

# Audit a real chat endpoint (POST JSON {"message": "..."}):
agent-assurance scan https://your-service/api/chat --field message

# Audit a Spanish-speaking agent (Spanish probes and report):
agent-assurance scan https://your-service/api/chat --field mensaje --lang es

As a library:

from agent_assurance import scan, render_markdown, HttpTransport

transport = HttpTransport(
    url="https://your-service/api/chat",
    body_builder=lambda msg: {"message": msg},
    extract=lambda data: data.get("reply", ""),
)
assessment = scan(transport, target_label="HR agent v2", lang="en")  # "en" (default) or "es"
print(render_markdown(assessment, lang="en"))        # Markdown report, ready for the client
print("Max severity:", assessment.max_severity.label("en"))

In CI, agent-assurance scan exits with code 2 when any finding is High or Critical. Use it as a gate before promoting an agent to production.

Language note. Reports, probe prompts and the recorded demo agent are in English by default. Pass --lang es (CLI) or lang="es" (library) for Spanish. Probes talk to the target in the chosen language and look for response markers in that language, so set it to the language the target agent speaks.

Design

Transport (Protocol)          how to talk to the agent (real HTTP or recorded)
   │
   ▼
Probe.run(transport) ──► ProbeResult   findings + observed defenses + not assessable
   │
   ▼
scan(...) ──► Assessment ──► render_markdown() ──► report
  • Abstract transport: probes are testable without a network by injecting recorded responses from real agents.
  • Resilient: if a probe fails (for example, the endpoint goes down mid-audit), it is recorded as "not assessable" and the assessment continues, as it would in a real audit.
  • The report is the product: the vocabulary in the code (severities, OWASP taxonomy) is the one that appears in the deliverable.

Development

pip install -e ".[dev]"
pytest

License

Apache-2.0. The methodology is open; client reports are not.


Author: Giocrisrai Godoy Bonillo — AI Engineer. I audit LLM agents in production and also build and operate them. Available for LLM security assessments: contact@giocrisrai.com

Metadata

Release files for llm-agent-assurance 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 llm-agent-assurance 0.2.0
File Size Uploaded Provenance Actions
llm_agent_assurance-0.2.0.tar.gz 2.5 MB Without provenance Details for llm_agent_assurance-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llm-agent-assurance 0.2.0
File Interpreter ABI Platform Actions
llm_agent_assurance-0.2.0-py3-none-any.whl Python 3 none any Details for llm_agent_assurance-0.2.0-py3-none-any.whl

Total release size: 2.6 MB

Release files / llm_agent_assurance-0.2.0.tar.gz

Download URL llm_agent_assurance-0.2.0.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
f89c1df205c646875ff19b31fb69b57a89973bd1e4dea122754b6c68936612ef
BLAKE2b-256 checksum
How to use checksums
0dcf205ca4a98e0acfb9776a6c1fc30087b2654719becc1b77b9b14e61151e5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

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

Download URL llm_agent_assurance-0.2.0-py3-none-any.whl
Size 31.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9b9872f7e0fe4e1cb2f2ca4ceee8cb3c86d8d4908e95e3cfb8775f4f8d0b18a
BLAKE2b-256 checksum
How to use checksums
067b33085aa604d5d65d4eed2d9ae49f8fe5e2cb8bd203cc99c05bb9e9241789
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for llm-agent-assurance 0.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.2.0 This release

2 release files No 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