F

Prove every AI decision before it executes.

AI agents propose actions—like issuing refunds, approving loans, or modifying infrastructure. Factara checks the agent's claims against your sources and policies, then returns an enforceable decision: allow, deny, or needs_review. Every decision is backed by citations and a cryptographically verifiable audit record.

AI AgentFactaraProduction

What Factara does

Verify
Check whether an agent's claims are actually supported by the sources you provide — with citations.
Authorize
Turn verified claims into a single decision your system can enforce: allow, deny, or needs_review.
Audit
Produce a tamper-evident record of what was decided, why, and what evidence was used.

Bring your own evidence

Factara only uses the sources you supply. By default it relies on predictable, rule-based matching so decisions are stable and auditable.

  • Attach evidence inline (text or structured JSON) in each request.
  • Use text for unstructured material (emails, policies, notes, tickets, logs).
  • Use data for structured JSON (API responses, DB rows, scans, configs). Factara can match claims to fields and values.
  • For URLs and documents, ingest once via POST /v2/sources, then reuse the returned source_id in future requests.
  • If a claim can't be supported, Factara returns needs_review or deny with clear reasons and (when available) citations.
{
  "claims": [
    { "id": "c1", "text": "Customer was charged twice for order #1842." }
  ],
  "sources": [
    {
      "type": "text",
      "title": "Support note",
      "content": "Charge posted twice on 2026-01-08 for order #1842."
    }
  ]
}

What you get back

Authorize API: Gate a real-world action (refund)

High-stakes example: Approve refunds & require clear auditability
Agent request (example).

const payload = {
  action: {
    type: "refund",
    params: { order_id: "order_1842", refund_amount: 550.00, currency: "USD" }
  },

  // Make the justification explicit
  claims: [
    { id: "c1", text: "Order order_1842 was charged twice for $550.00 USD within 24 hours." },
    { id: "c2", text: "The refund request includes order_id order_1842 and charge_id ch_1A and ch_1B." },
    { id: "c3", text: "For a duplicate charge, the refund amount must equal the duplicate charge amount ($550.00)." }
  ],

  // Include sources as structured json, inline text, or referenced by an ID like the examples below.

  sources: [
    { source_id: "src_refund_payments_policy_v1_3" },


    {
      type: "context",
      title: "Payment processor charge records (snapshot)",
      data: {
        order_id: "order_1842",
        charges: [
          { charge_id: "ch_1A", amount: 550.00, currency: "USD", status: "succeeded", created_at: "2026-01-08T10:12:00Z" },
          { charge_id: "ch_1B", amount: 550.00, currency: "USD", status: "succeeded", created_at: "2026-01-08T16:03:00Z" }
        ]
      },
      meta: { content_type: "application/json", system: "payments" }
    },

    {
      type: "text",
      title: "Support ticket #1842",
      content: "Customer reports a duplicate charge. Two successful $550 charges (ch_1A, ch_1B) exist for order_1842. Recommend refund for the duplicate amount."
    }
  ],

  requirements: {
    min_claim_coverage: 0.9,
    citations: { required: true, min_citations_per_claim: 1 }
  },

  options: {
    evidence_limit: 3,
    deny_if_any_unsupported: true
  }
};

async function evaluate(({
  const res = await fetch("https://factara-api.fly.dev/v2/authorize", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "Authorization": "Bearer " + process.env.FACTARA_API_KEY
    },
    body: JSON.stringify(payload)
  });

  const result = await res.json();
  console.log(result);
}

evaluate();
Factara response (example).
{
  "request_id": "req_001",
  "request_hash": "sha256:abcd1234...",
  "decision": "allow",
  "reason": "coverage_met",
  "coverage_score": 0.95,
  "diagnostics": [
    { "claim_id": "c1", "claim_text": "Order order_1842 was charged twice for $550.00 USD within 24 hours.", "coverage": 1.0 }
  ],
  "action_ref": { "type": "refund", "hash": "sha256:efgh5678..." },
  "audit": {
    "record_id": "28fca883-b2f8-4d12-9c6b-0123456789ab",
    "record_hash": "sha256:32514406a64...",
    "key_id": "audit_v2",
    "merkle_root": "sha256:5b0ab5785e0b...",
    "proof": [
      { "hash": "sha256:aaa111...", "position": "left" },
      { "hash": "sha256:bbb222...", "position": "right" }
    ]
  }
}