Pramiti Docs

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
private_key, public_key = FlightRecorder.generate_keypair()
 
# Create recorder with signing enabled
fr = FlightRecorder()
fr.set_signing_key(private_key)
 
# Records are now signed with Ed25519
fr.record("agent-1", "tool.action", "create", {"data": "value"}, "allow")
 
# Verify a record's signature
record = fr.get_records(limit=1)[0]
is_valid = fr.verify_signature(record, public_key)

Querying Records

# Get recent records
records = fr.get_records(limit=100)
 
# Filter by agent
records = fr.get_records(agent_id="sales-agent-1")
 
# Filter by verdict
denied = fr.get_records(verdict="deny")
 
# Filter by time range
from datetime import datetime
records = fr.get_records(
    start=datetime(2026, 1, 1),
    end=datetime(2026, 6, 30)
)

Docker Deployment

# SQLite, no auth (evaluation)
docker compose -f docker-compose.flight-recorder.yml up
 
# 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 -f docker-compose.flight-recorder.yml up

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