Skip to main content

classify_risk()

Assign an EU AI Act risk level to an agent.
classification = client.classify_risk(
    agent_id="agt_abc123",
    risk_level="high",
    justification="Processes employee performance data for HR decisions",
)
agent_id
string
required
Agent ID
risk_level
string
required
Risk level: minimal, limited, high, unacceptable
justification
string
Reason for the classification
See Risk Classification for details on each level.

create_policy()

Create a governance policy.
policy = client.create_policy(
    name="production-model-allowlist",
    policy_type="model_allowlist",
    config={"allowed_models": ["gpt-4o", "claude-sonnet-4-20250514"]},
    scope="global",
    enabled=True,
)
name
string
required
Policy name
policy_type
string
required
One of: model_allowlist, block_provider, require_approval, budget_limit, rate_limit, require_human_review
config
dict
required
Policy configuration (varies by type)
scope
string
default:"global"
global or agent
agent_id
string
Required when scope is agent
enabled
boolean
default:"true"
Whether the policy is active
See Policies for all policy types and config options.

list_approvals()

List HITL approval items.
# All pending approvals
pending = client.list_approvals(status="pending")

# All approvals for an agent
agent_approvals = client.list_approvals(agent_id="agt_abc123")
status
string
Filter by status: pending, approved, denied, expired
agent_id
string
Filter by agent ID
limit
integer
default:"20"
Results per page
See HITL Approvals for the full workflow.

decide_approval()

Approve or deny a pending approval item.
# Approve
client.decide_approval(
    "apr_abc123",
    decision="approved",
    reason="Agent configuration verified",
)

# Deny
client.decide_approval(
    "apr_abc123",
    decision="denied",
    reason="Agent not authorized for production",
)
approval_id
string
required
Approval ID
decision
string
required
approved or denied
reason
string
Reason for the decision (recorded in audit trail)

list_audit_events()

Query the immutable audit trail.
# Recent events
events = client.list_audit_events(limit=50)

# Filtered
events = client.list_audit_events(
    event_type="policy.violated",
    target_id="agt_abc123",
    from_date="2026-03-01T00:00:00Z",
    to_date="2026-03-17T23:59:59Z",
    limit=100,
)
event_type
string
Filter by event type (e.g., agent.registered, policy.violated)
target_id
string
Filter by target entity ID
from_date
string
Start of time range (ISO 8601)
to_date
string
End of time range (ISO 8601)
limit
integer
default:"50"
Results per page
See Audit Trail for all event types and export options.