| Crates.io | spec-ai-policy |
| lib.rs | spec-ai-policy |
| version | 0.6.0-prerelease.12 |
| created_at | 2025-11-24 23:49:33.038151+00 |
| updated_at | 2026-01-04 05:03:35.21752+00 |
| description | Policy enforcement for spec-ai framework |
| homepage | |
| repository | https://github.com/geoffsee/spec-ai |
| max_upload_size | |
| id | 1948923 |
| size | 84,984 |
Policy enforcement and plugin system for the spec-ai framework.
This crate provides the policy engine that controls and restricts agent behavior through:
The policy system enables:
memory_k)Define agents with different capabilities through policy configuration:
[agents.coder]
prompt = "You are a helpful coding assistant"
temperature = 0.3
allowed_tools = ["file_read", "file_write", "bash", "file_extract"]
memory_k = 10
[agents.researcher]
prompt = "You are a research assistant"
temperature = 0.8
denied_tools = ["bash", "file_write"]
memory_k = 20
The prompt_user tool is implicitly allowed unless explicitly denied, ensuring agents can always escalate to humans for clarification.
This crate depends on:
spec-ai-config - Configuration managementThis is an internal crate used by:
spec-ai-core - For enforcing policies during agent executionspec-ai-api - For API-level policy enforcementspec-ai-cli - For CLI command restrictionsFor end-user documentation, see the main spec-ai README.