@paraph/sdk
v0.2.0
Published
Paraph SDK — tamper-evident records and human-approval gates for AI agents. EU AI Act Articles 12 + 14.
Downloads
370
Maintainers
Readme
@paraph/sdk
The system of record for AI agents. Record every step of an agent run onto a tamper-evident hash chain, pause high-risk actions on a real human gate, and produce evidence a third party can verify — without trusting Paraph.
npm install @paraph/sdkimport { paraph } from "@paraph/sdk";
const q = paraph({ apiKey: process.env.PARAPH_API_KEY!, run: "loan-4821", agent: "underwriter" });
q.message("Applicant #4821 requests €40,000");
q.toolCall("pull_credit_report", "score=690", { metadata: { bureau: "Experian" } });
// pauses here until a human resolves it in the control room
const decision = await q.gate({ action: "Approve €40,000 loan", policy: "block" });
await q.end(decision.approved ? "complete" : "error");- Non-blocking, order-preserving recording — a slow network never blocks your agent.
- No duplicates: every delivery carries an idempotency key, so retries can't double the record.
- Self-healing: failed deliveries retry with capped backoff;
flush()/end()throw if anything remains undelivered — silence never means "probably delivered". The queue is in-process memory: flush at meaningful boundaries (gate()flushes itself). gate()— human sign-off on the record, withblock/auto-denytimeout policies. If a timeout can't be recorded server-side, the decision isindeterminate(recorded: false) — never a final-looking answer that isn't in the record.- Zero dependencies. TypeScript-first, ESM + CJS.
Docs: https://paraphhq.vercel.app/docs · Verify any export: https://paraphhq.vercel.app/verify
EU AI Act Articles 12 + 14 — vendor-neutral, independent, externally anchored.
