pub struct AgentProfile {
pub id: AgentId,
pub name: String,
pub trust_level: TrustLevel,
pub allowed_targets: HashSet<AgentId>,
pub allowed_tools: HashSet<String>,
pub max_delegations: u32,
pub privilege_level: u8,
}Expand description
Profile describing an agent’s capabilities and constraints.
Fields§
§id: AgentIdUnique agent identifier.
name: StringHuman-readable agent name.
trust_level: TrustLevelTrust level assigned to this agent.
allowed_targets: HashSet<AgentId>Set of agent IDs this agent is permitted to communicate with.
allowed_tools: HashSet<String>Set of tool names this agent is permitted to use.
max_delegations: u32Maximum depth of delegation chains this agent may initiate.
privilege_level: u8Privilege level (0-255, higher = more privileged).
Implementations§
Source§impl AgentProfile
impl AgentProfile
Sourcepub fn new(id: AgentId, name: &str, trust_level: TrustLevel) -> Self
pub fn new(id: AgentId, name: &str, trust_level: TrustLevel) -> Self
Create a new agent profile with sensible defaults.
Sourcepub fn with_privilege_level(self, level: u8) -> Self
pub fn with_privilege_level(self, level: u8) -> Self
Set the privilege level.
Sourcepub fn with_max_delegations(self, max: u32) -> Self
pub fn with_max_delegations(self, max: u32) -> Self
Set the maximum delegation depth.
Sourcepub fn with_allowed_target(self, target: AgentId) -> Self
pub fn with_allowed_target(self, target: AgentId) -> Self
Add an allowed communication target.
Sourcepub fn with_allowed_tool(self, tool: &str) -> Self
pub fn with_allowed_tool(self, tool: &str) -> Self
Add an allowed tool.
Trait Implementations§
Source§impl Clone for AgentProfile
impl Clone for AgentProfile
Source§fn clone(&self) -> AgentProfile
fn clone(&self) -> AgentProfile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AgentProfile
impl RefUnwindSafe for AgentProfile
impl Send for AgentProfile
impl Sync for AgentProfile
impl Unpin for AgentProfile
impl UnsafeUnpin for AgentProfile
impl UnwindSafe for AgentProfile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more