Customer lifecycle
Turn a B2B onboarding or offboarding goal into one reviewable operation instead of making the model sequence Management API endpoints.
- Onboard an organization
- Check onboarding status
- List customers
- Offboard safely
org-adminGoverned Auth0 capabilities for AI agents
Goal-oriented tools · real human approval · durable evidence
A lifecycle layer for agents that need to operate an Auth0 tenant—not a wrapper around 327 endpoints. The agent proposes the complete change, a human approves that exact authority out of band, and every scoped action is receipted.
Live tenant access is limited to Okta/Auth0 colleagues and invited guests. Sign in with a work email and one-time code; no password.
How it is built
Hosts decide who is acting and which capability family is enabled. The registry projects the same tool definitions into every surface; the lifecycle, scope ceiling, and receipt policy never move into adapter code.
hosts
Composite by design. “Onboard this customer” is one resumable operation with a complete blast radius, not a model improvising four API calls.
Fail-closed by default. Principal, toolset, scope, token, and approval are separate layers. No single layer can silently stand in for another.
Open the interactive architecture map →What it can do
Toolsets are the host’s grant unit. Each tool remains inspectable data with its own principal rules, scopes, approval annotation, and schema.
Turn a B2B onboarding or offboarding goal into one reviewable operation instead of making the model sequence Management API endpoints.
org-adminRead real tenant logs, identify brute force or credential stuffing, then gate containment on an exact human-approved plan.
security-opsLet people inspect and revoke their own access. The target subject is resolved by the server and never accepted from model input.
self-serviceWho can act
tenant-adminA role the host must authorize explicitly. Gets only the enabled toolsets and each tool’s declared scope ceiling.
end-userRequires a subject. Self-service targets are derived on the server, so a model cannot swap in another user.
agentCarries a stable agent id and optional on-behalf-of user. Actor, subject, and human approver remain distinct.
Ways to use it
The human’s placement can change—from driving a chat to answering an overnight on-call push. The write gate does not.
Interactive
Local
Hosted
Autonomous
Two reference apps · neither is legacy
apps/demodeployedThe site you are viewing: admin chat, end-user access, live receipt trail, and the hosted MCP resource—all in one Next.js Cloudflare Worker.
apps/sentineldeployable referenceA separate cron-triggered Worker with no chat or client session. It investigates as an agent principal and asks a pinned on-call human before containment.
shared invariantBoth hosts use the same registry, approval gate, scoped credentials, and hash-chained receipt model.
Toolkit services
The core starts with no infrastructure and lets a host opt into only the pieces it needs. Cloudflare D1 is demo wiring, not a dependency of the package.
Immutable ToolSpec data drives every projection and the JSON contract.
One ensureApproved() path owns planning, approval, single-use execution, and recovery.
Principal-aware strategies select an exact-grant M2M client for each tool ceiling.
Auth0 CIBA + Guardian push, durable polling, exact approver and optional RAR verification.
Every transition and Management call enters one hash-chained, optionally signed trail.
Zero-infrastructure memory defaults plus a structural SQLite adapter used by Cloudflare D1.
Developer experience
The full reader now follows the current architecture: AI SDK, hosted MCP, self-service, Sentinel, custom tools, durable state, and the approval gate.
import { auth0 } from '@auth0/agent-toolkit/ai-sdk';const result = streamText({model,system: auth0.systemPrompt(),tools: auth0.tools({// The host authorizes the role; the toolkit binds its authority.principal: { type: 'tenant-admin', user: session.user },writes: true,}),messages,});
Prototype boundary
Independent working prototype; not an official Auth0 or Okta product. The package is not published to npm and the @auth0/ name is aspirational.
See the control loop