Core Concepts

Praxis Policy Engine Documentation

Praxis Policy Engine v0.7.0 3 min read

Praxis Policy Engine / v0.7.0

Start with your integration

A policy runtime for authorization, identity, delegation, and data controls. This path is for embedding the Rust library. Gateway operators should use the policy integration documented by their host project and release.

  1. Embed the Policy Engine

    Start with the Rust library integration guide.

  2. Understand the enforcement pipeline

    Follow authorization and redaction through a scenario.

  3. Configure the runtime

    Look up the host and policy configuration.

Browse all pages in the sidebar, or open the source documentation index below. Every link in this path keeps this version.

Full source documentation index

PPE is a typed policy runtime for AI middleware. It maps tools, resources, prompts, inference calls, and conventional APIs to routes by entity type and name. PPE combines global defaults, matching groups, and route controls into phases that validate inputs, authorize operations, apply effects, and transform results. The pipeline controls which operations run, what data returns, and where it may flow.

Agent operations pass through PPE policy, effects, plugins, and enforcement. Policy reads verified identity from an IdP and labels from a session store.

Before policy evaluation, PPE verifies the caller with the IdP and maps subject, role, and permission claims into attributes. The Policy stage evaluates predicates and invokes CEL, Cedar, or OPA where configured. Effects can redact data, request approval, apply session taint, or perform token exchange / delegation for an audience-scoped upstream credential. The session store carries information-flow labels across calls. PPE records the delegation chain and audit history.

Why it exists

  • Vision: the Reference Monitor model and where PPE sits in an agent stack
  • Threat Model: the adversary, the trust boundary, and what each placement defends

Getting started

  • Quick Start: stand up an enforcement point and run your first policy
  • Overview: how it works, followed through one scenario end to end
  • Use Cases: the controls running behind a real gateway

Writing policy

  • APL: routes, phases, predicates, rules, and field pipelines
  • Grammar: the normative grammar; where it and the parser disagree, one is a bug
  • Effects and Sequencing: the effect catalog, halt-on-deny, sequential and parallel composition
  • PDP Integration: handing a decision to Cedar, CEL, or OPA
  • Identity: resolving a caller and what lands in the attribute bag
  • Static Attributes: operator-maintained facts read under data.*
  • Delegation: token exchange, delegation subjects, and token caching
  • Elicitation: human in the loop, and the suspend and resume model
  • Session Taint: information flow labels that outlive a single call
  • Backend Restriction: constraining where a call is allowed to land

Configuring and operating

  • Configuration: the config document, its six top-level keys, and both dispatch modes
  • HTTP Routing: the http: route selector, precedence, and the catch-all report
  • Rate Limiting: request limits before or after identity, counters, and denials
  • LLM Routes: what an llm: route can read before and after the call, with a worked config
  • Identity and Delegation: inbound identity slots, outbound delegation subjects, and six recipes
  • Identity Claim Mapping: adding and testing a provider-specific JWT claim mapper preset
  • Header Assertions: projecting derived identity onto upstream requests
  • Auditing: decision records, write-ahead effect records, and writing a sink
  • FIPS: OpenSSL FIPS selections, host setup, and startup checks
  • Deployment: the same policy at a gateway, a sidecar, or in-framework
  • Patterns: layered enforcement, shadow rollout, guardrails, least privilege
  • Upgrading APL: every key and form an existing configuration must rewrite

Architecture

Reference

  • Crates: what each crate in the workspace is for
  • Builtins: bundled plugins, decision points, session stores, and their features
  • Testing: testing a policy as code
  • Benchmarks: measuring the decision hot path, and reading the results