pub struct AgentTurn {
pub system: String,
pub prompt: String,
pub tools: ToolPolicy,
pub mcp: Vec<McpServer>,
pub env: Vec<(String, Secret<String>)>,
pub workdir: PathBuf,
pub timeout: Duration,
pub resume: Option<Resume>,
pub progress: Option<ProgressFn>,
}Expand description
One agent turn.
Fields§
§system: StringStable instructions: persona, rules, knowledge catalog, user profile.
prompt: StringThe conversation transcript and the new message.
tools: ToolPolicyTools the agent may use.
mcp: Vec<McpServer>MCP servers for this run.
env: Vec<(String, Secret<String>)>Extra environment variables for the agent process (run tokens).
workdir: PathBufEmpty working directory for the agent process.
timeout: DurationUpper bound for the run.
resume: Option<Resume>A session to continue instead of sending AgentTurn::prompt. Backends that cannot
resume it (another backend’s session, expired) use the full prompt instead.
progress: Option<ProgressFn>Progress callback.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AgentTurn
impl !UnwindSafe for AgentTurn
impl Freeze for AgentTurn
impl Send for AgentTurn
impl Sync for AgentTurn
impl Unpin for AgentTurn
impl UnsafeUnpin for AgentTurn
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