Skip to content

Governed Execution Runtime

Stellrai doesn't care how you built your app. It governs how it executes.

Stellrai

Use Stellrai when:

  • Actions must be controlled before execution — payments, approvals, mutations
  • Failures require rollback or replay without manual compensation logic
  • Auditability is required by default — compliance, regulated industries, internal policy
  • AI agents or autonomous systems act on behalf of users

The integration contract

You don't need to change how you build.

Just route critical actions through Stellrai — and they become governed, traceable, and reversible by default.

typescript
import { HybriDBClient } from '@hybridb/sdk';

const hdb = new HybriDBClient({
  baseUrl: 'https://hybridb.stellrai.com',
  apiKey:  process.env.HDB_API_KEY!,
});


// ─── 1. Request a decision (policy check) ───────────────────────────────────

const decision = await hdb.requestDecision({
  decisionType: 'payment.authorize',
  action:       'payment.initiate',
  inputData:    { amount: 15000, currency: 'USD', actorId: 'user:alice' },
});

if (decision.outcome !== 'approved') throw new PolicyDenyError(decision);


// ─── 2. Execute the governed pipeline ───────────────────────────────────────

const execution = await hdb.triggerPipelineByName('payment.execute.standard', {
  decisionId: decision.decisionId,
  input:      { amount: 15000, to: 'acct_9k2x' },
});


// ─── 3. Rollback if needed — any time within the reversibility window ────────

await hdb.reversibility.rollback(execution.id, { reason: 'user_request' });

Three method calls. Decision → execution → rollback. Everything else — policy enforcement, checkpointing, audit logging — happens automatically.

json
{
  "executionId": "exec_abc123",
  "status":      "completed",
  "audit":       "recorded",
  "reversible":  true
}

Every execution appears instantly in your dashboard with full trace, audit log, and rollback controls.

hybriDB is the kernel inside Stellrai.