This guide walks through verifying that the full policy delivery chain works: CLI → API → device agent picks up the change.
Prerequisites
agent-charley-cli installed (see Getting Started)
- An API key with
read_write scope
- At least one active enrolled device (see Devices)
Step 1: Verify Authentication
You should see your base URL and key prefix in the output. If you get 401, the key is wrong or expired.
A simpler smoke test — pull current server policies:
Step 2: Get Your Device ID
From the dashboard: Devices → find your test device → copy the UUID shown under the name.
Or via the API:
Set it in your shell:
Step 3: Check the Current Effective Policy
Note the current values — you’ll compare against these after applying.
Step 4: Create a Test Policy File
Create test-policy.yaml with a change you can verify on the device. A safe, visible test is toggling suppress_frontend_ui or flow_logs_enabled:
Replace <your-device-uuid> with your $TEST_DEVICE_ID.
Step 5: Plan
Expected output:
If you see 0 unchanged with no diff, the policy already matches what’s on the server.
Step 6: Apply
Expected output:
Step 7: Confirm Delivery to Device
The device agent polls for policy updates periodically. After applying, verify that the device has received the new policy.
Option A — Check via CLI:
The response shows what the API will serve to the device. If your new field appears here, the API has it correctly.
Option B — Check on the device (macOS):
The agent stores its current policy at:
You can read it:
Option C — Check in the dashboard:
Go to Policies, select the policy type, switch to Device override, and select your test device. You should see the values you applied.
Step 8: Test a DLP Policy
To test DLP end-to-end on a device where Agent Charley is running:
- Apply a DLP policy with
mode: warn and builtins: [credit_card].
- On the test device, open any text editor or browser form.
- Copy a test card number (use a Luhn-valid test number, e.g.
4111 1111 1111 1111) to the clipboard.
- Paste it.
- You should see a warning toast notification from Agent Charley.
Switch mode to block and repeat — the paste should be prevented and the clipboard cleared (if clear_clipboard_on_block: true).
Step 9: Clean Up
Delete the test policy after confirming delivery:
--prune will delete all server policies not in the file. If your org has other policies, pass an empty file only in a test org, or delete the specific policy by listing all policies (agent-charley-cli pull) and removing just the test one.
Or delete it from the dashboard: Policies → Device override → select device → delete.
Common Issues
Testing Against Dev Environment
Or set CHARLEY_ENV=dev to avoid repeating the flag.