New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@layers/amba-node

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@layers/amba-node

amba SDK for Node.js server apps — full 34-module surface for backend integration with amba.

Source
npmnpm
Version
4.0.7
Version published
Weekly downloads
2
-89.47%
Maintainers
3
Weekly downloads
 
Created
Source

@layers/amba-node

Amba is the agent-native backend-as-a-service for mobile and web apps. This package is the Node.js SDK — the server-side companion to @layers/amba-web, with the full 34-module Amba surface and idiomatic Node ergonomics (Connect-style middleware, per-user asUser(...) scoping for bulk operations).

Install

npm install @layers/amba-node@4.0.0

Configure + first call

import { AmbaClient } from "@layers/amba-node";

const amba = await AmbaClient.configure({
  projectId: process.env.AMBA_PROJECT_ID!,
  clientKey: process.env.AMBA_CLIENT_KEY!,
  // Required for amba.asUser(...) — see below.
  serverKey: process.env.AMBA_SERVER_KEY,
});

await amba.events.track("webhook_received", { source: "stripe" });

Per-user scoped calls

// Attribute the event to a specific user without minting a session.
await amba.asUser(userId).events.track("checkout_completed", { amount: 99 });

Express middleware

import express from "express";
import { AmbaClient } from "@layers/amba-node";

const amba = await AmbaClient.configure({
  projectId: process.env.AMBA_PROJECT_ID!,
  clientKey: process.env.AMBA_CLIENT_KEY!,
  serverKey: process.env.AMBA_SERVER_KEY,
});

const app = express();
app.use(amba.middleware());

app.post("/webhook", (req, res) => {
  req.amba.events.track("webhook_received");
  res.sendStatus(204);
});

Docs

Full reference: https://docs.amba.dev/sdk/node.

License

MIT

FAQs

Package last updated on 10 Jun 2026

Related posts