Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fact0.io/llms.txt

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

TypeScript SDK

npm install @fact0/sdk
import { Fact0Client } from "@fact0/sdk";

const client = new Fact0Client({
  apiKey: process.env.FACT0_API_KEY!,
  baseUrl: process.env.FACT0_BASE_URL ?? "https://api.fact0.io",
});

await client.audit.log({
  actor: { id: "agent-1", type: "agent" },
  action: "document.delete",
  resource: { id: "doc_1", type: "document" },
  outcome: "success",
});

const events = await client.audit.listEvents({ pageSize: 20 });
Never expose API keys in browser code. Use @fact0/sdk only in server-side contexts (Next.js route handlers, Node agents, workers).

Modules

  • client.audit — audit log read/write/verify/export
  • client.telemetry — execution tracing
Types are generated from OpenAPI specs in openapi/.

Environment variables

VariablePurpose
FACT0_API_KEYBearer API key
FACT0_BASE_URLAPI origin