Getting started

Getting started

Prerequisites

  • Node.js 18+
  • An Express app

For Cloud features (dashboard, global revocation): a Bissap Cloud (opens in a new tab) account.

Install

npm install @bissap/sdk

Mount the agent door

import express from "express";
import { enableAgentAccess } from "@bissap/sdk";
 
const app = express();
 
enableAgentAccess(app, {
  userResolver: (req) => req.user.id,
  scopes: ["read", "write"],
  intents: {
    ping: {
      name: "ping",
      requiredScopes: ["read"],
      handler: async () => ({ ok: true }),
    },
  },
  strictIntents: true,
  onAgentIntent: async () => { throw new Error("Unknown intent"); },
});
 
app.listen(3000);

Next steps