Quickstart
Get SOVR running in 5 minutes.
1. Install the SDK
bash
npm install @sovr/sdkbash
yarn add @sovr/sdkbash
pnpm add @sovr/sdk2. Get API Credentials
- Go to sovrapp.com
- Create an account or sign in
- Navigate to Settings → API Keys
- 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
- Gate API - Learn gate check options
- Policies - Configure approval rules
- Integrations - Connect to OpenAI, Anthropic, etc.