#[non_exhaustive]pub struct AgentRequest<'a> {
pub role: Role,
pub step: &'a str,
pub key: &'a str,
pub conversation: Option<&'a str>,
pub cost_left: Option<f64>,
pub prompt: String,
pub agent: Option<&'a str>,
pub model: Option<&'a str>,
pub tools: Vec<&'static str>,
pub folder: &'a Path,
pub deadline: Option<Instant>,
pub keep: Option<&'a Path>,
}Expand description
What an agent is asked.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.role: RoleWhy it is asked.
step: &'a strThe id of the step it is asked for.
key: &'a strWhere in the run it is asked: its answer is kept under this key in the record’s journal. A host may show what the agent does meanwhile under it.
conversation: Option<&'a str>The conversation the step’s work was done in before, when that work was refused and is asked again, so the agent may go on in it.
cost_left: Option<f64>What the run may still spend, when its plan has a cost limit and what it spent so far is known. Agents working at the same time are each told the same.
prompt: StringEverything it is told, in words.
agent: Option<&'a str>The named agent, when the plan names one.
model: Option<&'a str>The model, when the plan names one.
tools: Vec<&'static str>The only kinds of tools it may use.
folder: &'a PathThe folder it works in.
deadline: Option<Instant>When the run’s time is over, when it has a limit.
keep: Option<&'a Path>A folder kept with the run, the same each time this key is asked, where the agent may keep what lets it be found again should the run stop while it works: asked again, it may wait for the work still going on and give its answer instead of starting over. Only for a run kept in the folder; it goes when the run ends.