1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "currentItems": [
10 {
11 "eventId": "evt-101",
12 "sessionId": "sess-44",
13 "agent": "procurement-agent",
14 "tool": "payments.create",
15 "action": "create_payment",
16 "resource": "vendor:acme",
17 "permission": "payments:write",
18 "approvalStatus": "missing",
19 "sideEffect": "financial",
20 "riskType": "unapproved_financial_action",
21 "riskScore": 92,
22 "sensitiveData": False,
23 "timestamp": "2026-09-20T14:04:00Z",
24 },
25 {
26 "eventId": "evt-102",
27 "sessionId": "sess-44",
28 "agent": "procurement-agent",
29 "tool": "crm.search",
30 "action": "read_contacts",
31 "resource": "crm:contacts",
32 "permission": "contacts:read",
33 "approvalStatus": "not_required",
34 "sideEffect": "read",
35 "riskType": "sensitive_data_access",
36 "riskScore": 48,
37 "sensitiveData": True,
38 "timestamp": "2026-09-20T14:04:04Z",
39 },
40 {
41 "eventId": "evt-103",
42 "sessionId": "sess-44",
43 "agent": "procurement-agent",
44 "tool": "shell.exec",
45 "action": "execute_command",
46 "resource": "host:worker-2",
47 "permission": "shell:execute",
48 "approvalStatus": "denied",
49 "sideEffect": "execution",
50 "riskType": "privilege_escalation_attempt",
51 "riskScore": 96,
52 "sensitiveData": False,
53 "timestamp": "2026-09-20T14:04:08Z",
54 },
55 ],
56 "previousItems": [{
57 "eventId": "evt-091",
58 "sessionId": "sess-41",
59 "agent": "procurement-agent",
60 "tool": "crm.search",
61 "action": "read_contacts",
62 "resource": "crm:contacts",
63 "permission": "contacts:read",
64 "approvalStatus": "not_required",
65 "sideEffect": "read",
66 "riskType": "sensitive_data_access",
67 "riskScore": 35,
68 "sensitiveData": True,
69 "timestamp": "2026-09-13T14:04:04Z",
70 }],
71}
72
73
74run = client.actor("quanmatrix/ai-agent-runtime-risk-governance-intelligence").call(run_input=run_input)
75
76
77print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
78for item in client.dataset(run.default_dataset_id).iterate_items():
79 print(item)
80
81