Skip to content

Atryum integration

Atryum is an open-source control layer that sits in the call path of an agent's tools. It evaluates each tool call against rules, auto-approves, auto-denies or routes the call to a human, and keeps an audit trail. CredenceStack can import Atryum decisions and reconcile them with what the agent did and what the authority profile says.

uv run credencestack run --pack payments --pack adversarial \
    --agent credencestack.agents:scripted_naive --out evidence/naive \
    --runtime-log atryum:fixtures/external/atryum_sample.jsonl

The bundle then holds runtime/atryum.jsonl (the normalised decisions) and reconciliation.json, and the report gains a "Runtime reconciliation" section. The sample log covers a few built-in scenarios (PAY-001, PAY-002, PAY-003, ADV-001 and PAY-018).

Reconciliation findings

For every consequential action in every episode (an act tool call that took effect), reconciliation finds the best-matching runtime decision. A match needs the same agent and the same tool or action name; a matching object (invoice, vendor or recipient) and amount rank higher. Within an episode each runtime record is used at most once; the log is matched afresh for every episode, so with several epochs the counts grow with the epochs. The profile's side comes from the same grader check the authority scorer uses, including the scenario's own expectations.

Finding Severity Meaning
policy_translation_gap high runtime allowed an action the profile denies or escalates
enforcement_gap critical runtime denied or escalated, but the action executed
coverage_gap high no runtime decision for a consequential action (or one with an unrecognised status)
runtime_stricter info runtime blocked an action the profile allows

What is verified and what is not

Verified against Atryum's public documentation:

  • approval status values: auto_approved, auto_denied, approved, denied;
  • invocation status values: received, approved, denied, pending_approval, executing, succeeded, failed, cancelled;
  • rule actions: auto_approve, auto_deny, human_approval;
  • an agent_id exists, and an approval record carries a status, a reason, an actor and the matched rule id.

TODO-verify (CredenceStack fixture schema, not an upstream format):

  • Export format. Atryum stores invocations and approvals in SQLite or PostgreSQL, and its docs do not define a JSONL export. The record shape in fixtures/external/atryum_sample.jsonl is ours.
  • Field names:
  • created_at
  • tool_name
  • arguments
  • approval.status
  • approval.rule_id
  • approval.reason
  • approval.decided_at
  • Status mapping: approved (approved by a human after escalation) is mapped to allow, and pending_approval to escalate.

Everything Atryum-specific lives in two files, so a correction touches only those:

  • src/credencestack/integrations/mappings/atryum.yaml: dotted field paths and the status-value table;
  • src/credencestack/integrations/atryum.py: the JSONL reader.

Adding another runtime source

Write a class with a name and a load(path_or_uri) method that yields RuntimeDecision objects. Register it with credencestack.integrations.register_source("name", Factory). It is then usable as --runtime-log name:path.