pub enum AgentRole {
Primary,
SubAgent,
Internal,
}Expand description
Agent 角色 — 决定 Agent 在系统中的调度位置。
§Examples
use katu_core::AgentRole;
let role = AgentRole::Primary;
assert!(role.is_primary());Variants§
Primary
主 Agent — 直接面向用户,接收用户输入。
SubAgent
子 Agent — 由其他 Agent 通过 tool_call 调度,结果返回给调用者。
Internal
内部 Agent — 系统用途(compaction、title 生成等),不直接与用户交互。
Implementations§
Source§impl AgentRole
impl AgentRole
Sourcepub fn is_primary(&self) -> bool
pub fn is_primary(&self) -> bool
是否为主 Agent。
Sourcepub fn is_sub_agent(&self) -> bool
pub fn is_sub_agent(&self) -> bool
是否为子 Agent。
Sourcepub fn is_internal(&self) -> bool
pub fn is_internal(&self) -> bool
是否为内部 Agent。
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AgentRole
impl<'de> Deserialize<'de> for AgentRole
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for AgentRole
impl Eq for AgentRole
impl StructuralPartialEq for AgentRole
Auto Trait Implementations§
impl Freeze for AgentRole
impl RefUnwindSafe for AgentRole
impl Send for AgentRole
impl Sync for AgentRole
impl Unpin for AgentRole
impl UnsafeUnpin for AgentRole
impl UnwindSafe for AgentRole
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