This flow proves that the host can stop a tool call when the current agent permission does not allow it.
1. Create a bounded agent
After MCP setup, ask your assistant:
Create a Trusted Agent named guarded-demo. Allow read_proofs, deny send_message, and require human approval for irreversible actions.
The assistant uses neus_agent_create and returns the one required setup step when signing is still needed.
2. Load current permissions
Run this in the project where the host will enforce the decision:
Replace codex with cursor or claude for that host. The command writes the current neus.runtime-mount.v1 bundle to .neus/mount.json.
For the permission above, send_message returns:
read_proofs returns ACTION_ALLOWED. An expired or missing permission fails closed. An irreversible action returns HUMAN_APPROVAL_REQUIRED when the permission requires approval.
Decision order
evaluateRuntimeAction applies the mounted permission in this order:
- Require a valid runtime mount and current permission proof.
- Apply
deniedActions.
- Apply a non-empty
allowedActions list.
- Require approval for an irreversible action when configured.
- Allow the host tool call.
The SDK evaluates one action. The host still owns the tool call and must stop when allowed is false.
Runnable source: examples/guarded-agent-action. Last modified on August 13, 2026