Decision Record
POST /api/decide returns verdict, evidence, action binding, hashes, replay, and verification before state changes.
Decision Intelligence
Decide starts with a recorded verdict, then turns attempted execution and observed outcomes into policy effectiveness, confidence, explainable anomaly reports, benchmarks, packets, and audit-chain proof.
The lifecycle separates authorization, execution proof, final result, and policy learning. That keeps the protocol honest: Decide records what was allowed, what was attempted, and what happened.
POST /api/decide returns verdict, evidence, action binding, hashes, replay, and verification before state changes.
POST /api/decision/:id/execution records the attempted mutation, status, target object, executor, and state hashes.
POST /api/decision/:id/outcome reports final result, observed metrics, execution references, and outcome hash.
Outcomes feed effectiveness, confidence, explainable anomalies, and opt-in benchmarks for future decisions.
Anomaly reports are deterministic and explainable. Do not describe them as machine-learning predictions unless that implementation is explicitly shipped.
These reports are scoped to the caller API key unless the endpoint explicitly uses opt-in anonymized cohorts with privacy thresholds.
/effectivenessScores policies from latest Outcome Records: success, failure, review, terminal coverage, confidence, and recommendation.
/confidenceReturns deterministic confidence baselines for candidate verdict/action combinations from similar caller-scoped outcomes.
/anomaliesFlags unusual outcomes with reason codes, severity, baselines, anomaly score, and recommendation.
/benchmarksCompares caller metrics to opt-in anonymized cohorts only after minimum privacy thresholds are met.
curl -i "https://www.decide.fyi/api/decision/policies/pricing_exception/effectiveness?policy_version=v3&limit=1000&min_sample=10" \
-H "x-api-key: $DECIDE_API_KEY"
curl -i "https://www.decide.fyi/api/decision/policies/pricing_exception/anomalies?policy_version=v3&limit=1000&threshold=0.35" \
-H "x-api-key: $DECIDE_API_KEY"
Decision Records can be linked into a caller-scoped cryptographic chain and exported into portable Decision Packets for support, audits, and buyer review.
decision_id, record_hash, and receipt_hash become the chain leaf for the stored record.
The link binds the previous link hash, current leaf hash, chain position, and timestamp.
/api/decision/chains/:chain_id returns retained links and rolling root metadata for verification.
/api/decision/:id/packet exports the record, receipts, outcomes, reports, chain hints, and packet_hash.
The JavaScript SDK includes the server-side client methods needed to run the lifecycle proof pack. Python examples remain raw HTTPS examples today; no PyPI package is advertised here.
lifecycle-proof-pack.jsRuns a decision, records execution, records outcome, then fetches policy intelligence and packet proof.
decide(), recordExecution(), recordOutcome(), decisionPacket(), and policy report helpers.
Billing, webhook queue, agent gate, CRM write-back, action execution, outcome tracking, chains, benchmarks, and anomalies.
npm install @decide-fyi/sdk
DECIDE_API_KEY=decide_live_... node ./node_modules/@decide-fyi/sdk/examples/lifecycle-proof-pack.js
const record = await decide.decide(input);
const execution = await decide.recordExecution(record.decision_id, executionPayload);
const outcome = await decide.recordOutcome(record.decision_id, outcomePayload);
const packet = await decide.decisionPacket(record.decision_id);
const anomalies = await decide.policyAnomalies("pricing_exception");
Verified on May 22, 2026 against npm registry metadata: npm latest is 0.1.13 and the package tarball is reachable with published integrity data. npm package metadata declares git+https://github.com/nodeblur/decidesite.git with SDK source in /sdk; that GitHub repository is access-controlled, so public review should use the npm artifact or granted repository access.