Proposal: Tool Usage Policies for Agent Spec#174
Conversation
Add proposals/governance-controls.md defining a ToolPolicy schema that enables declarative constraints on tool invocation: rate limits, caller restrictions, data classification, conditional approval, and justification requirements. Scoped to Tool and ToolBox components only. Agent-level and flow-level governance is deferred to follow-up proposals. Closes oracle#125 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Imran Siddique <imran.siddique@microsoft.com>
|
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
|
Thanks a lot @imran-siddique for putting up the proposal :) . I will try to answer first the questions you have in there, and then maybe ask a few of my own |
|
(At the time I am writing this, it doesn't seem possible to put comments directly on the files).
|
…omposition - Make ToolPolicy a standalone component (referenceable via $component_ref) - Change data_classification from free-form string to enum (public/internal/confidential/restricted) - Add PolicyViolation event type for tracing/observability - Define toolbox + tool policy composition as union semantics - Replace Open Questions with Resolved Design Decisions section - Add reusable policy example showing pattern Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Thanks @dhilloulinoracle for the thorough answers! I've updated the proposal to address all four points:
Also replaced the "Open Questions" section with "Resolved Design Decisions" to document the rationale. Ready for another round of review when you get a chance. |
|
Thank you @imran-siddique for the update. On my side, I have another general question: you have already a way to define policies with https://github.com/microsoft/agent-governance-toolkit/blob/main/agent-governance-python/agent-os/src/agent_os/policies/schema.py . It seems to me a bit different what you have proposed here, but maybe close enough so that we could have compatibility? I think it would be beneficial to the community if policies defined in one place can be loaded in another, but please let me know what you think. |
|
@imran-siddique Thanks for putting this together. I really like the overall direction, and I had a few questions that might help clarify the v1 shape while also keeping the model extensible over time.
|
|
Responding to @dhilloulinoracle's question on policy compatibility: Good catch. AGT's policy schema covers more (agent-level, flow-level), but the tool-level subset maps to what's proposed here. Main difference: AGT uses condition expressions (tool_name == 'x') while this proposal uses structured fields (allowed_callers). Same semantics, different serialization. I'll add a mapping table in the next revision so the two formats can round-trip. |
|
Responding to @cesarebernardis Q4 (toolbox composition): Right, I'll add a dedicated "Policy Composition" section with concrete before/after examples to make this unambiguous. |
|
Responding to @cesarebernardis Q2 (approval unification): This is a better model. One Cleaner extension point too, no new top-level fields every time we add a guard type. I'll sketch this in the next revision. |
Address review feedback from @dhilloulinoracle and @cesarebernardis: - Refactor to ExecutionGuard abstraction: rate limits, approvals, and future constraints share a common {type, condition, on_violation} shape instead of separate top-level fields - Mark allowed_callers/denied_callers as MAY for v1 runtimes - Add AGT policy compatibility mapping table - Expand Policy Composition section with before/after examples making ToolBox base + combine semantics explicit - Add escalate to on_violation and PolicyViolation action_taken - Update all examples to use guards syntax Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Updated the proposal to address all feedback. Key changes in the latest push:
Ready for another look when you get a chance. |
What is explicitly not included in this proposalTo keep the scope focused on tool usage policies, the following are intentionally deferred to future proposals:
These are all valid directions for follow-up work once the core |
|
Responding to @cesarebernardis Q1 (caller restrictions): For single-agent setups, yeah, attachment already controls who can call what. The real use case is shared toolboxes in multi-agent systems where the same tool is exposed to agents with different trust levels. That said, totally fine making |
|
Responding to @cesarebernardis Q3 (uniform guard shape): +1. Rate limits, approvals, classification checks as guard types with a common shape: |
Summary
This PR proposes a
tool_policyproperty forToolandToolBoxcomponents, enabling declarative constraints on tool invocation. This is the first step toward governance controls in Agent Spec, scoped to tool usage policies as discussed in #125.What's included
ToolPolicyschema: rate limits, caller restrictions ($-based), data classification, conditional approval, and justification requirements.{type, condition, on_violation}shape for rate limits, approvals, and classification checks.What's intentionally deferred
Design choices
$for caller restrictions (consistent with existing Agent Spec referencing).data_classificationis a free-form string rather than a fixed enum, for cross-org portability.input_equals,input_contains) rather than regex.requires_confirmation: the existing field stays,tool_policyextends it with conditional semantics.allowed_callers/denied_callersmarked as MAY for v1, since attachment already controls access in single-agent setups.Open questions for discussion
$?data_classificationbe constrained or free-form?tool_policyon aToolBoxinteract with policies on individual tools?PolicyViolationevent type for tracing?Closes #125
cc @dhilloulinoracle @RhicheekPatra @cesarebernardis