pub struct AgentDefinition {Show 16 fields
pub name: String,
pub goal: String,
pub tools: Vec<String>,
pub memory_ref: String,
pub strategy: String,
pub on_stuck: String,
pub shield_ref: String,
pub max_iterations: Option<i64>,
pub max_tokens: Option<i64>,
pub max_time: String,
pub max_cost: Option<f64>,
pub return_type: String,
pub body: Vec<StepNode>,
pub loc: Loc,
pub leading_trivia: Vec<Trivia>,
pub trailing_trivia: Vec<Trivia>,
}Fields§
§name: String§goal: String§tools: Vec<String>§memory_ref: String§strategy: String§on_stuck: String§shield_ref: String§max_iterations: Option<i64>§max_tokens: Option<i64>§max_time: String§max_cost: Option<f64>§return_type: StringThe declared result type of the agent — return: T inside the block,
or the -> T position after the name. Empty when undeclared. Checked
against the declared types (axon-T1219) and against the output: of
the step that calls the agent.
body: Vec<StepNode>The step … { … } sequence written inside the agent block — the control
policy of strategy: custom. Empty for every other strategy (a body
under react/reflexion/plan_and_execute is axon-T1217). Until 4.1.0
the parser discarded these blocks and custom was refused at dispatch.
loc: Loc§leading_trivia: Vec<Trivia>v1.5.2 — leading comment trivia attached to this declaration (comments preceding the declaration’s first token, since the previous declaration or file start). Empty by default.
trailing_trivia: Vec<Trivia>v1.5.2 — trailing comment trivia (same line as the declaration’s last effective token). Empty by default.