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 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.

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