Flight Recorder
Standalone Usage
pip install, SQLite storage, record and query agent actions
Flight Recorder can be used standalone with zero platform dependencies. Install it, create a recorder, and start logging agent actions immediately.
Installation
pip install pramiti-flight-recorderBasic Usage
from pramiti_flight_recorder import FlightRecorder
# SQLite by default — auto-creates flight_recorder.db
fr = FlightRecorder()
# PostgreSQL for production
fr = FlightRecorder(db_url="postgresql://user:pass@host:5432/flight_recorder")
# Record an action
fr.record(
agent_id="sales-agent-1",
tool_name="salesforce.update_contact",
action_type="update",
payload={"contact_id": "123", "email": "[email protected]"},
verdict="allow"
)
# Record a denied action
fr.record(
agent_id="sales-agent-1",
tool_name="salesforce.delete_account",
action_type="delete",
payload={"account_id": "456"},
verdict="deny"
)Ed25519 Signing
Enable cryptographic signing for tamper-evident records:
from pramiti_flight_recorder import FlightRecorder
# Generate a signing key (static method). A writable recorder reads
# FR_SIGNING_PRIVATE_KEY from the environment at construction.
private_key, public_key = FlightRecorder.generate_keypair()
fr = FlightRecorder()
# Records are now signed with Ed25519
fr.record("agent-1", "tool.action", "create", {"data": "value"}, "allow")
# Verify a record's signature by id
record = fr.list(limit=1)[0]
is_valid = fr.verify(record.id)Querying Records
# Get recent records
records = fr.list(limit=100)
# Filter by agent
records = fr.list(agent_id="sales-agent-1")
# Filter by time range (no verdict filter on list)
from datetime import datetime
records = fr.list(
from_date=datetime(2026, 1, 1),
to_date=datetime(2026, 6, 30)
)Docker Deployment
# SQLite, no auth (evaluation)
docker compose --profile flight-recorder up flight-recorder
# PostgreSQL, API key enabled (production)
FR_DATABASE_URL=postgresql://user:pass@db:5432/flight_recorder \
FR_SIGNING_PRIVATE_KEY=<your-key-b64> \
FR_API_KEY=<your-api-key> \
docker compose --profile flight-recorder up flight-recorderData Model
The FrRecord model stores each action record:
| Field | Type | Description |
|---|---|---|
id | UUID | Unique record identifier |
agent_id | string | Agent that performed the action |
tool_name | string | Namespaced tool name |
action_type | string | Action classification (create, read, update, delete) |
payload_hash | string | SHA-256 hash of the action payload |
verdict | string | allow, deny, rewrite, escalate |
signature | string | Ed25519 signature (if signing enabled) |
created_at | datetime | Timestamp of the record |