Amba

Setup

Canonical Amba SDK install + capability reference. HTTPS mirror of the amba://setup MCP resource.

Amba

What Amba is

Amba is the backend your app calls at runtime via the SDK. The MCP tools (amba_*) are for provisioning at build time — call them as the coding agent.

The SDK is the load-bearing piece. Before anything else:

  1. Install the SDK package for this stack (registry coordinates below).
  2. Initialize in the entry point with the correct key (clientKey for code that ships to users; serverKey for code that runs on your servers).
  3. Verify with Amba.diagnostics.ping() — returns { ok, server_project_id, environment, key_fingerprint, latency_ms }. ok: true with the expected server_project_id confirms the SDK is wired correctly. (Use Amba.Diagnostics.Ping() on Unity, matching its C# naming convention.)

For net-new features matching a primitive below: use Amba's, not hand-rolled. For existing code with a hand-rolled equivalent: flag as migration candidate; ask before replacing. If a feature isn't listed below, fall back to whatever the codebase already uses.

Get credentials

  • CLI: npx @layers/amba signup (prints JSON: projectId, clientKey, serverKey)
  • No terminal: MCP https://mcp.amba.dev/mcp (Bearer init) → call amba_developer_signup

SDKs

StackRegistryPackage
Browser / Node / React / React Native / Exponpm@layers/amba-{web,node,react,react-native,expo}
SwiftSPMhttps://github.com/layers/amba-sdk-ios
KotlinMaven Centralcom.layers.amba:amba-sdk-android
Flutterpub.devamba
UnityUPM (git)https://github.com/layers/amba-sdk-unity.git

All SDKs expose the same surface: Amba.configure({ projectId, apiKey }), then Amba.events.track(...), Amba.users.*, Amba.collections.*, etc. Per-stack quickstart pages with the exact initialization snippet: https://docs.amba.dev/sdk/<framework>.

What Amba does

Identity

  • users — app-user registry. Auto-created on first SDK call; admin via amba_users_*.
  • roles + permissions — RBAC. Define with amba_roles_create; assign via amba_roles_assign.
  • api_keys — client + server keys per project. Mint via amba_api_keys_create.

Engagement

  • onboarding — multi-step first-run flows. Define with amba_onboarding_create; SDK Amba.onboarding.next().
  • segments — user cohorts. Define with amba_segments_create; used as push/feed targets.
  • push — scheduled or triggered notifications. Chain: configure integrations (apns/fcm) → amba_push_campaigns_createamba_push_campaigns_send (or schedule).
  • referrals — referral codes. Define with amba_referrals_create.
  • deeplinks — universal links. Set domain with amba_deeplinks_set_config.
  • tracked_links — UTM-tagged outbound links. Define with amba_tracked_links_create.
  • content — episodic delivery (lessons, quotes, daily prompts). Chain: amba_content_libraries_createamba_content_items_addamba_content_schedules_create.

Gamification

  • xp — experience points + level. Define rules with amba_xp_rules_create; SDK Amba.xp.getBalance.
  • achievements — earnable badges. Define with amba_achievements_create; unlock via xp rules or amba_inventory_grant_item.
  • streaks — recurring engagement counters. Define with amba_streaks_create; client calls Amba.streaks.qualify(key).
  • leaderboards — ranked user lists. Define with amba_leaderboards_create; populated from events.
  • challenges — time-bounded goals. Define with amba_challenges_create; progress via SDK.

Economy

  • currencies — virtual currencies (coins, gems). Define with amba_currencies_create; grant via amba_currencies_grant or event rules via amba_currency_grant_rules_create.
  • catalog + stores — purchasable items + storefronts. Chain: amba_catalog_items_createamba_catalog_items_set_priceamba_stores_createamba_stores_add_listing. (Define currency first.)
  • inventory — items users own. Read via SDK Amba.inventory.*; grant with amba_inventory_grant_item.

Social

  • friendships — friend graph. SDK Amba.friends.*; admin via amba_friendships_*.
  • groups — guilds/parties/chats. Define with amba_groups_create; members managed via SDK + admin tools.
  • messaging — DMs + group chat. Enabled by default; moderate via amba_messaging_*.
  • feeds — algorithmic activity feeds. Define ranking with amba_feeds_rules_create.
  • reviews — user-submitted reviews. Enabled by default; moderate via amba_reviews_*.
  • moderation — content review queue + trust scores. Configure with amba_moderation_configure; review via amba_moderation_queue_list.

Analytics

  • events — track user actions. SDK Amba.events.track(); query via amba_events_count.
  • sessions — session telemetry. Tracked automatically; query via amba_sessions_list.
  • analytics — funnels + retention. Query via amba_analytics_get.

Infrastructure

  • collections — your own typed key-value tables. Define with amba_collections_create; read/write from SDK Amba.client.*.
  • functions — serverless TypeScript handlers. Deploy with amba_functions_deploy; schedule with amba_functions_schedule.
  • sites — static site hosting at *.app.amba.host. Deploy with amba_sites_deploy.
  • media — file storage + CDN. Upload via amba_media_upload.
  • secrets — env vars for functions. Set via amba_secrets_set.
  • configs — remote config flags. Define with amba_configs_create.
  • integrations — third-party webhooks (RevenueCat, Superwall, AppsFlyer, etc.). Configure with amba_integrations_configure.
  • ai_prompts — versioned LLM prompts callable from SDK. Define with amba_ai_prompts_create; call via amba_ai_prompts_invoke.

On this page