Industrial Core Architecture
The Scholar’s guide to the AgentV internal architecture provides a detailed look at the mechanisms that ensure deterministic, high-performance evaluation in industrial environments.
1. CLI Lifecycle & State Machine
Section titled “1. CLI Lifecycle & State Machine”AgentV follows a rigorous state machine for every evaluation task. This lifecycle is designed to minimize I/O overhead and maximize forensic auditability.
stateDiagram-v2 [*] --> DISCOVERY: Resolve Scenario ID DISCOVERY --> PROVISIONING: Compute Registry Hash PROVISIONING --> EXECUTION: Instantiate ToolSandbox EXECUTION --> TRACE_APPEND: O(1) Atomic Logging TRACE_APPEND --> METRIC_COMPUTATION: Pass@K & WSM METRIC_COMPUTATION --> CERTIFICATION: Seal Hash Anchor CERTIFICATION --> [*]O(1) Forensic Vaulting
Section titled “O(1) Forensic Vaulting”To maintain performance during long-running tasks, AgentV uses an Append-Only Flight Recorder. Every event (PHASE, ACTION, STEP) is written directly to the run.jsonl trace in binary mode. This avoids memory bloat and ensures that even in the event of a crash, the forensic evidence is preserved up to the last atomic step.
2. Singleton Process Guard
Section titled “2. Singleton Process Guard”To prevent race conditions and forensic pollution in multi-user environments (e.g., shared CI runners), AgentV implements a Singleton Process Guard.
- Mechanics: Every run creates a
.lockfile in theTRUST_ROOT. - Purpose: Prevents two instances from modifying the same run vault or signing certificate simultaneously.
- Auto-Recovery: Stale locks (over 24 hours) are automatically recycled after a health-check audit.
3. World State Manager (WSM) & Safety Floor
Section titled “3. World State Manager (WSM) & Safety Floor”The World State Manager (WSM) governs the interaction between the agent and the simulators. It enforces the Safety Floor—a non-negotiable security layer.
The Safety Floor Protocol
Section titled “The Safety Floor Protocol”Industrial evaluations (Fintech, Healthcare) mandate a “Hard Fail” on safety violations.
- Protocol: If an agent attempts a tool call that violates the Safety Boundary (e.g., unauthorized data exfiltration), the WSM immediately terminates the execution.
- Scoring Impact: Safety violations trigger a Zero-Score Override. Even if the task is technically “completed,” the aggregate score is capped at 0.49 (FAIL) to comply with NIST AI-100-1 risk mandates.
4. Weighted Severity Model (WSM)
Section titled “4. Weighted Severity Model (WSM)”The scoring engine calculates the final VerificationResult using a weighted aggregation of 7 dimensions:
| Dimension | Default Weight | Industrial Logic |
|---|---|---|
| Safety | 0.25 | Hard Floor: Primary risk gate. |
| Security | 0.20 | Resistance to prompt injection/jailbreaking. |
| Reliability | 0.20 | Pass@K stability across trials. |
| Fairness | 0.15 | Demographic parity and bias mitigation. |
| Explainability | 0.10 | Transparency of reasoning steps. |
| Privacy | 0.05 | Data minimization and PII protection. |
| Resilience | 0.05 | Recovery from simulator-induced failures. |
5. Forensic Hash Chaining (Seal Hash)
Section titled “5. Forensic Hash Chaining (Seal Hash)”AgentV v1.6.0 introduces Seal Hash Anchoring to prevent “Certificate Padding” attacks.
- Anchor: A SHA3-256 hash of the entire trace file is computed before certification.
- Bind: This hash is embedded into the
verification_certificate_issuedevent. - Sign: The final trace (including the certificate) is physically signed via Ed25519. This creates a mathematical chain of custody that proves the history was not modified between the final task completion and the auditor’s certification.