pub struct AgentAction {Show 13 fields
pub action_id: ActionId,
pub agent_id: AgentId,
pub step_id: Option<StepId>,
pub action_type: ActionType,
pub description: String,
pub parameters: Option<Value>,
pub retry_policy: Option<RetryPolicy>,
pub timeout_ms: Option<i64>,
pub status: ActionStatus,
pub attempt_count: i32,
pub created_at: Timestamp,
pub started_at: Option<Timestamp>,
pub completed_at: Option<Timestamp>,
}Expand description
An action taken by an agent.
Fields§
§action_id: ActionIdUnique identifier for this action
agent_id: AgentIdAgent performing this action
step_id: Option<StepId>Plan step this action is part of (if any)
action_type: ActionTypeType of action
description: StringDescription of the action
parameters: Option<Value>Action parameters (JSON)
retry_policy: Option<RetryPolicy>Retry policy
timeout_ms: Option<i64>Timeout in milliseconds
status: ActionStatusCurrent status
attempt_count: i32Number of attempts made
created_at: TimestampWhen this action was created
started_at: Option<Timestamp>When execution started
completed_at: Option<Timestamp>When completed
Implementations§
Source§impl AgentAction
impl AgentAction
Sourcepub fn new(
agent_id: AgentId,
action_type: ActionType,
description: impl Into<String>,
) -> Self
pub fn new( agent_id: AgentId, action_type: ActionType, description: impl Into<String>, ) -> Self
Create a new action.
Sourcepub fn with_parameters(self, params: Value) -> Self
pub fn with_parameters(self, params: Value) -> Self
Set parameters.
Sourcepub fn with_retry_policy(self, policy: RetryPolicy) -> Self
pub fn with_retry_policy(self, policy: RetryPolicy) -> Self
Set retry policy.
Sourcepub fn with_timeout(self, timeout_ms: i64) -> Self
pub fn with_timeout(self, timeout_ms: i64) -> Self
Set timeout.
Trait Implementations§
Source§impl Clone for AgentAction
impl Clone for AgentAction
Source§fn clone(&self) -> AgentAction
fn clone(&self) -> AgentAction
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 moreSource§impl ComposeSchema for AgentAction
impl ComposeSchema for AgentAction
Source§impl Debug for AgentAction
impl Debug for AgentAction
Source§impl<'de> Deserialize<'de> for AgentAction
impl<'de> Deserialize<'de> for AgentAction
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
Source§impl PartialEq for AgentAction
impl PartialEq for AgentAction
Source§impl Serialize for AgentAction
impl Serialize for AgentAction
Source§impl ToSchema for AgentAction
impl ToSchema for AgentAction
impl StructuralPartialEq for AgentAction
Auto Trait Implementations§
impl Freeze for AgentAction
impl RefUnwindSafe for AgentAction
impl Send for AgentAction
impl Sync for AgentAction
impl Unpin for AgentAction
impl UnwindSafe for AgentAction
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