Pramiti Docs
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-recorder

Basic 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-recorder

Data Model

The FrRecord model stores each action record:

FieldTypeDescription
idUUIDUnique record identifier
agent_idstringAgent that performed the action
tool_namestringNamespaced tool name
action_typestringAction classification (create, read, update, delete)
payload_hashstringSHA-256 hash of the action payload
verdictstringallow, deny, rewrite, escalate
signaturestringEd25519 signature (if signing enabled)
created_atdatetimeTimestamp of the record

On this page