Policy CLI Reference
Thesmoltbot policy commands manage governance policies for your agents. Policies define which tools an agent can use, how unmapped tools are handled, and what actions are forbidden — bridging the gap between abstract alignment card declarations and concrete tool usage.
Commands
policy.yaml in the current directory✓ Created policy.yaml
Edit the file to define your capability mappings and forbidden rules.
Run 'smoltbot policy validate policy.yaml' to check your policy.
Validating policy.yaml...
✓ Schema version: 1.0
✓ Meta: name="support-agent-policy", scope=agent
✓ Capability mappings: 4 capabilities, 12 tool patterns
✓ Forbidden rules: 3 rules
✓ Escalation triggers: 2 triggers
✓ Defaults: unmapped=deny, enforcement=warn, grace=24h
Policy is valid.
Validating policy.yaml...
✗ forbidden[1].severity: must be one of: critical, high, medium, low
✗ defaults.unmapped_tool_action: required field missing
2 errors found. Policy is invalid.
Validating policy.yaml...
✓ Valid (4 capabilities, 3 forbidden rules)
Publish this policy for agent smolt-a4c12709? (y/N) y
✓ Policy published (version 3)
Previous policy archived.
Organization Policy:
Name: org-default-policy
Scope: org
Version: 2
Updated: 2026-02-20
Agent Policy (smolt-a4c12709):
Name: support-agent-policy
Scope: agent
Version: 3
Updated: 2026-02-25
Resolved policy: org + agent merged (agent strengthens org defaults)
--agent <name>--limit <N>Testing policy.yaml against 50 recent traces...
Trace tr-abc123 (2026-02-25 14:32):
⚠ UNMAPPED_TOOL: mcp__slack__post_message (warn)
⚠ UNMAPPED_TOOL: mcp__slack__read_channel (warn)
Trace tr-def456 (2026-02-25 14:28):
✗ FORBIDDEN: mcp__filesystem__delete (critical)
Reason: File deletion not permitted
Summary:
50 traces analyzed
1 would fail, 1 would warn, 48 would pass
2 unmapped tools discovered
Run policy evaluation as a CI/CD gate. Evaluates the agent’s current resolved policy against recent activity.
Global Options
All policy commands support:| Option | Description |
|---|---|
--agent <name> | Select which agent to use for the command |
--help | Show help for the subcommand |
See Also
- Policy Engine — How policies work
- Policy DSL Specification — Full schema reference
- Policy Management Guide — Step-by-step workflows
- CI/CD Policy Gates — Integrating policy into CI/CD
- CLI Reference — All smoltbot commands