Skip to content

Axiom

Constructor

new Axiom(config: AxiomConfig)

Creates a new SDK instance. Configuration is required and validated. The SDK does not apply defaults.

reason()

axiom.reason({
  context: string | string[],
  task: string,
  model?: string
}): Promise<ReasonResult>

Transforms raw context into a de-identified semantic structure and enforces boundary rules. In attested tier, the method also returns evidence suitable for verification.

ReasonResult

  • transformedContext: de-identified semantic output
  • renderedPrompt: optional prompt output (currently undefined)
  • attestationEvidence: present in attested tier
  • verificationHint: expected measurement hint

Errors

The SDK throws:

  • ConfigurationError when configuration or input is invalid
  • BoundaryViolationError when raw data attempts to cross the boundary
  • TransformationError when the pipeline fails
  • SecurityInvariantError when security assumptions are violated

Notes

  • model is a hint only; the SDK makes no network calls.
  • Attested tier returns evidence + hint for verification.

Example (standard tier)

import { Axiom } from "@axiom-infra/core";

const axiom = new Axiom({
  securityTier: "standard",
  enclave: "none",
  policyVersion: "v1",
});

const result = await axiom.reason({
  context: "Vendor signed a contract for $250,000",
  task: "Summarize obligations",
});

Example (attested tier, preview)

const axiom = new Axiom({
  securityTier: "attested",
  enclave: "auto",
  policyVersion: "v1",
  platform: { type: "sev-snp", verificationMode: "permissive" },
});

Prev: Release Notes | Next: Attestation API