Core Concepts
Praxis Policy Engine Documentation
Switching projects opens that project’s default documentation release.
Praxis Policy Engine / v0.3.1
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.
- Embed the Policy Engine
Start with the Rust library integration guide.
- Understand the enforcement pipeline
Follow authorization and redaction through a scenario.
- 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.
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 five top-level keys, and both dispatch modes
- HTTP Routing:
the
http:route selector, precedence, and the catch-all report - Identity and Delegation: inbound identity slots, outbound delegation subjects, and six recipes
- Header Assertions: projecting derived identity onto upstream requests
- 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
- Plugins and Pipeline: hooks, the plugin manager, and execution modes
- Common Message Format: the protocol-agnostic envelope policy reasons about
- Extensions and Capability Gating: typed contextual state, and the capabilities that unlock it
- CMF extensions and the attribute bag: the per-type absent-value contract and every key the bridge emits
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