Agent Bootstrap
Copy-paste bootstrap contract for agents, copilots, and automation integrating with Mirror products
This page is the docs-site version of the repo AGENTS.md / CLAUDE.md contract. Use it when an agent needs a machine-readable bootstrap without repo access.
What you can do headlessly
- call gateway-backed chat and streaming
- protect prompts and share them with PRE
- encrypt and open vectors
- use RBAC / ABE-gated vector open
- run FPE on structured values
- evaluate policy for code-agent safety
- use ECAD protect / evaluate / phase-gate
- use memory observe / recall / answer and secure retrieval
- use browser/WASM helpers for prompt, vector, and FPE surfaces that are actually browser-capable
Minimal environment
Auth model
Use the smallest credential that works.
-
Portal SDK bundle
- create or rotate a service credential in Portal
- download the SDK bundle while the secret is first displayed
- set
MIRROR_SERVICE_CREDENTIAL_FILE=.secrets/service-credential.json - let the SDK exchange the credential and load license/public-key files
-
Manual service credential
- exchange
client_idandclient_secretat Keycloak - call Gateway and product APIs with
Authorization: Bearer <token>
- exchange
-
Capability JWT
- set
MIRROR_CAPABILITY_JWTonly when the deployment uses delegated capability-scoped auth
- set
-
Legacy project key
- keep only for explicit bootstrap or raw Gateway compatibility paths
- do not use it for new SDK, Portal, Memory/VDB, Tool/MCP, AgentIQ, or Policy integrations
Most application integrations should start with the Portal SDK bundle or a service credential plus the hosted runtime access profile. Use broader admin credentials only for bootstrap or operator flows that explicitly require them.
Fast verification
Token bootstrap
Common tasks
Gateway chat
Python and TypeScript chat examples.
Prompt protection
PRE/prompt examples across Python, TypeScript, and browser/WASM.
Vector and RBAC open
Protect, open, and RBAC-gate vector workflows.
Policy and agent governance
Policy engine examples for agent runtime controls.
Memory and context
Observe, recall, load, unload, and answer flows.
All SDK surfaces
One index page for all runtime and surface examples.
Browser/WASM rule
Use browser/WASM only for surfaces that are actually browser-capable:
- prompt helpers
- vector helpers
- FPE helpers
Do not use browser/WASM as the primary path for:
- gateway admin flows
- service-credential bootstrap
- full gateway-backed inference
- standalone policy evaluation
- direct FHE execution as the primary deployment model
Next step
Go to SDK Surface Examples if you need the full per-surface example index.