Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.altheia.xyz/llms.txt

Use this file to discover all available pages before exploring further.

report(event: {
  action: ActionDescriptor;
  outcome: "success" | "failure";
  audit_event_id?: string;
  detail?: string;
  tx_signature?: string;
}): Promise<void>
guard() calls report() for you. You only call it directly when you do the check yourself with check() and execute separately.

When you’d use it directly

const decision = await altheia.check(action);
if (!decision.allowed) return;

try {
  const sig = await runIt();
  await altheia.report({
    action,
    outcome: "success",
    audit_event_id: decision.audit_event_id,
    tx_signature: sig,
  });
} catch (err) {
  await altheia.report({
    action,
    outcome: "failure",
    audit_event_id: decision.audit_event_id,
    detail: err instanceof Error ? err.message : String(err),
  });
  throw err;
}
Pass the audit_event_id from the check() decision so the report attaches to the same row instead of creating a new one.

Parameters

FieldTypeNotes
actionActionDescriptorSame shape you used in check().
outcome"success" | "failure"Whether the action ran.
audit_event_idstringUUID from the check() decision. Optional.
detailstringFree-form notes. Surfaced in the chronicle.
tx_signaturestringSolana signature. Surfaced as a Solscan link in the chronicle.

Best-effort

report() will not throw. If the network is unreachable, it logs a warning and resolves. Audit completeness is backstopped by the backend’s reconciliation cron, which sweeps recent transactions on the agent’s session key and fills in missing reports.

Don’t double-report

guard() already reports. Calling report() after guard() for the same action will create a duplicate row.