pub struct Agent { /* private fields */ }Expand description
Session-bound agent: definition + resolved prompt + tools.
Implementations§
Source§impl Agent
impl Agent
Sourcepub fn new(
definition: AgentDefinition,
system_prompt: String,
tools: Arc<ToolRegistry>,
) -> Self
pub fn new( definition: AgentDefinition, system_prompt: String, tools: Arc<ToolRegistry>, ) -> Self
Construct directly (prefer crate::AgentBuilder).
Sourcepub fn system_prompt(&self) -> &str
pub fn system_prompt(&self) -> &str
Resolved system prompt.
Sourcepub const fn definition(&self) -> &AgentDefinition
pub const fn definition(&self) -> &AgentDefinition
Definition.
Sourcepub fn tools(&self) -> &Arc<ToolRegistry> ⓘ
pub fn tools(&self) -> &Arc<ToolRegistry> ⓘ
Tool registry.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Agent
impl !UnwindSafe for Agent
impl Freeze for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agent
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