
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
@layers/amba-web
Advanced tools
amba SDK for browser apps — full SDK 4.0 surface (34 modules: auth + magic link, users, sessions, sync, collections + vector search, storage + list/delete/download, push, entitlements, flags, config, deep links, onboarding, content, messaging, friends, gr
Amba is the agent-native backend-as-a-service for mobile and web apps. This package is the browser SDK.
Full parity with the cross-language Amba surface: auth · collections · storage · events · push · entitlements · AI · config · flags · achievements · challenges · currencies · friends · groups · inventory · leaderboards · messaging · moderation · onboarding · referrals · reviews · roles · sessions · streaks · stores · sync · xp.
npm install @layers/amba-web@1.0.1
(pnpm add and yarn add also work.)
import { Amba } from "@layers/amba-web";
await Amba.configure({
apiKey: import.meta.env.VITE_AMBA_API_KEY,
});
await Amba.auth.signInAnonymously();
await Amba.events.track("app_opened", { source: "deep_link" });
Read or write a typed collection — rows are automatically scoped to the signed-in user:
const { data: todos } = await Amba.collections.find("todos", {
filter: Amba.collections.where.eq("done", false),
order: [{ column: "created_at", direction: "desc" }],
limit: 50,
});
await Amba.collections.insert("todos", {
title: "Ship the SDK",
done: false,
});
Schedule a content library agentically (via MCP), then read today's selection from the SDK:
// Agent-side (one-time setup via MCP)
// amba_content_libraries_create({ project_id, name: "Daily Tips" })
// amba_content_items_add({ project_id, library_id, items: [...] })
// amba_content_schedules_create({
// project_id, library_id, name: "Daily rotation",
// schedule_type: "daily_rotation",
// })
// In-app (every session)
const todayTip = await Amba.content.getToday("Daily Tips");
console.log(todayTip.body);
getToday(libraryName) returns the item the schedule rotated in for the current period — segment-aware where the schedule is targeted.
Define a streak once via MCP (amba_streaks_create — usually from your dev shell or admin tool), then call qualify from your app on every qualifying user action:
const streak = await Amba.streaks.qualify("daily_play");
// streak.current_count — current consecutive count
// streak.longest_count — personal best
// streak.status — 'active' | 'broken' | 'frozen'
// streak.freezes_remaining — unused shields (auto-granted, configurable)
If the streak hasn't been defined yet, the call throws with error.code === 'STREAK_NOT_DEFINED' — that's a config-time error, never a runtime one. Full guide: https://docs.amba.dev/streaks.
The full messaging surface — createConversation, getConversations, listConversations, sendMessage, listMessages, markRead — ships as SDK helpers in 1.0.3+. No REST fallback needed.
// Create a conversation. For `type: "direct"` between two users,
// the call is idempotent — calling it again returns the existing row.
const conv = await Amba.messaging.createConversation({
participant_ids: [otherUserId],
type: "direct",
});
// Send a message — conversation_id is a path arg, not a body field
const msg = await Amba.messaging.sendMessage(conv.id, {
body: "hey, want to start a daily streak together?",
});
// List the user's conversations
const inbox = await Amba.messaging.getConversations();
// Page through messages in a conversation
const messages = await Amba.messaging.listMessages(conv.id, { limit: 50 });
// Mark the conversation as read once the user has scrolled it
await Amba.messaging.markRead(conv.id);
Typed errors on every endpoint: branch on error.code for USER_NOT_FOUND, INVALID_PAYLOAD, CONVERSATION_NOT_FOUND, NOT_A_PARTICIPANT. Full guide: https://docs.amba.dev/social/messaging.
≤30 KB gzipped for the entry point. The shared runtime loads lazily on first call.
Full reference (auth, collections, storage, push, AI, flags, …): https://docs.amba.dev/sdk/web.
MIT
FAQs
amba SDK for browser apps — full SDK 4.0 surface (34 modules: auth + magic link, users, sessions, sync, collections + vector search, storage + list/delete/download, push, entitlements, flags, config, deep links, onboarding, content, messaging, friends, gr
The npm package @layers/amba-web receives a total of 6 weekly downloads. As such, @layers/amba-web popularity was classified as not popular.
We found that @layers/amba-web demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.