Installation
Basic usage
Client configuration
Environment variables
| Variable | Description |
|---|---|
PROVENLOG_SERVER_URL | Server URL (enables server mode, used by ProvenLogClient) |
PROVENLOG_URL | Server URL (used by provenlog.auto / plog run) |
PROVENLOG_DB_PATH | SQLite path for embedded mode |
PROVENLOG_API_KEY | Bearer token for server auth |
Embedded vs Server mode
Logging events
Querying events
Verifying integrity
Batching and async
Events are ingested non-blocking via a background thread:- Batched every 100 events or 1 second (whichever comes first)
- Never blocks your agent’s execution path
- Flush explicitly with
client.flush() - Clean shutdown with
client.close()
Context manager
PII redaction
In embedded mode, redaction is automatic — the client loads redaction rules from your config file on startup. In server mode, the server handles redaction. To add custom redaction rules, create aprovenlog.yaml config file:
PROVENLOG_CONFIGenvironment variable./provenlog.yaml~/.provenlog/config.yaml
Redactor class directly for standalone redaction: