pub struct AgentStep {
pub message: Message,
pub usage: Usage,
pub finish_reason: Option<FinishReason>,
pub tool_calls: Vec<ToolCall>,
pub tool_results: Vec<HistoryEntry>,
}Expand description
Data record of one LLM round (one model call + tool dispatch).
Carries only what downstream consumers actually read: the assistant
message, token usage, the finish reason, and the tool calls / results.
No synthesized wire response — the old AgentStep.response: Response
field was a parallel type that only served to hold usage and the
final text content. Those two fields are now on the step directly.
Fields§
§message: MessageThe assistant message produced by this step.
usage: UsageToken usage reported by the provider (zero if not reported).
finish_reason: Option<FinishReason>Why the model stopped generating (if reported).
tool_calls: Vec<ToolCall>Tool calls made in this step (if any).
tool_results: Vec<HistoryEntry>Results from tool executions as history entries.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentStep
impl RefUnwindSafe for AgentStep
impl Send for AgentStep
impl Sync for AgentStep
impl Unpin for AgentStep
impl UnsafeUnpin for AgentStep
impl UnwindSafe for AgentStep
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