Documents are loading...

Getting Started

SDK Catalog and Quickstart

How to use the portal SDK catalog, choose the right integration mode, and verify the end-to-end Mirror path

The Portal SDK download surface (Develop → SDK, /sdk/download) is the curated operator and developer entry point for the active platform contract.

Use it when you need to:

  • create a service credential
  • download a self-contained SDK handoff bundle
  • decide between gateway proxy, encrypted SDK, and agent / MCP modes
  • copy install commands or download native bundles
  • verify metrics, traces, usage, and product-specific runtime calls

Portal surfaces that matter

  • Develop -> SDK: entitlement-aware package catalog and bundle download
  • Service Credentials: create, rotate, and download SDK handoff bundles
  • Local SDK License: refresh the signed license used by native/local SDK operations
  • Use Mirror -> Onboarding: guided SDK setup, env blocks, and starter examples
  • Use Mirror -> Playground: first hosted request against the current service credential
  • Use Mirror -> Builder: composed protected workflow across products
  • Key Management: customer-generated prompt, vector, signing, CEK, and FHE rails

The supported onboarding modes

Canonical runtime contract

  1. Create a service credential in Portal.
  2. Reveal client_id and client_secret once.
  3. Download the service credential handoff bundle during create or rotate if you need the secret locally.
  4. Download SDK packages separately from Develop → SDK when you need wheels, tarballs, or native bundles to install.
  5. Exchange the credential values at the Keycloak token endpoint, or let the SDK do it from MIRROR_SERVICE_CREDENTIAL_FILE.
  6. Confirm the enterprise owns the right products in Account Settings or Billing & Usage.
  7. Open Key Management when you need customer-generated prompt, vector, signing, CEK, or FHE rails.
  8. Call MAPI or Gateway with Authorization: Bearer <token>.
  9. Use the offline signed license from the credential handoff bundle for local/native SDK operations.

Service credentials are the common runtime identity across Gateway, Assurance, Agent Security, Code Security, native crypto flows, and connector / MCP paths. They are not the same thing as customer-owned encryption keys. Use Key Management for local key generation and KMS handoff.

Service credential handoff bundle

Download this from Develop → Credentials during service-credential create or rotate, while the secret is visible. It is the local auth and license handoff for hosted and native SDK work — not the SDK package download itself.

FilePurpose
service-credential.jsonAPI base URLs, token URL, tenant metadata, service credential id, and first-display secret only on create/rotate bundles
mirror-license.jsonsigned offline license for local/native SDK operations
mirror-license-public-key.b64public verification key for license validation
optional key bundlecustomer-generated keys when --generate-keys or Portal Key Management export is used

Existing credential downloads should not reveal client_secret. Use create or rotate when a new local secret handoff is required.

SDK package download

Download SDK wheels, tarballs, and native bundles from Develop → SDK (/sdk/download). The portal composes an entitlement-filtered zip from the live SDK catalog — for example Python wheels, TypeScript tarballs, WASM bundles, integration packages, and optional native bundles.

That download is separate from the service credential handoff bundle above. Typical local setup uses both:

  1. install SDK packages from Develop → SDK
  2. place service-credential.json and optional license files from Develop → Credentials under .secrets/

Write the credential handoff to local secrets

Use the same local layout across Gateway, VectaX, DiscoveR, AgentIQ, Code Prism, Memory, and VDB examples:

SDK_BUNDLE_DIR="/path/to/downloaded-credential-bundle"
 
mkdir -p .secrets
chmod 700 .secrets
 
# Copy or unzip the service credential handoff bundle into .secrets.
# Hosted SDK calls require a create/rotate bundle where client_secret is present.
cp "$SDK_BUNDLE_DIR/service-credential.json" .secrets/service-credential.json
chmod 600 .secrets/service-credential.json
 
# Optional: only when the bundle includes offline/local runtime license files.
if [ -f "$SDK_BUNDLE_DIR/mirror-license.json" ]; then
  cp "$SDK_BUNDLE_DIR/mirror-license.json" .secrets/mirror-license.json
  chmod 600 .secrets/mirror-license.json
fi
 
if [ -f "$SDK_BUNDLE_DIR/mirror-license-public-key.b64" ]; then
  cp "$SDK_BUNDLE_DIR/mirror-license-public-key.b64" .secrets/mirror-license-public-key.b64
  chmod 600 .secrets/mirror-license-public-key.b64
fi
 
export MIRROR_SERVICE_CREDENTIAL_FILE=.secrets/service-credential.json

Do not commit .secrets/ or paste the service credential JSON into tickets, examples, or prompts.

CLI verification path

Run these after installing the SDK and writing the bundle to .secrets/:

export MIRROR_SERVICE_CREDENTIAL_FILE=.secrets/service-credential.json
 
mirror diagnose
mirror licenses verify
mirror gateway models
mirror chat "ping"
mirror kms summary

For a new automation-owned credential:

mirror credentials create-bundle \
  --name customer-app \
  --out .secrets \
  --generate-keys

What the catalog exposes

The active SDK catalog groups packages and bundles into these surfaces:

  • @mirror/sdk — canonical TypeScript SDK
  • mirror-sdk — external Python facade aligned to the canonical contract
  • mirror-enc — canonical Python native bindings
  • mirror-engine-client — strict-FHE request builder and decrypt helper for protected inference lanes
  • @mirror/wasm — compiled browser / WASM helper surface
  • @mirror/fhe-client — TypeScript strict-FHE request builder, bundled WASM, tokenizer assets, and decrypt helper
  • mirror agent-proxy start — local OpenAI/Anthropic-compatible proxy for coding agents
  • mirror-claw-sdk, @mirror/claw-sdk, @mirror/claw-sdk-wasm, and Rust mirror-claw-sdk — Claw/OpenClaw integration packages
  • @mirror/anthropic-compat, @mirror/openai-agents, and @mirror/claude-agent — agent framework compatibility packages shipped in the SDK release bundle
  • curated native Python bundles per OS / Python version when portal download is enabled

Portal SDK downloads include the platform-specific mirror-engine-client wheel for Python protected/FHE calls and the @mirror/fhe-client tarball for TypeScript protected/FHE calls. A tester should not need to fetch the FHE client bundle from Azure DevOps separately when installing from the current Portal catalog.

Product coverage

Product / surfaceBest starting mode
Gateway / VectaX runtimeGateway Proxy Mode
Coding agentsCoding Agent Proxy Mode
Claw / OpenClawCoding Agent Proxy Mode plus Claw SDK package
Native crypto / PRE / vector / FPE / metadataEncrypted SDK Mode
CEK / KMSEncrypted SDK Mode
FHEEncrypted SDK Mode
Memory / VDBProxy Mode or Agent / MCP Mode through Gateway-hosted SDK methods
AssuranceProxy Mode or language SDK client
Agent SecurityProxy Mode or language SDK client
Code SecurityService credential + bearer token, then product-specific client or extension workflow
Connectors / MCPAgent / MCP Mode

Quick examples

Use the exact internal acquisition command shown on Portal Develop → SDK, then install or run the package locally. Example runtime usage:

import { Mirror } from '@mirror/sdk';
 
// new Mirror() reads the service credential issued from Portal; SDK artifacts come from Develop → SDK or Service Credentials.
// from MIRROR_SERVICE_CREDENTIAL_FILE; that credential id scopes every hosted call
// to the tenant + entitlements minted in the portal.
const client = new Mirror();
 
const response = await client.chat.completions.create({
  model: 'gpt-4o-mini',
  messages: [{ role: 'user', content: 'ping' }],
});
console.log(response.text);
 
const hits = await client.vdb.search('demo-docs', {
  vector: [0.1, 0.2, 0.3],
  topK: 3,
});

Verify the path in portal

After you send traffic:

  1. open Gateway Metrics
  2. open Gateway Traces
  3. confirm usage is attributed to the service credential and project
  4. confirm policy / telemetry signals show up as expected