pub struct Agent {
pub agent_id: AgentId,
pub agent_type: AgentType,
pub capabilities: Vec<String>,
pub memory_access: MemoryAccess,
pub status: AgentStatus,
pub current_trajectory_id: Option<TrajectoryId>,
pub current_scope_id: Option<ScopeId>,
pub can_delegate_to: Vec<String>,
pub reports_to: Option<AgentId>,
pub owner_principal_id: PrincipalId,
pub created_at: DateTime<Utc>,
pub last_heartbeat_at: DateTime<Utc>,
}Expand description
An agent in the multi-agent system.
Fields§
§agent_id: AgentIdUnique identifier for this agent
agent_type: AgentTypeType of agent (e.g., tester, reviewer, planner)
capabilities: Vec<String>Capabilities this agent has
memory_access: MemoryAccessMemory access permissions
status: AgentStatusCurrent status
current_trajectory_id: Option<TrajectoryId>Current trajectory being worked on
current_scope_id: Option<ScopeId>Current scope being worked on
can_delegate_to: Vec<String>Agent types this agent can delegate to
reports_to: Option<AgentId>Supervisor agent (if any)
owner_principal_id: PrincipalIdPrincipal that owns this agent
created_at: DateTime<Utc>When this agent was created
last_heartbeat_at: DateTime<Utc>Last heartbeat timestamp
Implementations§
Source§impl Agent
impl Agent
Sourcepub fn new(agent_type: impl Into<AgentType>, capabilities: Vec<String>) -> Agent
pub fn new(agent_type: impl Into<AgentType>, capabilities: Vec<String>) -> Agent
Create a new agent.
Sourcepub fn with_memory_access(self, access: MemoryAccess) -> Agent
pub fn with_memory_access(self, access: MemoryAccess) -> Agent
Set memory access permissions.
Sourcepub fn with_delegation_targets(self, targets: Vec<String>) -> Agent
pub fn with_delegation_targets(self, targets: Vec<String>) -> Agent
Set delegation targets.
Sourcepub fn with_supervisor(self, supervisor_id: AgentId) -> Agent
pub fn with_supervisor(self, supervisor_id: AgentId) -> Agent
Set supervisor.
Sourcepub fn with_owner_principal(self, owner_principal_id: PrincipalId) -> Agent
pub fn with_owner_principal(self, owner_principal_id: PrincipalId) -> Agent
Set owner principal.
Sourcepub fn has_capability(&self, capability: &str) -> bool
pub fn has_capability(&self, capability: &str) -> bool
Check if agent has a specific capability.
Sourcepub fn can_delegate_to_type(&self, agent_type: &AgentType) -> bool
pub fn can_delegate_to_type(&self, agent_type: &AgentType) -> bool
Check if agent can delegate to a specific agent type.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Agent
impl<'de> Deserialize<'de> for Agent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Agent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Agent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Agent
impl Serialize for Agent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Agent
Auto Trait Implementations§
impl Freeze for Agent
impl RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnwindSafe for Agent
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