appendix-c

Appendix C. Cedar authorization with OpenClaw agents

 

This appendix provides hands-on demonstrations of the authorization patterns introduced in chapter 18. These examples show how Cedar policies can shape agent behavior during execution, planning, and delegation.

The demonstrations use OpenClaw, an open-source framework for tool-using language model agents, together with a lightweight Cedar policy decision point (PDP). The goal is not to build a production system, but to make the architectural ideas from chapter 18 concrete and observable.

You will run three demonstrations:

  • Reactive authorization—the agent attempts actions and adapts to permit or deny decisions
  • Constraint-aware planning—the agent queries policy constraints before acting
  • Delegation as data—a main agent grants a subagent a restricted subset of its authority

Together, these examples show how authorization becomes part of the agent’s runtime behavior.

The demonstrations correspond directly to the patterns described in chapter 18:

  • Section 18.3—policy-aware agent loop
  • Section 18.4—policy constraints guiding planning
  • Section 18.6—delegation and subagents

Each demo builds on the previous one. You should run them in order.

Note

The examples in this appendix make use of the GitHub repository openclaw-cedar-policy-demo (https://github.com/windley/openclaw-cedar-policy-demo/tree/main)

C.1 How these demos are structured

C.2 Prerequisites

C.3 Demo 1: reactive authorization

C.3.1 Start the PDP and verify it’s working

C.3.2 Run the live agent

C.3.3 Observe denied behavior

C.3.4 Observe agent replanning

C.3.5 What this demo shows

C.4 Demo 2: constraint-aware planning

C.4.1 Start the PDP and verify that query constraints are working

C.4.2 Run the agent with constraint awareness

C.4.3 How policy residuals guide the agent

C.4.4 Compare with reactive behavior

C.5 Demo 3: delegation as data

C.5.1 A delegation record in practice

C.5.2 Policies behind delegation

C.5.3 Walk through the delegation notebook

C.5.4 What to observe

C.6 Wrapping up