Skip to main content
Every app running inside the webAI shell has access to a set of platform capabilities — AI, identity, messaging, storage, and more. Your app reaches them through a single bridge object that the shell injects into your iframe.

The bridge object

The shell injects window.apogeeSDK into your app’s window. This is a frozen object that exposes capabilities as facades — one facade per domain.
const sdk = window.apogeeSDK || null;
if (!sdk) return;
When your app runs outside the shell (standalone browser preview, a local HTML file double-clicked from Finder), the SDK is null. Always guard before calling.

Declaring your requirements

Your app tells the shell which facades it needs through a manifest. The shell reads the manifest before injection — only requested facades are made available to the app.
<script id="apogee-shell-manifest"
  type="application/apogee-shell-manifest+json">
{
  "schemaVersion": 1,
  "name": "My App",
  "version": "1.0.0",
  "requires": {
    "managers": ["identity", "intelligence", "theme", "messaging"]
  }
}
</script>
Place this script in the <head> of your app’s HTML. After loading, check sdk.supportedFacades to see what was actually injected — a facade may be omitted if the current shell build doesn’t ship it (for example, browser-only mode may expose fewer facades than the desktop app).

Using a facade

Each facade is accessed as a property of sdk. Common patterns:
// Read state synchronously
const identity = sdk.identity.getState();

// Call an async method
const messages = await sdk.messaging.listMessages("room");

// Subscribe to changes (always unsubscribe when done)
const unsubscribe = sdk.identity.subscribe((event) => {
  console.log("Identity changed:", event);
});

// On teardown or before reload
unsubscribe();
Every facade with state exposes subscribe(handler) — the returned unsubscribe function must be called on teardown to avoid memory leaks.

Facade domains

Facades are grouped by domain. A non-exhaustive list:
DomainFacades
Shell & Platformshell, theme, designSystem, windows, apps, flags, settings, browser
Identityidentity, crypto, profile
Collaborationmessaging, room, canvas, files
ContentcontentIndex, searchIndex, storage
Peoplepeople, notifications
Intelligenceintelligence, context, idn, personas
See the Overview for a guided tour, or open the in-app Developer panel for the complete per-facade reference.

Full reference

Method signatures, parameter tables, return types, and interactive examples for every facade live in the in-app Developer panel.

Open the Developer panel

  1. Open Settings → Experimental and toggle Developer Mode on.
  2. A terminal icon appears in the top right of the app. Click it to open the Developer panel.
  3. Go to the Documentation section. Browse facades in Docs mode, run methods live in Lab mode, or inspect design-system primitives in Components mode.

Learn more

Build apps

Build your first app using the webAI SDK and platform facades.

App architecture

Understand how apps run inside the webAI shell.