AI Policy Generation

Draft policies faster. Keep humans responsible.

Hexarch integrates AI-powered policy generation—describe what you want in plain language, and the system produces structured, validated policy configurations. Your team reviews intent and approves what ships.

How it works

  1. Describe — Write a natural language prompt: “Create a rate-limiting policy for mobile apps at 100 requests per minute”
  2. Generate — Hexarch translates the prompt into a structured policy configuration
  3. Validate — The generated policy is schema-validated before it’s usable
  4. Review — Your team inspects the configuration, adjusts if needed
  5. Deploy — Approved policies apply immediately—no code push required

The machine writes the boilerplate. Humans own the decision.

What gets generated

Every generated policy includes:

FieldDescription
nameHuman-readable policy name
typeSecurity, Traffic Control, Transformation, Protocol Mediation, Custom
scopeGlobal, API, Version, Plan, or Route-level
phasePre-Request, Post-Request, or Error Handling
failureModeFail Open (permissive) or Fail Closed (deny by default)
configType-specific settings (thresholds, timeouts, mappings)

Policy types

Security Policies

Traffic Control

Transformation

Protocol Mediation

Custom Extensions

Example prompts

Rate limiting:

“Create a rate-limiting policy for the /api/orders endpoint that allows 1000 requests per minute with a 50-request burst buffer”

PII masking:

“Create a transformation policy that masks credit card numbers and SSNs in API responses”

OAuth validation:

“Create a security policy that validates OAuth2 tokens against our authorization server with a 500ms timeout”

Schema validation

Generated policies are validated against a strict schema before they’re usable:

If generation fails validation, Hexarch returns safe defaults with clear error messages.

Guardrails, not magic

AI generation is a drafting tool, not a replacement for review:

All the rigor. Less YAML archaeology.

Try it

The AI Policy Architect is available in the Hexarch application under the Policies section. Describe what you need, review the output, and deploy when ready.

Next steps