These are real, copy-pasteable examples using the open-source SDKs. No hosted account required — everything below runs against the local, self-hostable packages.
Pick the SDK for your stack. Each package ships independently.
npm install @veritio/core
# or
bun add @veritio/corepip install veritiogo get github.com/getveritio/veritio/sdks/goAppend a structured audit event to a store, then link the actor to it with an evidence edge.
import { MemoryAuditStore, createAuditEvent, createEvidenceEdge } from "@veritio/core";
const store = new MemoryAuditStore();
const event = createAuditEvent({
id: "evt_01",
occurredAt: "2026-06-10T00:00:00.000Z",
actor: { type: "user", id: "usr_123" },
action: "org.member.invited",
target: { type: "organization", id: "org_123" },
scope: { tenantId: "org_123", environment: "production" },
purpose: "access_management",
lawfulBasis: "contract",
retention: "security_1y",
metadata: { inviteId: "inv_123", role: "viewer" },
});
await store.append(event);
const edge = createEvidenceEdge({
id: "edge_01",
occurredAt: "2026-06-10T00:00:01.000Z",
scope: { tenantId: "org_123", environment: "production" },
from: { type: "actor", id: "usr_123", actorType: "user" },
relation: "created",
to: { type: "runtime_event", id: "evt_01" },
metadata: { reason: "member_invite" },
});The evidence edge connects the actor (usr_123) to the recorded event in the evidence graph, capturing who did what without overwriting the original event.
Build an evidence edge — for example, linking an AI agent session to a file it created — and produce a stable hash for that edge.
from veritio import create_evidence_edge, hash_evidence_edge
edge = create_evidence_edge({
"from": {"type": "agent_session", "id": "agt_sess_123"},
"relation": "created",
"to": {"type": "file", "id": "file_billing_plan", "pathHash": "sha256:..."},
"scope": {"tenantId": "org_123", "environment": "production"},
"metadata": {"reason": "ai_agent"},
})
edge_hash = hash_evidence_edge(edge)Run the Workbench from your terminal to explore evidence locally.
veritio dev --mcpThis opens a browser evidence-graph UI with a verifier, a scenario runner, and MCP tools for AI agents — all running locally, with no account needed.
Shipped adapters wire evidence recording into popular frameworks with minimal glue code.
Record user, session, and invitation events.
Record evidence from server route handlers and server actions.
Server-side evidence recording.
Server-side evidence recording.
UI intent helpers that annotate the interface (no client-side recording).
See the full reference example combiningNext.js + Better Auth:examples/nextjs-better-auth →
Express, Hono, tRPC, and FastAPI adapters are planned and not yet available.
Clone the repo, read the protocol, and run the examples above. Veritio provides evidence support for your audit trails — you stay in control of where it runs.