agentsecure.get_policy_hint
Evaluate a proposed Mesh action against local agent policy without executing it; returns allowed/blocked status, reasons, and guidance for next steps.
Instructions
Evaluate a proposed Mesh action against the current local agent policy without executing it. Checks cannot, can_message (when a send_message target is supplied), requires_human_for, and sensitive markers in action/resource. Returns allowed, blocked, reason, action, sanitized resource, and allowed_next_step. This is guidance, not an authorization token or a guarantee about external permissions; existing approval records are not consulted. Use agentsecure.request_approval to record a review request, or agentsecure.policy.describe for HTTP network/secret configuration. Example: {"agent_id": "frontend-agent", "action": "send_message", "target": "backend-agent"}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Non-empty action label matched against mesh.agents policy, e.g. send_message or deploy_preview. Action/resource text is also checked for sensitive markers such as deploy or secret. | |
| target | No | Recipient agent ID for a send_message check; defaults to empty. Only used with action=send_message to check can_message restrictions; not a hostname or URL. | |
| agent_id | Yes | Non-empty Mesh agent ID, e.g. backend-agent. Pass this session's AGENTSECURE_AGENT_ID value when set; it is not read automatically. IDs are caller-supplied local labels, not authentication credentials. | |
| resource | No | Optional resource metadata; defaults to {}. Stored/returned fields are limited to action, environment, id, path, provider, repo, team, and type. Use non-secret scalar values or lists; other keys and top-level object-valued fields are dropped; list items are converted to scalars, and strings are truncated/redacted. Example: {"type": "code_file", "path": "src/app.py"}. For policy checks, the entire supplied object is examined for sensitive-action markers. |