agent_runtime/policy/policy_engine.rs
1//! Policy-engine contract for deciding whether a model-requested tool may run.
2
3use super::Authorization;
4use crate::{Agent, ToolCall};
5
6/// Determines whether an agent is allowed to execute a tool call.
7pub trait PolicyEngine: Send + Sync {
8 fn authorize(&self, agent: &Agent, call: &ToolCall) -> Authorization;
9}