Skip to content
BotBaseDocs
PricingDashboardStart free
  • Build AI assistants that know your business
  • Quick start
  • Core concepts
  • Create an account
  • Documents
  • Websites
  • Social media posts
  • How answers are grounded
  • Languages
  • Assistant types and plans
  • Create an assistant
  • Personality and instructions
  • Testing your assistant
  • Conversations
  • Leads, forms and human support
  • Booking agent
  • Email replies
  • AI models
  • Website widget
  • Widget appearance and design
  • Chat link and QR code
  • Connect your business platform
  • CRM lead sync
  • Management Agents overview
  • Integration guide
  • Roles and permissions
  • Security model
  • Server and browser API reference
  • Examples by industry
  • Audit log and troubleshooting
  • Developer API overview
  • API keys
  • Chat API reference
  • Errors and limits
  • Plans and the free trial
  • Billing and payments
  • Emails and notifications
  • Security and privacy
  • Troubleshooting
  • Frequently asked questions
Docs/Management Agents/Security model

Security model

How Management Agents establish identity, enforce permissions, isolate customers and keep a trustworthy audit trail.

Management Agents·4 min read·Updated 2 Dec 2026

Management Agents can read and change data in your system, so every decision that matters is made by the BotBaseX server, never by the AI model and never by the browser.

#Three credentials, three places

CredentialLooks likeLivesCan do
Server keybbx_mgmt_…Your backend onlyCreate and revoke sessions for this one agent
Session tokenbbxs_…The staff member's browserChat as one user, for minutes, with this agent
Your API credentialsAPI key, bearer, basic or OAuth2Encrypted in BotBaseXCalled only by the BotBaseX server, never sent to browsers
  • Only the SHA-256 hashes of server keys and session tokens are stored.
  • Server-key endpoints (/management/v1/...) do not allow cross-site browser calls, so a key pasted into a web page will not work from other sites. It still must never be put in a page.
  • Session tokens expire (5–60 minutes), can be revoked one by one or per user, and stop working when the agent is paused or deactivated. If the plan no longer includes Management Agents, no new sessions can be created and chat is refused.

#Identity comes from your server

BotBaseX never trusts a user id, role or permission sent by a browser. Only your backend, authenticated with the server key, can say who the user is:

text
staff browser ──(your login cookie)──▶ your backend ──(server key)──▶ BotBaseX
     ▲                                     │
     └────────── session token (bbxs_) ────┘

Each request is tied to:

  • your BotBaseX account and workspace;
  • the connected application (one per Management Agent);
  • the authenticated user (external_user_id) and their roles and attributes;
  • the session and conversation. A conversation can only be continued by the user who started it.

#Every tool call is authorised twice

  1. Before the AI sees anything: it is given only the operations this user may use, with bound inputs hidden.
  2. When the AI asks for something: the server checks it again. Unknown operations and operations outside the user's roles are refused and written to the audit log as denied. Bound inputs are always replaced with the session's own values, whatever the AI sent.

Text in a user's message that looks like an internal instruction or tool directive is removed before it reaches the AI. Even if the model were tricked, it cannot reach anything the server would not allow.

#Confirmation is not authorisation

Saying "yes" never grants anything. A pending action stores the operation and its exact inputs. On confirmation the server checks that:

  • it is the same user and conversation;
  • the action has not expired (30 minutes) and has not already run;
  • the user's roles still allow the operation;
  • the inputs have not changed.

Then it runs once, with an Idempotency-Key header equal to the action id.

#Verify the actor in your own API (recommended)

Every request BotBaseX sends to your API includes:

text
X-BotBaseX-Actor: <JWT>

It is a JSON Web Token signed with HS256 using your actor signing secret (Management system → Connect your application → Show a new secret). It expires after 2 minutes. Claims:

ClaimMeaning
issalways botbasex
audyour Management app id (shown with the secret)
subyour user id from the session
rolesrole keys of the session
attrsattributes from the session
opthe operation key being called
sidsession id
iat, exp, jtiissued at, expiry, unique id
Node.js
// env = your server's environment variables
import jwt from "jsonwebtoken";

function botbasexActor(req) {
  const token = req.get("X-BotBaseX-Actor");
  return jwt.verify(token, env.BOTBASEX_ACTOR_SECRET, {
    algorithms: ["HS256"],
    audience: env.BOTBASEX_APP_ID,
    issuer: "botbasex",
  });
}

app.get("/v1/staff/salaries", (req, res) => {
  const actor = botbasexActor(req);
  if (!actor.roles.includes("admin")) return res.status(403).end();
  // ... return only what this actor may see
});

Your API stays the final authority: if it refuses, the agent reports that the action failed and never claims success.

#Honest results

  • Answers about records come only from your API's responses, and only from the fields you mapped.
  • If a call fails, times out or returns an error, the agent says it could not complete it.
  • If a write's outcome is uncertain (for example a timeout after sending), the agent says so and does not retry automatically.

#Tenant isolation

  • A server key creates sessions only for its own agent. One customer's key cannot affect another customer's sessions.
  • Dashboard configuration and audit logs are visible only to the workspace owner.
  • Conversations are bound to one user of one app.
  • Integration credentials are encrypted per connection and never returned by any API.

#Data handling

  • The audit log stores who, what, when and the outcome. It does not store passwords, tokens or request bodies.
  • Only mapped response fields are passed to the AI model.
  • Conversation history is kept like other BotBaseX conversations and is visible to the workspace owner.
PreviousRoles and permissionsNext Server and browser API reference

On this page

  • Three credentials, three places
  • Identity comes from your server
  • Every tool call is authorised twice
  • Confirmation is not authorisation
  • Verify the actor in your own API (recommended)
  • Honest results
  • Tenant isolation
  • Data handling