Skip to main content
Policies are the core of the Limits platform. They define rules that determine whether each request is allowed, blocked, or escalated. You create policies from the New Policy button, choose Conditions or Instructions mode, and the AI Assistant generates the policy. You then edit, simulate, deploy, and manage all policies from the Policies page.

How the platform flow works

Trigger event:
  • Click Create Policy
  • Describe requirements
  • Select mode: Conditions, Instructions, or Guardrail
  • Submit
AI Assistant
Policy & Simulation
Creating and managing a policy follows this flow:
  1. Trigger — Click New Policy (in the page header), describe your policy in natural language, choose Conditions or Instructions mode, and submit.
  2. Assistant — You are taken to the Assistant page (/assistant/conditions or /assistant/instructions). The AI streams: Processing your request → Analyzing requirements → Generating policy configuration → Finalizing. When done, you see the Results area (left) and Simulation sidebar (right).
  3. Result by mode — What you see in the policy tabs depends on the mode you chose:
    • Conditions mode — Allow / Block / Escalate tabs with structured rules (CEL and condition builder).
    • Instructions mode — An Instructions tab with natural language. Same options for notifications.
    • Guardrail mode — A guardrails schema (PII, moderation, jailbreak, etc.). See Guardrails.
  4. Edit, simulate, deploy — You can edit the policy (key, tags, default action, conditions or instructions), run Simulation with a JSON payload, and Deploy (or rely on auto-save) to save the policy.
  5. Policies list — Open Policies from the sidebar to see all policies in a table: search by key, filter by status, and edit or delete.

Instructions vs Conditions

When to use Conditions mode vs Instructions mode.

Creating a policy (New Policy)

Step 1: Open the Create Policy dialog

  • From the Policies page (or any page that shows the header with New Policy), click New Policy.
  • A dialog opens with a text area and a mode selector.

Step 2: Describe your policy and choose mode

  • Describe your policy in plain language (e.g. “Limit Stripe payments to $1000 per day” or “Allow maximum 100 API requests per minute”).
  • Choose mode: Conditions (structured rules), Instructions (natural language), or Guardrail (content safety, PII, moderation). You cannot mix modes in one policy.
  • Submit with Enter or the arrow button.

Step 3: Assistant generates the policy

  • You are navigated to /assistant/conditions, /assistant/instructions, or /assistant/guardrail depending on your choice.
  • The Assistant streams four steps: Processing your requestAnalyzing requirementsGenerating policy configurationFinalizing.
  • When streaming finishes, the view switches to a split layout:
    • Left (Results area): Policy header (status, deploy), policy config (key, tags, default action), policy tabs (content depends on mode), use cases, and simulation.
    • Right: Simulation sidebar (chat + payload editor + run simulation + history).

Step 4: Review and refine

  • Conditions mode: Edit the Allow / Block / Escalate tabs (CEL, condition builder), add notifications per action.
  • Instructions mode: Edit the natural-language instructions in the Instructions tab; same notifications.
  • Use Simulation to send a test payload and see allow/block/escalate (or error). Adjust the policy as needed.
  • Click Deploy (or Update) to save. The policy is stored and appears on the Policies page.

AI Assistant

How the Assistant works and how to refine policies.

Policy structure (what you edit)

Every policy has:
ElementDescription
Policy keyUnique identifier (e.g. amount-minimum-usd). Required.
TagsLabels for organizing (e.g. payment, fraud-prevention).
StatusActive (enforcing) or Inactive (disabled).
Default actionWhen no condition matches: Allow, Block, or Escalate.
Policy tabsConditions mode: Allow / Block / Escalate tabs with CEL and condition builder. Instructions mode: Instructions tab with natural language. Guardrail mode: Guardrails schema (PII, moderation, etc.). See Guardrails.
Notifications (optional)Webhooks (and Slack when available) per action. See Notifications.

Policy Conditions

Building conditions (field paths, operators, CEL).

Policies page (/policies)

The Policies page is your list and management surface for all policies.
  • Title: Policies.
  • New Policy button — Opens the same Create Policy dialog (describe + mode → Assistant flow).

Table

  • Columns: Key, Status, Tags, Default Action, Requires Human Review, Created, Last Updated, Actions (edit, delete).
  • Search: By policy key (debounced).
  • Filter: Status = All | Active | Inactive.
  • Pagination: Page index and page size (e.g. 10 per page).

Row actions

  • Edit — Opens the policy edit page (/policies/{id}/edit) with the same mode (conditions or instructions) the policy was created with.
  • Delete — Removes the policy (with confirmation if your app uses it).
  • Edit tags — Update tags inline or in a dialog.

Summary: from Create Policy to Policies list

StepWhereWhat you doResult
1Page headerClick New Policy, describe policy, choose Conditions or Instructions, submitDialog closes; navigate to /assistant/conditions or /assistant/instructions
2Assistant page(Automatic) Your description is sent to the AssistantStreaming steps → policy config + message
3Assistant pageWait for stream to finishSplit view: Results area (left) + Simulation sidebar (right)
4Results areaView/edit by modeConditions: Allow/Block/Escalate CEL + notifications. Instructions: Natural language + same options
5Results areaDeploy/Update, Simulate, generate use casesPolicy saved; simulation runs; templates for payloads
6Policies pageOpen from sidebar or after savingTable of policies; search, filter, edit, delete