Skip to content

client.provenance

View as Markdown

client.provenance — the provenance operations.

On AsyncKindgi every method is the same, awaited.

list(
*,
limit: int | None = None,
cursor: str | None = None,
scope_kind: Literal['tenant', 'org', 'project'] | None = None,
scope_id: str | UUID | None = None,
run_id: str | UUID | None = None,
agent_id: str | UUID | None = None,
created_after: str | None = None,
timeout: float | None = None,
) -> ProvenanceCollectionPage
Signature

List provenance records. GET /v1/provenance

Cursor-paginated. Metadata rows only — clients fetch the DAG payload via GET /v1/provenance/{runId}. Fixed sort: createdAt desc, id desc. Filters: ?runId=, ?agentId=, ?createdAfter=, and scopeKind/scopeId for one project's records, or every project's in an org (records from before Kindgi 0.1.3 have no project and are listed only without a scope).

get(run_id: str | UUID, /, *, timeout: float | None = None) -> ProvenanceRecord
Signature

Fetch the full provenance DAG for a run. GET /v1/provenance/{runId}

Returns the full DAG (nodes + edges) plus record metadata. 404 when no provenance was emitted for the run (e.g. the deployment does not run the emitter, or the run was pre-provenance).

export(
run_id: str | UUID,
body: ExportProvenanceBody | Mapping[str, Any] | None = None,
/,
*,
idempotency_key: str | None = None,
timeout: float | None = None,
**fields: Any,
) -> ExportProvenanceResult
Signature

Export a signed provenance bundle for a run. POST /v1/provenance/{runId}/export

Signs the run's provenance (and, when asked, its messages) with the deployment's export key, and records the export (an export-signed audit event). The same envelope as the other signed exports; check publicKey against GET /v1/export-signing-keys. A deployment with no export key answers 404 signing-not-configured.