Standalone AI agent action recorder with OCSF export and compliance reporting
Project description
pramiti-flight-recorder
Standalone AI agent action recorder with Ed25519-signed, hash-chained records, OCSF Class 6003 export for SIEM integration, and compliance reporting for EU AI Act, SOC 2, and NIST AI RMF. Works with SQLite (local/dev) or PostgreSQL (production).
Install
pip install pramiti-flight-recorder
# For PostgreSQL support:
pip install pramiti-flight-recorder[postgres]
Quick Start
from pramiti_flight_recorder import FlightRecorder
# SQLite by default (sqlite:///flight_recorder.db)
recorder = FlightRecorder()
# Or use PostgreSQL:
# recorder = FlightRecorder("postgresql://user:pass@localhost/mydb")
record_id = recorder.record(
agent_id="agent-1",
action="salesforce.update",
verb="update",
payload={"id": "C-123", "field": "email"},
decision="allow",
rationale="Customer requested email change",
)
OCSF Export
Export records in OCSF Class 6003 (API Activity) format for Splunk, Sentinel, Datadog, or any SIEM:
ocsf_events = recorder.export_ocsf()
# Also available: export_json(), export_csv()
Compliance Reports
Generate compliance reports against three frameworks:
report = recorder.compliance_report(
framework="eu_ai_act", # or "soc2" or "nist_ai_rmf"
period_start="2026-01-01",
period_end="2026-12-31",
)
print(f"Score: {report.score}, Status: {report.status}")
for check in report.checks:
print(f" [{check.id}] {'PASS' if check.passed else 'FAIL'}: {check.description}")
| Framework | Checks |
|---|---|
eu_ai_act |
Article 13 (transparency/rationale), Article 14 (human oversight), Article 17 (risk management) |
soc2 |
CC6.1 (logical access/constraints on denials), CC7.2 (monitoring coverage) |
nist_ai_rmf |
GOVERN 1.1 (signing key exists), MANAGE 2.4 (escalation workflow active) |
Ed25519 Signing
All records are cryptographically signed with Ed25519. Signing keys are auto-generated on first use. Set FR_SIGNING_PRIVATE_KEY env var to persist the private key across restarts.
Records are hash-chained: each record stores the SHA-256 hash of the previous record for the same agent, forming a tamper-evident chain.
# Verify a record's signature
is_valid = recorder.verify(record_id)
API
| Export | Description |
|---|---|
FlightRecorder |
Core recorder. Methods: record(), list(), get(), verify(), export_json(), export_csv(), export_ocsf(), compliance_report(). |
ComplianceReport |
Dataclass: framework, period_start, period_end, score, status, checks. |
ComplianceCheck |
Dataclass: id, description, passed, value, threshold, detail. |
FrRecord |
SQLAlchemy model for action records (table: fr_records). |
FrSigningKey |
SQLAlchemy model for Ed25519 signing keys (table: fr_signing_keys). |
FrComplianceReport |
SQLAlchemy model for persisted compliance reports (table: fr_compliance_reports). |
License
MIT -- Pramiti Labs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pramiti_flight_recorder-0.2.1.tar.gz.
File metadata
- Download URL: pramiti_flight_recorder-0.2.1.tar.gz
- Upload date:
- Size: 38.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a618160b76928ea27aff3b8f9316f44740a246511cc9b4a29ff48abfd71adab7
|
|
| MD5 |
cdc41274f1905d42d477146a6b5b51bb
|
|
| BLAKE2b-256 |
8886c93bc0cf4c7aebd1fdd92b4d27a4f672f88e7638a10a1aae62dfe96ffa5b
|
File details
Details for the file pramiti_flight_recorder-0.2.1-py3-none-any.whl.
File metadata
- Download URL: pramiti_flight_recorder-0.2.1-py3-none-any.whl
- Upload date:
- Size: 32.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e09b1b1b62b470a5d6171c10a6f1ef90a57d50658161f9b6da07ee57c88bb25
|
|
| MD5 |
250278a4b481ddbf175892a7dafbd388
|
|
| BLAKE2b-256 |
f41265ba28b6f8e0557699984eadb59f76822c65602e95e206fd6d7f872106cc
|