pub struct TomlAgent {
name: String,
description: String,
tools: Vec<String>,
system_prompt: String,
}Expand description
An agent defined inline in TOML configuration.
The simplest agent type — has a static system prompt and fixed tool list. No dynamic context injection or arguments.
Created automatically by AgentRegistry::from_config for each
[agents.inline.<name>] entry.
Fields§
§name: String§description: String§tools: Vec<String>§system_prompt: StringImplementations§
Trait Implementations§
Source§impl Agent for TomlAgent
impl Agent for TomlAgent
Source§fn description(&self) -> &str
fn description(&self) -> &str
Returns a one-line description for agent discovery.
Source§fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
_args: Value,
_ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<AgentPrompt>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
_args: Value,
_ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<AgentPrompt>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve the agent’s prompt, optionally using the
ToolContext
for dynamic context injection (e.g., pre-searching the KB). Read moreAuto Trait Implementations§
impl Freeze for TomlAgent
impl RefUnwindSafe for TomlAgent
impl Send for TomlAgent
impl Sync for TomlAgent
impl Unpin for TomlAgent
impl UnwindSafe for TomlAgent
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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