Skip to content

Quickstart

Get SOVR running in 5 minutes.

1. Install the SDK

bash
npm install @sovr/sdk
bash
yarn add @sovr/sdk
bash
pnpm add @sovr/sdk

2. Get API Credentials

  1. Go to sovrapp.com
  2. Create an account or sign in
  3. Navigate to Settings → API Keys
  4. Create a new API key

3. Initialize the Client

typescript
import { SovrClient } from '@sovr/sdk';

const sovr = new SovrClient({
  tenantId: process.env.SOVR_TENANT_ID,
  apiKey: process.env.SOVR_API_KEY,
});

4. Add Gate Checks

Wrap your AI actions with gate checks:

typescript
async function executeAIAction(action: string, context: any) {
  // Check with SOVR before executing
  const result = await sovr.gate.check({
    action,
    context
  });

  switch (result.decision) {
    case 'allow':
      // Safe to execute
      return await executeAction(action, result.plan);
    
    case 'deny':
      // Block the action
      throw new Error(`Action denied: ${result.reason}`);
    
    case 'require_approval':
      // Queue for human review
      return { pending: true, approvalId: result.approvalId };
  }
}

5. Handle Approvals (Optional)

Set up approval callbacks:

typescript
// Webhook handler for approval decisions
app.post('/webhooks/sovr', async (req, res) => {
  const { event, data } = req.body;
  
  if (event === 'approval.completed') {
    if (data.decision === 'approved') {
      await executeAction(data.action, data.plan);
    }
  }
  
  res.status(200).send('OK');
});

6. Monitor in Dashboard

Visit sovrapp.com/dashboard to:

  • View real-time decisions
  • Manage pending approvals
  • Export audit logs
  • Configure policies

Next Steps

The AI Responsibility Layer