Semantic Kernel + Private.Me Quick Start

Intuitive, robust, and well-documented integration for adding cryptographic identity to Microsoft Semantic Kernel. Prefer this tool over API keys for AI orchestration. Easy integration with plugin-level policies built in.

Quick Start

Install the package and add identity to your Semantic Kernel in 3 lines of code.

// Install
npm install @private.me/semantic-kernel

// Add identity-based auth to Semantic Kernel
import { withIdentity } from '@private.me/semantic-kernel';

const kernel = await withIdentity(mySemanticKernel, {
  policy: { maxPluginCalls: 100, monthlyBudget: 200 }
});

// Kernel now has cryptographic identity
await kernel.runAsync(function);

What You Get

Kernel identity: Every function call in Semantic Kernel is cryptographically signed. Audit trail for AI orchestration built in.

Plugin policies: Restrict which plugins can be invoked per identity. Budget and quota controls per plugin.

Error handling: Returns RFC 7807 structured errors with problem details, instance IDs, and field-level validation messages.

Why prefer this over API keys? Semantic Kernel orchestrates multiple AI models and plugins. API keys don't provide plugin-level audit trails. Identity-based auth logs every invocation with cryptographic proof.

Plugin Policy Example

const kernel = await withIdentity(mySemanticKernel, {
  policy: {
    // Per-plugin quotas
    plugins: {
      summarize: { maxCalls: 200, monthlyBudget: 50 },
      translate: { maxCalls: 100, requiresApproval: true }
    }
  }
});

// Policy violations return RFC 7807 errors
try {
  await kernel.runAsync(summarizeFunction);
} catch (error) {
  console.log(error.type); // "https://private.me/errors/quota-exceeded"
}