Layer 5 — Behavioural Agent | Axioma Framework
axioma-agent implements the Agent Totality Contract for the Axioma framework. It is a total, bounded, deterministic state machine that executes on top of the Layer 6 cryptographic audit substrate.
System Property: The agent cannot behave differently without producing different evidence.
| Property | Value |
|---|---|
| DVEC Version | 1.3 |
| Determinism Class | D2 — Constrained Deterministic |
| Memory Model | Zero Dynamic Allocation |
| Patent | UK GB2521625.0 |
D2 Constrained Deterministic means:
- Given identical initial state
- Given identical ordered sequence of admitted
AX:OBS:v1inputs - The agent produces identical
AX:TRANS:v1sequences
UNINIT → INIT → ENABLED → ALARM → DEGRADED → STOPPED
↑ ↓ ↓
└─────────┴─────────┘
(recovery)
STOPPED is a terminal state — no further transitions without external reset.
This implementation satisfies all 29 SHALL requirements from SRS-002 v0.3:
| Requirement | Description | Status |
|---|---|---|
| SHALL-001 | Determinism definition | ✓ |
| SHALL-006 | Pre-commit requirement | ✓ |
| SHALL-007 | Ordering constraint | ✓ |
| SHALL-010 | Monotonicity constraint | ✓ |
| SHALL-013 | Total function | ✓ |
| SHALL-023 | No-Op transition | ✓ |
| SHALL-024 | Fault accumulator | ✓ |
| SHALL-025 | Substrate failure | ✓ |
| SHALL-026 | Genesis binding | ✓ |
| SHALL-027 | Evidence canonicality | ✓ |
| SHALL-028 | Input ordering | ✓ |
| SHALL-029 | Fault accumulator reset | ✓ |
- CMake 3.10+
- C99 compiler (GCC 12+, Clang 12+)
axioma-spec(shared types)axioma-audit(L6 substrate)
cd ~/axilog/axioma-agent
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build buildctest --test-dir build --output-on-failure
./build/test_agent_totalitypython3 ax-rtm-verify.py --root ./* Initialize agent with ledger genesis */
void ax_agent_init(
ax_agent_ctx_t *ctx,
ct_fault_flags_t *faults
);
/* Bind agent to ledger (genesis verification) */
void ax_agent_bind(
ax_agent_ctx_t *ctx,
ct_fault_flags_t *faults
);
/* Process one input (primary transition engine) */
void ax_agent_step(
ax_agent_ctx_t *ctx,
const ax_input_t *input,
ct_fault_flags_t *faults
);Every state transition produces an AX:TRANS:v1 record (RFC 8785 canonical JSON):
{"fault_count":0,"input_class":"TIME_OBS","ledger_seq":2,"next_state":"ENABLED","prev_state":"INIT","violation":null}Genesis hash (L0) from Phase 1 verification:
7bb0d791697306ce2f1cc5df0bcdf66d810d6af9425aa380b352a62453a5ec7b
axioma-agent: test_agent_totality
DVEC: v1.3 | Layer: L5 | Class: D2
========================================
Initialization Tests: 4/4 PASS
State Transition Tests: 7/7 PASS
Time Monotonicity Tests: 2/2 PASS
Input Ordering Tests: 1/1 PASS
Replay Equivalence Tests: 1/1 PASS
Totality Coverage Tests: 1/1 PASS
No-Op Tests: 1/1 PASS
========================================
Results: 17/17 tests passed
Copyright (c) 2026 Spey Systems LTD
SPDX-License-Identifier: AGPL-3.0-or-later
Patent: UK GB2521625.0
- SRS-002 v0.3 — Agent Totality Specification
- axioma-audit — Layer 6 Cryptographic Audit Ledger
- axioma-spec — Shared Types and DVEC