Observed since 21 Oct, 09:57 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A vendor-neutral, tamper-evident audit-event format and local toolkit for AI systems and agents.
AIAuditLog provides portable, privacy-aware, tamper-evident evidence for AI models, agents, tools, policies, reviews, and workflow outcomes.
AIAuditLog 0.2.0b1 is public Beta software with documented limitations, not
production certification.
Ordinary application logs usually explain what software printed while it ran. AI audit evidence must also preserve model choices, tool access, policy decisions, human approvals, data references, redaction decisions, and workflow outcomes in a vendor-neutral format that survives framework and provider changes.
Organizations need inspectable evidence of what an AI system did, why it acted, which models and policies were involved, what data and tools were accessed, and what outcome occurred. AIAuditLog keeps that evidence local-first, append oriented, deterministic, and suitable for CI review.
AIAuditLog is project six in the sekacorn AI infrastructure roadmap. It provides neutral, dictionary-based adapters for portable handoffs with Forge, PrivateAIStack, ModelSwapBench, OpenOntologyLite, AgentPolicyPack, and AIMeter without requiring those packages. AIAuditLog works independently and offline.
Each event contains schema_version, event_id, event_type, UTC
event_time, UTC recorded_time, source, actor, outcome, data,
optional context, and integrity. Core event types cover system, agent, model,
tool, data, retrieval, policy, review, security, evaluation, benchmark, and
audit-log lifecycle categories. Custom event types must be namespaced and may
not collide with reserved core namespaces.
python -m pip install aiauditlog
For development:
python -m pip install -e ".[dev]"
aiaudit validate examples/basic/event.json
aiaudit append build/audit.jsonl --event examples/basic/event.json
aiaudit verify build/audit.jsonl
aiaudit summarize build/audit.jsonl
See examples/basic/event.json for a complete model invocation event. Prompts
and responses are not stored by default; use hashes, references, counts, and
explicitly configured safe excerpts.
from ai_audit_log import AuditRecorder, EventBuilder, JsonlStore, Outcome, Source
from ai_audit_log.models import Actor
builder = EventBuilder(
source=Source(service="claims-agent"),
actor=Actor(actor_id="agent-17", actor_type="ai_agent"),
)
recorder = AuditRecorder(builder=builder, store=JsonlStore("build/audit.jsonl"))
recorder.record(
event_type="model.invocation.completed",
outcome=Outcome(status="success", code="COMPLETED"),
data={"provider": "example", "model_name": "example-model"},
)
aiaudit verify build/audit.jsonl
Hash chaining is tamper-evident, not immutable. An attacker who can rewrite an entire unsigned log can recompute the chain.
AuditRecorder and aiaudit append coordinate cooperating local writers with
a lock held across read, chain construction, rotation, and append. This is not
a distributed lock and cannot protect writers that bypass AIAuditLog. Automatic
rotation starts the new active JSONL file at sequence 1 with no previous
digest, so each rotated file is independently verifiable. Do not concatenate
rotated files before verification.
The default mode is minimal: identifiers, metadata, hashes, counts, outcomes,
and policy evidence are preserved, while prompts, responses, and common secret
keys are redacted. balanced may keep short configured excerpts.
full-content requires explicit opt-in and can expose sensitive data.
Checkpoints summarize stream ID, event count, terminal digest, and checkpoint digest. Ed25519 signatures authenticate the checkpoint bytes to a public key, and checkpoint signature policies can require allowed key IDs, fingerprints, and minimum signature counts. Signatures do not prove real-world actor identity, legal non-repudiation, or correct key custody.
aiaudit checkpoint create build/audit.jsonl --output build/checkpoint.json
aiaudit key generate --private-key build/development-private.pem --public-key build/development-public.pem
aiaudit sign build/checkpoint.json --private-key build/development-private.pem --key-id development-key
aiaudit checkpoint verify build/checkpoint.json --log build/audit.jsonl --public-key build/development-public.pem
aiaudit signature verify remains available for raw signature bytes only. Use
aiaudit checkpoint verify --log ... --public-key ... when a signature must be
accepted only after checkpoint and stream integrity succeed. Never commit
generated private keys.
aiaudit inspect examples/basic/event.json
aiaudit query build/audit.jsonl --event-type model.invocation.completed
aiaudit export build/audit.jsonl --format markdown --output build/audit-report.md --compress
aiaudit redact build/audit.jsonl --profile examples/privacy/minimal.yaml --output build/audit-redacted.jsonl
aiaudit migrate examples/basic/legacy-event.json --output build/migrated-event.json
aiaudit rotate build/audit.jsonl
aiaudit schema list
aiaudit schema export --output build/schemas
JSONL is the canonical local stream format. SQLite indexing is optional and is not tamper-proof; chain verification recalculates event digests from stored events.
The package includes neutral protocols for framework, policy, ontology, and benchmark adapters. No external ecosystem package is required in core.
AIAuditLog distinguishes application logs, telemetry, audit evidence, cryptographic integrity, authenticity, non-repudiation, and legal admissibility. It provides local tamper evidence and optional checkpoint signatures. It does not provide immutable storage, identity proofing, legal certification, a SIEM, or policy enforcement.
Canonical JSON serialization uses the maintained rfc8785 package after
AIAuditLog normalizes datetimes, Decimals, bytes, and model objects. Timestamps
are RFC 3339-compatible UTC strings. Trace and span fields can carry W3C Trace
Context or OpenTelemetry identifiers, and helper functions can parse and emit
traceparent values. CloudEvents concepts influenced envelope naming, but this
package does not claim CloudEvents compliance.
Earlier alpha work included:
Later alpha work included:
The 0.1.0a3 adapters intentionally use plain dictionaries and are not claimed as externally tested against sibling packages.
Deferred enhancements:
Broader export test coverage for JSON, JSONL, CSV, Markdown, and compressed outputs.
Signed stream manifests.
Stronger rotation manifests and rotation verification.
More complete schema migration fixtures.
Optional dependency-license report generation.
External checkpoint anchoring.
Optional PostgreSQL storage.
Retention policies.
Audit package bundles.
Provenance attestations.
Organization-specific event profiles.
SIEM exporters.
1.0 considerations:
Use the development commands in docs/getting-started.md. Keep claims
verifiable and do not commit secrets, private keys, local audit logs, databases,
or generated distribution artifacts.
sekacorn
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.0b1 | 12 Aug 2026 | 14 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 09:57 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:fe496e1340c2318067440131254314aa518976b3193da545ba88a13c5524b449