An offline lab for testing AI agents and detection coverage, where every result has evidence behind it.
agentproof runs a full, repeatable security engagement against a synthetic environment: it models an AI-assisted IT helpdesk, generates descriptive adversary scenarios, emulates their telemetry, replays a Sigma rule pack, measures detection gaps against MITRE ATT&CK and MITRE ATLAS, red-teams a mock LLM agent before and after controls, maps the controls to NIST AI RMF / ISO/IEC 42001 / EU AI Act, and produces a report. Each step runs behind human approval gates and is recorded in an audit log. Parts of the method are kept in a private package; see What is in this repository.
It has no runtime dependencies, makes no network calls, runs no shell commands and contains no exploit code.
- Python 3.10+; stdlib only (PyYAML optional)
- Package 20 modules, each owned by one agent role (CONTRIBUTORS.md)
- Tests 190+ unit and repository-hygiene tests for the public modules (
pytestorunittest) - License MIT
Teams putting LLM agents into production have to answer three questions with evidence, not slides:
- Break it: can the agent be pushed into leaking secrets, calling tools it shouldn't, or crossing tenants? Do the controls fix that without blocking legitimate work?
- Govern it: are risky actions gated by humans, is every decision attributable, and can the system be stopped?
- Prove it: can a reviewer trace each number in the report back to the inputs, and detect if anything was edited afterwards?
agentproof is a compact, readable reference implementation of that loop.
This public repository contains the agentproof framework: the CLI and orchestration scaffolding, data contracts, the zero-trust tool gateway, scope and tenancy controls, approval gates and kill switch, the Sigma-subset engine with its rule packs, synthetic telemetry and scenario generation, the mock and reference agents with their sandboxed fake tools, the governance mapping and the report renderer.
The core assessment method is maintained privately in the agentproof-core package and is
not included here:
- detection-gap scoring;
- the evidence store and the integrity format of the audit, approval and evidence logs;
- the red-team probe suites and their pass/fail logic.
These modules keep their public interfaces as stubs. Calling one raises
PrivateComponentUnavailable, and the CLI reports it with exit code 3. The public build fails
closed: the audit log records events but never reports itself as verified, so recorded
approvals are not trusted and gated runs do not proceed.
git clone https://github.com/phnoniusa-sudo/agentproof.git
cd agentproof
python -m venv .venv && . .venv/bin/activate
pip install -e .
agentproof rules list --pack core linux agent # browse the Sigma rule packs
agentproof catalog # ATT&CK / ATLAS technique catalog
agentproof schemas list # versioned data contracts
agentproof gates # human approval gates G1-G7agentproof run and agentproof agent-lab need the private agentproof-core package; without
it they stop with a clear message.
Run the tests:
pip install -e ".[dev]" && pytest
# or, with no installs at all:
PYTHONPATH=src python -m unittest discover -s tests -t .flowchart LR
subgraph Inputs
SM[Scope manifest<br/>scope]:::in
SD[System description]:::in
end
subgraph Control plane
RT[Supervisor + gates G1-G7<br/>runtime]
KS[Kill switch]
GW[Zero-trust gateway<br/>gateway]
RG[Registry<br/>registry]
TN[Tenant guard<br/>tenancy]
end
subgraph Analysis pipeline
SF[Attack surface<br/>surface] --> AG[Scenarios<br/>attackgen]
TI["ATT&CK / ATLAS catalog<br/>threatintel"] --> AG
AG --> EM[Synthetic telemetry<br/>emulation]
EM --> SG[Sigma engine + rules<br/>sigma]
SG --> DG[Gap analysis<br/>detectgap]
DG --> DR[Draft rules<br/>sigma]
RTM[Red-team harness vs mock or reference agent<br/>redteam]
end
subgraph Assurance
AU[(Tamper-evident audit<br/>monitoring)]
EV[(Evidence + provenance<br/>evidence)]
GOV[Governance mapping<br/>governance]
REP[Report + draft message<br/>delivery]
CF[Self-verification<br/>conformance]
end
SM --> RT
SD --> SF
RT --> SF
RTM --> GW
RTM -.agent telemetry.-> SG
GW --> RG
GW --> TN
KS -.halts.-> RT
DG --> GOV
RTM --> GOV
GOV --> REP
RT -.every step.-> AU
GW -.every decision.-> AU
SF & AG & EM & SG & DG & RTM & GOV & REP --> EV
AU --> CF
EV --> CF
REP --> CF
classDef in fill:#eef,stroke:#88a
Deeper write-ups:
- docs/ARCHITECTURE.md: modules, data flow, contracts, determinism
- docs/APPROVAL_GATES.md: G1-G7, content binding, demo vs human mode
- docs/THREAT_MODEL.md: what the lab defends against, and its limits
| Module | Owner role | What it does |
|---|---|---|
cli |
Zion | Orchestrates the engagement end to end; CLI |
contracts |
SchemaSteward | 8 versioned JSON Schemas, stdlib validator, serialisation helpers |
gateway |
GatewayWarden | Default-deny tool gateway: registry, binding, scope, tenant, argument checks |
scope |
ScopeGuard | Rules of engagement: assets, CIDRs, tools, forbidden actions, window, risk ceiling |
runtime |
RuntimeSupervisor | Step supervisor with budget/autonomy ceiling, gates G1-G7, kill switch |
evidence |
EvidenceKeeper | Evidence store interface (implementation in agentproof-core) |
registry |
RegistryKeeper | Agents, tools, models; binding and revocation |
tenancy |
TenantGuard | Namespaced storage, cross-tenant denial, foreign-marker scan |
monitoring |
IncidentWatch | Audit event log, metrics, incident rules and hooks |
reliability |
ReliabilityOps | Retry/backoff, idempotency keys, circuit breaker, checkpoints |
delivery |
DeliveryLead | Gate-guarded engagement state machine; Markdown/HTML report |
threatintel |
ThreatIntel | Curated technique catalog (34 ATT&CK, 5 ATLAS entries) |
surface |
SurfaceMapper | Components, trust boundaries, exposure rules |
attackgen |
AttackGen | Descriptive scenarios; refuses anything that looks executable |
emulation |
EmulationRunner | Deterministic synthetic telemetry (RFC 5737 / .example only) |
redteam |
AIRedTeam | Mock agent and offline tool-using reference agent (3 profiles), harness interfaces |
detectgap |
DetectGap | Detection-gap interface (implementation in agentproof-core) |
sigma |
SigmaWriter | Sigma-subset engine, 3 packs (core 10, Linux 24, agent 17 rules), YAML loader, drafts |
governance |
AIGPReport | Indicative control mapping to NIST AI RMF, ISO/IEC 42001, EU AI Act |
conformance |
QualityGate | Contract and hygiene checks over a finished run; tests; CI |
- Approvals are bound to content. Each approval is tied to the exact subject that was reviewed (the scope manifest, the findings that need review, the report content). If the subject changes, the approval no longer matches and the gate closes again.
- Code cannot approve itself. The only writer is
ApprovalStore.record_decision, and every record must state its method:human-cli,simulated-demo-fixtureorsimulated-test-fixture. The report shows which one was used. - G3 never opens. Any real-system action (
write,execute,network) goes to G3, which is default-deny, and the lab has no executor behind those tools anyway. - Fails closed. If the approval log cannot be verified, no approval is trusted.
- Deterministic. Fixed seed and a fixed clock, so runs are reproducible.
- Neither agent under test is a language model. The mock and the reference agent are deterministic programs; the reference agent's "model" is a rule-based planner. They say nothing about how any real model behaves. An optional local-model planner exists but is off by default and untested in CI.
- The reference agent's tools are fakes: file access is confined to a temporary lab directory, HTTP is a dictionary of canned pages, and the shell tool only emits simulated process telemetry.
- The Sigma engine implements a documented subset of the specification (see
agentproof.sigma). It is not a replacement for a production SIEM backend. - The Linux and agent rule packs are project-written,
experimental, and their ATT&CK/ATLAS mappings are indicative. They are not SigmaHQ rules and have only been tested against the synthetic fixtures intests/fixtures/sigma. - The technique catalog is small and curated. IDs and names follow the public ATT&CK and ATLAS knowledge bases at the time of writing; check them against the current releases.
- The governance mapping is indicative. It is not legal advice, a conformity assessment or a certification.
This repository was designed and generated by a team of AI agents orchestrated by
Zion, an AI orchestrator agent, for Golamreza Phnoni (G-REZA) of Phnoni LLC. Each of
the 20 modules was owned by one agent role, as listed in CONTRIBUTORS.md
and in each file's Owner role: header. Several modules adapt ideas from earlier internal
prototypes by the same team (a detection-gap sprint, an IT-ticket assistant pilot and gateway
and registry designs), rewritten here as one coherent package.
G-REZA reviewed the code, documentation and test results before publishing. The project:
- uses deterministic stand-ins for a model: no real LLM is called anywhere by default;
- uses synthetic data only: fictional organisations ("Northwind Logistics", "Globex Labs"), documentation IP ranges and a clearly fake planted secret;
- makes no claims about production readiness or third-party validation.
MIT © 2026 Golamreza Phnoni / Phnoni LLC. See LICENSE.