This release is a pre-release and may not be stable for production use.
argus-ledger
Append-only SHA-256 audit log for autonomous agents.
Part of the Telarch Suite (TCI / Telarch Cognitive Infrastructure) by Perseus Computing LLC.
Why Argus exists
When autonomous agents run shell commands, call APIs, or mutate files, you need a reliable record of what happened and proof that logs were not changed after the fact.
Argus records every event into an append-only sequence where each entry includes the SHA-256 hash of the previous record. If any entry is altered or deleted, verification fails immediately and points directly to the modified index.
Key design goals
- Continuous hash chaining: Every event links cryptographically to the one before it, rooted at genesis.
- Fail-closed tamper detection: Verifies cryptographic continuity and aborts immediately when any hash or payload is corrupted. Tampered event #42 is detected in ~46.5 µs.
- Low latency appends: In-memory sequential appends with SHA-256 chaining execute at ~600,000 events/s (~1.67 µs/event).
- High throughput chain verification: Traverses and validates complete cryptographic sequences at ~839,000 events/s (~1.19 µs/event).
- Self-contained: Runs fully offline as an in-memory library without external audit services or cloud dependencies.
Installation
Add argus-ledger to your Cargo.toml:
[dependencies]
argus-ledger = "0.1.0-alpha.2"
Or via Cargo:
cargo add argus-ledger
Example
use argus_ledger::{
AuditLedgerReader, AuditLedgerWriter, AuditVerifier, InMemoryLedger,
};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut ledger = InMemoryLedger::new();
// 1. Record agent startup
let ev1 = ledger.append(
"AGENT_BOOTSTRAP",
"runtime:node_0",
r#"{"model":"qwen2.5-coder-32b","temperature":0.2}"#,
)?;
println!("Sequence #{}: Hash {}", ev1.sequence, &ev1.event_hash[0..16]);
// 2. Record tool execution
let ev2 = ledger.append(
"TOOL_INVOCATION",
"runtime:node_0",
r#"{"tool":"terminal","command":"cargo test --workspace"}"#,
)?;
println!("Sequence #{}: Hash {}", ev2.sequence, &ev2.event_hash[0..16]);
// 3. Verify cryptographic integrity
let report = ledger.verify_chain()?;
assert!(report.valid, "Chain integrity compromised");
println!(
"Chain verified intact: {} blocks validated across sequence.",
report.total_events
);
Ok(())
}
Python: keyed signing (optional)
An unkeyed hash chain detects an edit to one record, but someone who can write the file can rewrite every later hash and still pass. Give the ledger a key and each event also carries an HMAC-SHA256 signature; the same rewrite then fails at the first forged event.
from argus_ledger import AppendOnlyLedger
key = AppendOnlyLedger.load_key("/secure/location/argus.key") # refuses a key file others can read
ledger = AppendOnlyLedger("audit.jsonl", signing_key=key, require_signature=True)
ledger.append("tool_execution", "agent", {"tool": "terminal"})
assert ledger.verify_chain().valid
The ledger file is created owner-only (0600). Keep the key somewhere an attacker with write access to the ledger cannot also reach. Ledgers written without a key still verify without one; with a key configured, unsigned events fail.
Benchmark results
Measured on bare-metal Linux x86_64 (rustc 1.85.0, opt-level = 3, lto = "fat"):
| Metric | Measurement | Test condition | Operational Guarantee |
|---|---|---|---|
| Append Throughput (1M Events) | 632,170 events/s | 1,000,000 sequential events (argus_1m_scale) |
1.58 µs / event continuous SHA-256 chaining |
| Linear Verification (1M Events) | 770,758 events/s | Full 1M event SHA-256 hash chain validation | 1.30 µs / event; validates 1M events in 1.29 s |
| Tamper Detection (Sequence #500,000) | 640.48 ms | Mid-chain single-bit payload corruption | Fail-closed immediate abort and offset isolation |
| Micro-Audit Latency (Block #42) | 46.50 µs | Short sequence microbenchmark | Sub-50 µs early tamper detection |
| Tamper Detection Sensitivity | 100.00% | Single-bit byte flip sensitivity | Mathematical immutability guarantee |
| External Dependencies | 0 | Standalone offline primitives | Zero network, zero remote cloud requirement |
Run benchmarks yourself:
cargo run --release -p telarch-benchmarks
cargo run --release -p telarch-benchmarks --bin argus_1m_scale
License
Copyright © 2026 Perseus Computing LLC. Released under the MIT License.
Metadata
Release files for argus-ledger 0.1.0a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| argus_ledger-0.1.0a2.tar.gz | 16.9 kB | Without provenance | Details for argus_ledger-0.1.0a2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| argus_ledger-0.1.0a2-py3-none-any.whl | Python 3 | none | any | Details for argus_ledger-0.1.0a2-py3-none-any.whl |
Total release size: 27.0 kB
Release files / argus_ledger-0.1.0a2.tar.gz
| Download URL | argus_ledger-0.1.0a2.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
509f03a98b42fa018dbab843b01402db9f2c85ecfb75f4c69406c1e9cfd80452
|
|
BLAKE2b-256 checksum How to use checksums |
b91b8dd9e7f56e6d1c7909cae4afa24c9754b937a957a9c306e57c3aa1b66a8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / argus_ledger-0.1.0a2-py3-none-any.whl
| Download URL | argus_ledger-0.1.0a2-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8612a327f296d85d7b4fe497cf5eaba4498ea3edfbf36c0274fc649d4c47c68e
|
|
BLAKE2b-256 checksum How to use checksums |
e1bcf774299822524f432724f355b460dab1dee558e6a9a74c56fcf910a31605
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for argus-ledger 0.1.0a2
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.