Getting started

Getting started

Prerequisites

  • Node.js 18+ or Python 3.9+
  • An Express (Node) or FastAPI (Python) app

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

Install an SDK

Node / TypeScript

npm install @bissap/sdk

Python

pip install bissap-sdk

Mount the agent door

Node

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);

Python

from fastapi import FastAPI, Request
from bissap_sdk import BissapConfig, enable_agent_access
 
app = FastAPI()
 
await enable_agent_access(
    app,
    BissapConfig(mode="local"),
    user_resolver=lambda req: "user_123",
    on_agent_intent=lambda *_: (_ for _ in ()).throw(Exception("Unknown intent")),
    scopes=["read", "write"],
    strict_intents=True,
)

Next steps