AI won't break your rules.
It'll walk right between them.
Cross-step correlation. Real-time action enforcement. Runs inside your app.
1. Run: npx skills add arcjet/skills
2. Add Arcjet protection to my appSecuring AI workflows at:
What your other controls miss
Unauthorized tool calls
Unauthorized tool calls
The request looks clean. Then the workflow issues a refund, reads a file, or hits an internal API. Arcjet enforces at the action boundary, before it fires, not after.
Data exfiltration
Data exfiltration
Sensitive data slips out through prompts, tool outputs, and model context. Arcjet catches it inside the workflow, before it ever leaves the application.
Cost explosion
Cost explosion
Runaway agent loops can burn a token budget in minutes. Without inline enforcement, the first you hear of it is the bill.
What Arcjet catches in real time
AI endpoint abuse protection
Cap tokens per user and org. Stop automated abuse before it reaches the model.
const aj = arcjet({ // User/org scope characteristics: [ "userId", "orgId" ], rules: [ // Block scrapers and bots detectBot({ ... }), // Token budgets tokenBucket({ ... }), ],});
// Block before inferenceconst decision = await aj .protect(req, { userId: user.id, orgId: user.orgId, requested: estimatedTokens, });Prompt injection detection
Catch hostile prompts in user input and tool outputs before they reach the model.
const aj = arcjet({ rules: [ detectPromptInjection({ mode: "LIVE" }) ],});
// Detect promptconst decision = await aj .protect(req, { detectPromptInjectionMessage: userMessage, });if ( decision.isDenied() && decision.reason .isPromptInjection()) { return new Response( "Forbidden", { status: 403 } );}AI data loss prevention
Strip sensitive data before it reaches model context, logs, or third-party tools.
const aj = arcjet({ rules: [ sensitiveInfo({ mode: "LIVE", deny: [ "EMAIL", "CREDIT_CARD_NUMBER", ], }), ],});
// Catch before LLMconst decision = await aj .protect(req, { sensitiveInfoValue: userMessage, });if ( decision.isDenied() && decision.reason .isSensitiveInfo()) { return new Response( "Sensitive data blocked", { status: 403 } );}Agent tool controls
Scope what every agent is allowed to do, by identity, role, and route, and enforce it in real time.
const aj = arcjet({ characteristics: ["agentId"],});
// Per-requestconst ajForAdmin = aj.withRule(tokenBucket({ rate: 1000, interval: "1m", capacity: 1000,}));const ajForMember = aj.withRule(tokenBucket({ rate: 100, interval: "1m", capacity: 100,}));let decision;if (role === "admin") { decision = ajForAdmin .protect(req, { agentId: agent.id });} else { decision = ajForMember .protect(req, { agentId: agent.id });}
if (decision.isDenied()) { return new Response("Unauthorized", { status: 403 });}Bring us your scariest AI workflow.Arcjet stops actions your stack would only log.
1. Run: npx skills add arcjet/skills
2. Add Arcjet protection to my app