Skip to main content

AgentInfo

Struct AgentInfo 

pub struct AgentInfo {
Show 17 fields pub name: String, pub parent: Option<String>, pub description: Option<String>, pub file: PathBuf, pub model_alias: String, pub model_fallback: Option<String>, pub model_choices: Vec<String>, pub reasoning_effort: Option<ReasoningEffort>, pub prompt: String, pub tools: Vec<String>, pub skills: Vec<String>, pub preloaded: Vec<String>, pub when: Vec<(String, Vec<String>)>, pub tools_loading: ToolsLoading, pub retry: Vec<(String, RetryDef)>, pub plugins: Vec<String>, pub limits: Limits,
}
Expand description

What one bound agent is, without its LlmAgent (which does not expose it). Two definitions that bind to equal AgentInfos make equal agents; that is how the tests compare an embedded agent with the same files read from a directory.

Fields§

§name: String

The name the agent is registered under: the root’s name, then <parent>/<name>.

§parent: Option<String>

The registration name of the parent; None for the root.

§description: Option<String>

The frontmatter description: what a parent reads as the subagent’s tool description.

§file: PathBuf

The agent’s file, relative to the source root.

§model_alias: String

The gateway alias its model calls use.

§model_fallback: Option<String>

The alias its run continues on when its model is locked, resolved from its folder, its preset and its model’s profile (ADR 0064, amended 2026-11-23).

§model_choices: Vec<String>

The aliases a message may pick for its run (BoundDef::allow_model_choice): the models with a profile that this agent can be bound to, its own left out. Empty unless allowed.

§reasoning_effort: Option<ReasoningEffort>

The reasoning effort its model calls ask for by default, resolved from its folder, its model_preset, the model profile and the profile’s preset (ADR 0063 decision 4), or None when none of them sets one.

§prompt: String

The system prompt the model sees: the instructions with the vars substituted, then the instructions of its eager MCP servers, then the skills catalog and the preloaded skills. A server with a when adds its section to a run, when the run loads it.

§tools: Vec<String>

The names of its tools, in the order the model is shown them: its own, then load_skill and read_skill_file when it has skills to load and files to read, then one per local subagent (the subagent’s name: the entries of info() whose parent is this agent). An MCP server with a when contributes its tools here too: a run that does not load it is not shown them.

§skills: Vec<String>

The skills it may use, in the order of its skills: (by name for all).

§preloaded: Vec<String>

The subset of skills whose body is in the prompt (preload_skills:).

§when: Vec<(String, Vec<String>)>

The MCP servers whose when loads them only when the run’s task mentions one of their keywords: the server and its keywords, in name order. Empty for an agent whose servers are all eager. It is part of the info because a definition that differs only here behaves differently: its tools are withheld from a run the task does not select, and its instructions are added only to such a run.

§tools_loading: ToolsLoading

tools_loading of its file (ADR 0066, decision 1): whether every tool is offered or a run loads them in groups. An eager agent with a when server withholds nothing.

§retry: Vec<(String, RetryDef)>

retry: of its file: the retry policy per tool, by name, as the file says it (ADR 0061). Each is one of tools. Part of the info because an agent that retries a tool differently behaves differently.

§plugins: Vec<String>

The plugins the agent runs, by registered name, in order: its parent’s first (ADR 0050, slice H6).

§limits: Limits

The loop’s limits, with max_output_tokens resolved for the agent’s model (ADR 0064): the folder’s value, its preset’s, the profile’s, the fallback, then clamped to the model’s limit and window.

Trait Implementations§

§

impl Clone for AgentInfo

§

fn clone(&self) -> AgentInfo

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for AgentInfo

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Eq for AgentInfo

§

impl PartialEq for AgentInfo

§

fn eq(&self, other: &AgentInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl StructuralPartialEq for AgentInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ServiceExt for T

§

fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
where Self: Sized,

Apply a transformation to the response body. Read more
§

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using HTTP status codes. Read more
§

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using gRPC headers. Read more
§

fn follow_redirects(self) -> FollowRedirect<Self>
where Self: Sized,

Follow redirect resposes using the Standard policy. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more