Overview
Thecompliance client provides tools for regulatory compliance reporting. Generate org-wide summaries, export grants and audit entries, and produce evidence packs with built-in chain integrity verification for SOC 2 and GDPR audits.
Access the compliance client via client.compliance.
Get Summary
Generate an org-wide compliance summary with counts of agents, grants, audit entries, and policies:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
since | str | None | No | ISO 8601 start timestamp for the report. |
until | str | None | No | ISO 8601 end timestamp for the report. |
ComplianceSummary
| Field | Type | Description |
|---|---|---|
generated_at | str | ISO 8601 timestamp when the report was generated. |
agents | dict[str, int] | Agent counts (e.g. {"total": 5, "active": 4}). |
grants | dict[str, int] | Grant counts by status. |
audit_entries | dict[str, int] | Audit entry counts. |
policies | dict[str, int] | Policy counts. |
plan | str | Current billing plan. |
since | str | None | Report start timestamp (if filtered). |
until | str | None | Report end timestamp (if filtered). |
Export Grants
Export all grants with optional filters for compliance reporting:ComplianceExportGrantsParams
| Field | Type | Required | Description |
|---|---|---|---|
since | str | None | No | ISO 8601 start timestamp. |
until | str | None | No | ISO 8601 end timestamp. |
status | str | None | No | Filter by status ("active", "revoked", "expired"). |
ComplianceGrantsExport
| Field | Type | Description |
|---|---|---|
generated_at | str | ISO 8601 generation timestamp. |
total | int | Total number of exported grants. |
grants | tuple[Grant, ...] | The exported grant records. |
Export Audit
Export all audit entries with optional filters:ComplianceExportAuditParams
| Field | Type | Required | Description |
|---|---|---|---|
since | str | None | No | ISO 8601 start timestamp. |
until | str | None | No | ISO 8601 end timestamp. |
agent_id | str | None | No | Filter by agent ID. |
status | str | None | No | Filter by status ("success", "failure", "blocked"). |
ComplianceAuditExport
| Field | Type | Description |
|---|---|---|
generated_at | str | ISO 8601 generation timestamp. |
total | int | Total number of exported entries. |
entries | tuple[AuditEntry, ...] | The exported audit entries. |
Evidence Pack
Generate a full compliance evidence pack with chain integrity verification. Evidence packs are designed for SOC 2 and GDPR audits:EvidencePackParams
| Field | Type | Required | Description |
|---|---|---|---|
since | str | None | No | ISO 8601 start timestamp. |
until | str | None | No | ISO 8601 end timestamp. |
framework | str | None | No | Compliance framework ("soc2", "gdpr", "all"). |
EvidencePack
| Field | Type | Description |
|---|---|---|
meta | EvidencePackMeta | Pack metadata (schema, framework, timestamps). |
summary | dict[str, Any] | Aggregate statistics. |
grants | tuple[Grant, ...] | All grants in the time window. |
audit_entries | tuple[AuditEntry, ...] | All audit entries in the time window. |
policies | tuple[Policy, ...] | All active policies. |
chain_integrity | ChainIntegrity | Result of chain integrity verification. |
EvidencePackMeta
| Field | Type | Description |
|---|---|---|
schema_version | str | Evidence pack schema version. |
generated_at | str | ISO 8601 generation timestamp. |
framework | str | Compliance framework used. |
since | str | None | Report start timestamp (if filtered). |
until | str | None | Report end timestamp (if filtered). |
ChainIntegrity
| Field | Type | Description |
|---|---|---|
valid | bool | Whether the audit chain is intact. |
checked_entries | int | Number of entries verified. |
first_broken_at | str | None | ISO 8601 timestamp of the first broken link (if any). |